From 96dd14843d6964e5df524beda6d371f275d72681 Mon Sep 17 00:00:00 2001 From: Smit Thakkar Date: Sun, 22 Nov 2020 16:09:10 +0400 Subject: [PATCH] Update RBAC AND CRD as per 0.10 --- .../argo-rollouts-aggregate-roles.yaml | 8 ++ .../templates/argo-rollouts-clusterrole.yaml | 122 ++++++++---------- .../templates/crds/analysis-run-crd.yaml | 27 ++++ .../templates/crds/analysis-template-crd.yaml | 27 ++++ .../crds/cluster-analysis-template-crd.yaml | 27 ++++ .../templates/crds/experiment-crd.yaml | 9 ++ .../templates/crds/rollout-crd.yaml | 75 ++++++++++- 7 files changed, 225 insertions(+), 70 deletions(-) diff --git a/charts/argo-rollouts/templates/argo-rollouts-aggregate-roles.yaml b/charts/argo-rollouts/templates/argo-rollouts-aggregate-roles.yaml index 7f94befa..5b9047fb 100644 --- a/charts/argo-rollouts/templates/argo-rollouts-aggregate-roles.yaml +++ b/charts/argo-rollouts/templates/argo-rollouts-aggregate-roles.yaml @@ -12,8 +12,10 @@ rules: - argoproj.io resources: - rollouts + - rollouts/scale - experiments - analysistemplates + - clusteranalysistemplates - analysisruns verbs: - get @@ -35,8 +37,11 @@ rules: - argoproj.io resources: - rollouts + - rollouts/scale + - rollouts/status - experiments - analysistemplates + - clusteranalysistemplates - analysisruns verbs: - create @@ -63,8 +68,11 @@ rules: - argoproj.io resources: - rollouts + - rollouts/scale + - rollouts/status - experiments - analysistemplates + - clusteranalysistemplates - analysisruns verbs: - create diff --git a/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml b/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml index abc1a113..5ef7d507 100644 --- a/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml +++ b/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml @@ -8,6 +8,42 @@ metadata: app.kubernetes.io/name: {{ .Release.Name }}-clusterrole app.kubernetes.io/part-of: {{ .Release.Name }} rules: +- apiGroups: + - argoproj.io + resources: + - rollouts + - rollouts/status + - rollouts/finalizers + verbs: + - get + - list + - watch + - update + - patch +- apiGroups: + - argoproj.io + resources: + - analysisruns + - analysisruns/finalizers + - experiments + - experiments/finalizers + verbs: + - create + - get + - list + - watch + - update + - patch + - delete +- apiGroups: + - argoproj.io + resources: + - analysistemplates + - clusteranalysistemplates + verbs: + - get + - list + - watch - apiGroups: - apps resources: @@ -30,58 +66,39 @@ rules: - watch - patch - apiGroups: - - "" + - "" resources: - - secrets - verbs: - - get - - list - - watch -- apiGroups: - - argoproj.io - resources: - - rollouts + - secrets verbs: - get - list - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - delete + - update +- apiGroups: + - "" + resources: + - events + verbs: + - create - update - patch - apiGroups: - - argoproj.io + - extensions resources: - - rollouts/finalizers - verbs: - - update -- apiGroups: - - argoproj.io - resources: - - analysisruns - - experiments + - ingresses verbs: - create - get - list - watch - - update - patch - - delete -- apiGroups: - - argoproj.io - resources: - - analysisruns/finalizers - - experiments/finalizers - verbs: - - update -- apiGroups: - - argoproj.io - resources: - - analysistemplates - - clusteranalysistemplates - verbs: - - get - - list - - watch - apiGroups: - batch resources: @@ -94,24 +111,6 @@ rules: - update - patch - delete -- apiGroups: - - extensions - resources: - - ingresses - verbs: - - create - - get - - list - - watch - - patch -- apiGroups: - - "" - resources: - - events - verbs: - - create - - update - - patch - apiGroups: - networking.istio.io resources: @@ -131,17 +130,4 @@ rules: - get - update - patch -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - delete -- apiGroups: - - "*" - resources: - - "*/finalizers" - verbs: - - "*" {{- end }} diff --git a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml index 3a4caef4..dec710ce 100644 --- a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml @@ -41,6 +41,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object secretKeyRef: properties: key: @@ -81,6 +88,15 @@ spec: type: string provider: properties: + datadog: + properties: + interval: + type: string + query: + type: string + required: + - query + type: object job: properties: metadata: @@ -2053,6 +2069,8 @@ spec: fsGroup: format: int64 type: integer + fsGroupChangePolicy: + type: string runAsGroup: format: int64 type: integer @@ -2679,6 +2697,15 @@ spec: - storageAccountName - threshold type: object + newRelic: + properties: + profile: + type: string + query: + type: string + required: + - query + type: object prometheus: properties: address: diff --git a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml index c559fae1..839d0b8a 100644 --- a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml @@ -35,6 +35,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object secretKeyRef: properties: key: @@ -75,6 +82,15 @@ spec: type: string provider: properties: + datadog: + properties: + interval: + type: string + query: + type: string + required: + - query + type: object job: properties: metadata: @@ -2047,6 +2063,8 @@ spec: fsGroup: format: int64 type: integer + fsGroupChangePolicy: + type: string runAsGroup: format: int64 type: integer @@ -2673,6 +2691,15 @@ spec: - storageAccountName - threshold type: object + newRelic: + properties: + profile: + type: string + query: + type: string + required: + - query + type: object prometheus: properties: address: diff --git a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml index 9a768072..601a37d6 100644 --- a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml @@ -35,6 +35,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object secretKeyRef: properties: key: @@ -75,6 +82,15 @@ spec: type: string provider: properties: + datadog: + properties: + interval: + type: string + query: + type: string + required: + - query + type: object job: properties: metadata: @@ -2047,6 +2063,8 @@ spec: fsGroup: format: int64 type: integer + fsGroupChangePolicy: + type: string runAsGroup: format: int64 type: integer @@ -2673,6 +2691,15 @@ spec: - storageAccountName - threshold type: object + newRelic: + properties: + profile: + type: string + query: + type: string + required: + - query + type: object prometheus: properties: address: diff --git a/charts/argo-rollouts/templates/crds/experiment-crd.yaml b/charts/argo-rollouts/templates/crds/experiment-crd.yaml index bd435156..0be3f656 100644 --- a/charts/argo-rollouts/templates/crds/experiment-crd.yaml +++ b/charts/argo-rollouts/templates/crds/experiment-crd.yaml @@ -44,6 +44,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object secretKeyRef: properties: key: @@ -2031,6 +2038,8 @@ spec: fsGroup: format: int64 type: integer + fsGroupChangePolicy: + type: string runAsGroup: format: int64 type: integer diff --git a/charts/argo-rollouts/templates/crds/rollout-crd.yaml b/charts/argo-rollouts/templates/crds/rollout-crd.yaml index 18afb92b..eb9d208d 100644 --- a/charts/argo-rollouts/templates/crds/rollout-crd.yaml +++ b/charts/argo-rollouts/templates/crds/rollout-crd.yaml @@ -39,6 +39,7 @@ spec: labelSelectorPath: .status.selector specReplicasPath: .spec.replicas statusReplicasPath: .status.HPAReplicas + status: {} validation: openAPIV3Schema: properties: @@ -125,6 +126,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object podTemplateHashValue: type: string type: object @@ -157,6 +165,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object podTemplateHashValue: type: string type: object @@ -205,6 +220,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object podTemplateHashValue: type: string type: object @@ -242,6 +264,17 @@ spec: requiredDuringSchedulingIgnoredDuringExecution: type: object type: object + canaryMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object canaryService: type: string maxSurge: @@ -254,6 +287,17 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + stableMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object stableService: type: string steps: @@ -270,6 +314,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object podTemplateHashValue: type: string type: object @@ -305,6 +356,13 @@ spec: type: string valueFrom: properties: + fieldRef: + properties: + fieldPath: + type: string + required: + - fieldPath + type: object podTemplateHashValue: type: string type: object @@ -385,6 +443,17 @@ spec: - type: string x-kubernetes-int-or-string: true type: object + setCanaryScale: + properties: + matchTrafficWeight: + type: boolean + replicas: + format: int32 + type: integer + weight: + format: int32 + type: integer + type: object setWeight: format: int32 type: integer @@ -2367,6 +2436,8 @@ spec: fsGroup: format: int64 type: integer + fsGroupChangePolicy: + type: string runAsGroup: format: int64 type: integer @@ -2992,8 +3063,6 @@ spec: - name - status type: object - stableRS: - type: string type: object collisionCount: format: int32 @@ -3048,6 +3117,8 @@ spec: - startTime type: object type: array + promoteFull: + type: boolean readyReplicas: format: int32 type: integer