From 9f1bb53898a7194fcbed65e62115f8fe922622c3 Mon Sep 17 00:00:00 2001 From: Seiya Muramatsu Date: Tue, 21 Apr 2020 08:40:39 +0900 Subject: [PATCH 1/2] feat: upgrade Argo Rollouts to v0.8.0 (#315) --- charts/argo-rollouts/.helmignore | 21 +++++ charts/argo-rollouts/Chart.yaml | 4 +- charts/argo-rollouts/README.md | 4 +- .../templates/argo-rollouts-role.yaml | 25 +++++- .../templates/crds/rollout-crd.yaml | 77 +++++++++++++++++++ charts/argo-rollouts/values.yaml | 2 +- 6 files changed, 125 insertions(+), 8 deletions(-) create mode 100644 charts/argo-rollouts/.helmignore diff --git a/charts/argo-rollouts/.helmignore b/charts/argo-rollouts/.helmignore new file mode 100644 index 00000000..f0c13194 --- /dev/null +++ b/charts/argo-rollouts/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index f62ffce9..489918f1 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 -appVersion: "0.7" +appVersion: "0.8.0" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 0.2.0 +version: 0.3.0 icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png home: https://github.com/argoproj/argo-helm maintainers: diff --git a/charts/argo-rollouts/README.md b/charts/argo-rollouts/README.md index 5ddeb0b6..86292c74 100644 --- a/charts/argo-rollouts/README.md +++ b/charts/argo-rollouts/README.md @@ -2,7 +2,7 @@ Argo Rollouts Chart ============= A Helm chart for Argo Rollouts, progressive delivery for Kubernetes. -Current chart version is `0.2.0` +Current chart version is `0.3.0` Source code can be found [here](https://github.com/argoproj/argo-rollouts) @@ -33,7 +33,7 @@ $ helm install --name my-release argo/argo-rollouts | controller.component | string | `"rollouts-controller"` | | | controller.image.pullPolicy | string | `"IfNotPresent"` | | | controller.image.repository | string | `"argoproj/argo-rollouts"` | | -| controller.image.tag | string | `"v0.7.0"` | | +| controller.image.tag | string | `"v0.8.0"` | | | controller.name | string | `"argo-rollouts"` | | | imagePullSecrets | list | `[]` | | | installCRDs | bool | `true` | | diff --git a/charts/argo-rollouts/templates/argo-rollouts-role.yaml b/charts/argo-rollouts/templates/argo-rollouts-role.yaml index 3c89053d..df4e2b26 100644 --- a/charts/argo-rollouts/templates/argo-rollouts-role.yaml +++ b/charts/argo-rollouts/templates/argo-rollouts-role.yaml @@ -71,6 +71,16 @@ rules: - update - patch - delete +- apiGroups: + - extensions + resources: + - ingresses + verbs: + - create + - get + - list + - watch + - patch - apiGroups: - "" resources: @@ -80,8 +90,17 @@ rules: - update - patch - apiGroups: - - "" + - "" resources: - - secrets + - secrets verbs: - - get + - get + - list + - watch +- apiGroups: + - "" + resources: + - pods + verbs: + - list + - delete diff --git a/charts/argo-rollouts/templates/crds/rollout-crd.yaml b/charts/argo-rollouts/templates/crds/rollout-crd.yaml index 36bf8b00..0f276b16 100644 --- a/charts/argo-rollouts/templates/crds/rollout-crd.yaml +++ b/charts/argo-rollouts/templates/crds/rollout-crd.yaml @@ -61,6 +61,9 @@ spec: replicas: format: int32 type: integer + restartAt: + format: date-time + type: string revisionHistoryLimit: format: int32 type: integer @@ -93,11 +96,54 @@ spec: properties: activeService: type: string + antiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + properties: + weight: + format: int32 + type: integer + required: + - weight + type: object + requiredDuringSchedulingIgnoredDuringExecution: + type: object + type: object autoPromotionEnabled: type: boolean autoPromotionSeconds: format: int32 type: integer + postPromotionAnalysis: + properties: + args: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + podTemplateHashValue: + type: string + type: object + required: + - name + type: object + type: array + templateName: + type: string + templates: + items: + properties: + templateName: + type: string + required: + - templateName + type: object + type: array + type: object prePromotionAnalysis: properties: args: @@ -177,6 +223,19 @@ spec: type: object type: array type: object + antiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + properties: + weight: + format: int32 + type: integer + required: + - weight + type: object + requiredDuringSchedulingIgnoredDuringExecution: + type: object + type: object canaryService: type: string maxSurge: @@ -323,6 +382,19 @@ spec: type: array trafficRouting: properties: + alb: + properties: + annotationPrefix: + type: string + ingress: + type: string + servicePort: + format: int32 + type: integer + required: + - ingress + - servicePort + type: object istio: properties: virtualService: @@ -2870,6 +2942,8 @@ spec: properties: activeSelector: type: string + postPromotionAnalysisRun: + type: string prePromotionAnalysisRun: type: string previewSelector: @@ -2952,6 +3026,9 @@ spec: replicas: format: int32 type: integer + restartedAt: + format: date-time + type: string selector: type: string stableRS: diff --git a/charts/argo-rollouts/values.yaml b/charts/argo-rollouts/values.yaml index 2464b287..18b7dff4 100644 --- a/charts/argo-rollouts/values.yaml +++ b/charts/argo-rollouts/values.yaml @@ -7,7 +7,7 @@ controller: component: rollouts-controller image: repository: argoproj/argo-rollouts - tag: v0.7.0 + tag: v0.8.0 pullPolicy: IfNotPresent serviceAccount: From a5070f5f071aaf03895ceecc6676e7e01a4455be Mon Sep 17 00:00:00 2001 From: Tyler Auerbeck Date: Mon, 20 Apr 2020 19:59:48 -0400 Subject: [PATCH 2/2] feat: Fix/Enhance Routes; Add uid workaround for repo server (#276) * Fix/Enhance Routes; Add uid workaround for repo server * Fix CI linting * Update default openshift.enabled value; Fix argocd-repo-server env template * Bump chart version to fix linting Co-authored-by: Spencer Gilbert --- charts/argo-cd/Chart.yaml | 2 +- .../templates/argocd-repo-server/deployment.yaml | 13 +++++++++++-- charts/argo-cd/templates/argocd-server/route.yaml | 6 ++++-- charts/argo-cd/values.yaml | 5 ++++- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index f7247d72..b671caf3 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.5.2" description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 2.2.7 +version: 2.2.8 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index a578a31c..e38dd84e 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -53,6 +53,9 @@ spec: imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.repoServer.image.imagePullPolicy }} command: - argocd-repo-server + {{- if .Values.openshift.enabled }} + - uid_entrypoint.sh + {{- end }} {{- if or (and .Values.redis.enabled (not $redisHa.enabled)) (and $redisHa.enabled $redisHa.haproxy.enabled) }} - --redis - {{ template "argo-cd.redis.fullname" . }}:{{ .Values.redis.servicePort }} @@ -65,10 +68,16 @@ spec: {{- if .Values.repoServer.containerSecurityContext }} securityContext: {{- toYaml .Values.repoServer.containerSecurityContext | nindent 10 }} {{- end }} - {{- if .Values.repoServer.env }} +{{- if or (.Values.repoServer.env) (.Values.openshift.enabled) }} env: +{{- if .Values.repoServer.env }} {{- toYaml .Values.repoServer.env | nindent 8 }} - {{- end }} +{{- end }} +{{- if .Values.openshift.enabled }} + - name: USER_NAME + value: argocd +{{- end }} +{{- end }} volumeMounts: {{- if .Values.repoServer.volumeMounts }} {{- toYaml .Values.repoServer.volumeMounts | nindent 8}} diff --git a/charts/argo-cd/templates/argocd-server/route.yaml b/charts/argo-cd/templates/argocd-server/route.yaml index f5952a13..775a0a2f 100644 --- a/charts/argo-cd/templates/argocd-server/route.yaml +++ b/charts/argo-cd/templates/argocd-server/route.yaml @@ -23,7 +23,9 @@ spec: port: targetPort: https tls: - termination: passthrough - insecureEdgeTerminationPolicy: None + termination: {{ .Values.server.route.termination_type | default "passthrough" }} + insecureEdgeTerminationPolicy: {{ .Values.server.route.termination_policy | default "None" }} wildcardPolicy: None +status: + ingress: [] {{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 37845070..c666453b 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -171,7 +171,7 @@ dex: image: repository: quay.io/dexidp/dex - tag: v2.14.0 + tag: v2.22.0 imagePullPolicy: IfNotPresent initImage: repository: @@ -813,3 +813,6 @@ configs: # argocdServerAdminPassword: # Password modification time defaults to current time if not set # argocdServerAdminPasswordMtime: "2006-01-02T15:04:05Z" + +openshift: + enabled: false