diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 160d33ba..04a5fb87 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.4.2" description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 1.8.3 +version: 1.8.7 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/README.md b/charts/argo-cd/README.md index da37209b..e9a022f4 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -38,6 +38,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | global.image.repository | If defined, a repository applied to all ArgoCD deployments. | `"argoproj/argocd"` | | global.image.tag | If defined, a tag applied to all ArgoCD deployments. | `"v1.4.2"` | | global.securityContext | Toggle and define securityContext | See [values.yaml](values.yaml) |  +| global.imagePullSecrets | If defined, uses a Secret to pull an image from a private Docker registry or repository. | `[]` |  | nameOverride | Provide a name in place of `argocd` | `"argocd"` | | installCRDs | bool | `true` | Install CRDs if you are using Helm2. | | configs.knownHosts.data.ssh_known_hosts | Known Hosts | See [values.yaml](values.yaml) | @@ -225,6 +226,8 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | dex.name | Dex name | `"dex-server"` | | dex.env | Environment variables for the Dex server. | `[]` | | dex.nodeSelector | Dex node selector https://kubernetes.io/docs/user-guide/node-selection/ | `{}` | +| dex.podAnnotations | Annotations for the Dex server pods | `{}` | +| dex.podLabels | Labels for the Dex server pods | `{}` | | dex.priorityClassName | Priority class for dex | `""` | | dex.resources | Resource limits and requests for dex | `{}` | | dex.serviceAccount.create | Create dex service account | `true` | @@ -248,6 +251,8 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | redis.name | Redis name | `"redis"` | | redis.env | Environment variables for the Redis server. | `[]` | | redis.nodeSelector | Redis node selector https://kubernetes.io/docs/user-guide/node-selection/ | `{}` | +| redis.podAnnotations | Annotations for the Redis server pods | `{}` | +| redis.podLabels | Labels for the Redis server pods | `{}` | | redis.priorityClassName | Priority class for redis | `""` | | redis.resources | Resource limits and requests for redis | `{}` | | redis.servicePort | Redis service port | `6379` | diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index 9c13b535..9dca5f0d 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -38,6 +38,10 @@ spec: {{- toYaml .Values.controller.podLabels | nindent 8 }} {{- end }} spec: + {{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.global.securityContext }} securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 946bbef3..19a964f7 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -39,6 +39,10 @@ spec: {{- toYaml .Values.repoServer.podLabels | nindent 8 }} {{- end }} spec: + {{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.global.securityContext }} securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index c5d1395c..0465e0ee 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -39,6 +39,10 @@ spec: {{- toYaml .Values.server.podLabels | nindent 8 }} {{- end }} spec: + {{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.global.securityContext }} securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }} {{- end }} @@ -132,7 +136,7 @@ spec: serviceAccountName: {{ template "argo-cd.serverServiceAccountName" . }} volumes: {{- if .Values.server.volumes }} -{{- toYaml .Values.server.volumes | nindent 8}} +{{- toYaml .Values.server.volumes | nindent 6}} {{- end }} - emptyDir: {} name: static-files diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index fd8c606a..d2fde3e3 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -18,6 +18,12 @@ spec: app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: + {{- if .Values.dex.podAnnotations }} + annotations: + {{- range $key, $value := .Values.dex.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} labels: app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.dex.name }} helm.sh/chart: {{ include "argo-cd.chart" . }} @@ -26,7 +32,14 @@ spec: app.kubernetes.io/part-of: argocd app.kubernetes.io/component: {{ .Values.dex.name }} app.kubernetes.io/version: {{ .Values.dex.image.tag }} + {{- if .Values.dex.podLabels }} +{{- toYaml .Values.dex.podLabels | nindent 8 }} + {{- end }} spec: + {{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.global.securityContext }} securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }} {{- end }} diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 9358166e..60896660 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -17,6 +17,12 @@ spec: app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }} template: metadata: + {{- if .Values.redis.podAnnotations }} + annotations: + {{- range $key, $value := .Values.redis.podAnnotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} labels: app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }} helm.sh/chart: {{ include "argo-cd.chart" . }} @@ -24,8 +30,15 @@ spec: app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/part-of: argocd app.kubernetes.io/component: {{ .Values.redis.name }} - app.kubernetes.io/version: {{ .Values.redis.image.tag }} + app.kubernetes.io/version: {{ .Values.redis.image.tag }} + {{- if .Values.redis.podLabels }} +{{- toYaml .Values.redis.podLabels | nindent 8 }} + {{- end }} spec: + {{- with .Values.global.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} automountServiceAccountToken: false {{- if .Values.global.securityContext }} securityContext: {{- toYaml .Values.global.securityContext | nindent 8 }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index e88c2f8c..cef83273 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -16,6 +16,7 @@ global: # runAsUser: 999 # runAsGroup: 999 # fsGroup: 999 + imagePullSecrets: [] ## Controller controller: @@ -177,6 +178,14 @@ dex: ## env: [] + ## Annotations to be added to the Dex server pods + ## + podAnnotations: {} + + ## Labels to be added to the Dex server pods + ## + podLabels: {} + serviceAccount: create: true name: argocd-dex-server @@ -238,6 +247,14 @@ redis: ## env: [] + ## Annotations to be added to the Redis server pods + ## + podAnnotations: {} + + ## Labels to be added to the Redis server pods + ## + podLabels: {} + ## Node selectors and tolerations for server scheduling to nodes with taints ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ ## @@ -484,9 +501,9 @@ server: # destination: # server: https://kubernetes.default.svc # namespace: guestbook - # syncPolicy: - # automated: - # prune: false + # syncPolicy: + # automated: + # prune: false # selfHeal: false ## Projects diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml index c9ae31f2..c775de92 100644 --- a/charts/argo/Chart.yaml +++ b/charts/argo/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 -appVersion: "v2.4.3" +appVersion: "v2.6.1" description: A Helm chart for Argo Workflows name: argo -version: 0.6.9 +version: 0.7.0 icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm maintainers: diff --git a/charts/argo/crds/cron-workflow-crd.yaml b/charts/argo/crds/cron-workflow-crd.yaml new file mode 100644 index 00000000..8f4bb7c2 --- /dev/null +++ b/charts/argo/crds/cron-workflow-crd.yaml @@ -0,0 +1,17 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: cronworkflows.argoproj.io + annotations: + helm.sh/hook: crd-install + helm.sh/hook-delete-policy: before-hook-creation +spec: + group: argoproj.io + names: + kind: CronWorkflow + plural: cronworkflows + shortNames: + - cronwf + - cwf + scope: Namespaced + version: v1alpha1 \ No newline at end of file diff --git a/charts/argo/crds/workflow-crd.yaml b/charts/argo/crds/workflow-crd.yaml index 64a77d7f..269d032f 100644 --- a/charts/argo/crds/workflow-crd.yaml +++ b/charts/argo/crds/workflow-crd.yaml @@ -6,11 +6,21 @@ metadata: helm.sh/hook: crd-install helm.sh/hook-delete-policy: before-hook-creation spec: + additionalPrinterColumns: + - JSONPath: .status.phase + description: Status of the workflow + name: Status + type: string + - JSONPath: .status.startedAt + description: When the workflow was started + format: date-time + name: Age + type: date group: argoproj.io - version: v1alpha1 - scope: Namespaced names: kind: Workflow plural: workflows shortNames: - wf + scope: Namespaced + version: v1alpha1 diff --git a/charts/argo/templates/NOTES.txt b/charts/argo/templates/NOTES.txt index 6a15d44b..327b262d 100644 --- a/charts/argo/templates/NOTES.txt +++ b/charts/argo/templates/NOTES.txt @@ -1,6 +1,6 @@ -1. Get Argo UI external IP/domain by running: +1. Get Argo Server external IP/domain by running: -kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-{{ .Values.uiName }} +kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-{{ .Values.server.name }} 2. Submit the hello-world workflow by running: diff --git a/charts/argo/templates/cron-workflow-crd.yaml b/charts/argo/templates/cron-workflow-crd.yaml new file mode 100644 index 00000000..8bf36ab3 --- /dev/null +++ b/charts/argo/templates/cron-workflow-crd.yaml @@ -0,0 +1,19 @@ +{{- if .Values.installCRD }} +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: cronworkflows.argoproj.io + annotations: + helm.sh/hook: crd-install + helm.sh/hook-delete-policy: before-hook-creation +spec: + group: argoproj.io + names: + kind: CronWorkflow + plural: cronworkflows + shortNames: + - cronwf + - cwf + scope: Namespaced + version: v1alpha1 +{{- end }} \ No newline at end of file diff --git a/charts/argo/templates/ui-cluster-role.yaml b/charts/argo/templates/server-cluster-role.yaml similarity index 54% rename from charts/argo/templates/ui-cluster-role.yaml rename to charts/argo/templates/server-cluster-role.yaml index 7540e8fd..fbf8d044 100644 --- a/charts/argo/templates/ui-cluster-role.yaml +++ b/charts/argo/templates/server-cluster-role.yaml @@ -1,9 +1,23 @@ -{{- if .Values.ui.enabled }} +{{- if .Values.server.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ .Release.Name }}-{{ .Values.ui.name}}-cluster-role + name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-role rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - watch + - list +- apiGroups: + - "" + resources: + - secrets + verbs: + - get - apiGroups: - "" resources: @@ -25,8 +39,13 @@ rules: resources: - workflows - workflowtemplates + - cronworkflows verbs: + - create - get - list - watch + - update + - patch + - delete {{- end }} diff --git a/charts/argo/templates/ui-crb.yaml b/charts/argo/templates/server-crb.yaml similarity index 52% rename from charts/argo/templates/ui-crb.yaml rename to charts/argo/templates/server-crb.yaml index 9b7089f5..e764b847 100644 --- a/charts/argo/templates/ui-crb.yaml +++ b/charts/argo/templates/server-crb.yaml @@ -1,14 +1,14 @@ -{{- if .Values.ui.enabled -}} +{{- if .Values.server.enabled -}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ .Release.Name }}-{{ .Values.ui.name}}-crb + name: {{ .Release.Name }}-{{ .Values.server.name}}-crb roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ .Release.Name }}-{{ .Values.ui.name}}-cluster-role + name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-role subjects: - kind: ServiceAccount - name: {{ .Values.ui.serviceAccount }} + name: {{ .Values.server.serviceAccount }} namespace: {{ .Release.Namespace }} {{- end -}} diff --git a/charts/argo/templates/server-deployment-pdb.yaml b/charts/argo/templates/server-deployment-pdb.yaml new file mode 100644 index 00000000..31f1d4f8 --- /dev/null +++ b/charts/argo/templates/server-deployment-pdb.yaml @@ -0,0 +1,25 @@ +{{- if .Values.server.enabled -}} +{{- if .Values.server.pdb.enabled -}} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ .Release.Name }}-{{ .Values.server.name}} + labels: + app: {{ .Release.Name }}-{{ .Values.server.name}} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + {{- if .Values.server.pdb.minAvailable }} + minAvailable: {{ .Values.server.pdb.minAvailable }} + {{- else if .Values.server.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.server.pdb.maxUnavailable }} + {{- else }} + minAvailable: 0 + {{- end }} + selector: + matchLabels: + app: {{ .Release.Name }}-{{ .Values.server.name}} + release: {{ .Release.Name }} +{{- end -}} +{{- end -}} diff --git a/charts/argo/templates/server-deployment.yaml b/charts/argo/templates/server-deployment.yaml new file mode 100644 index 00000000..ddb1821d --- /dev/null +++ b/charts/argo/templates/server-deployment.yaml @@ -0,0 +1,78 @@ + +{{- if .Values.server.enabled -}}apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-{{ .Values.server.name}} + labels: + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.server.replicas }} + selector: + matchLabels: + app: {{ .Release.Name }}-{{ .Values.server.name}} + release: {{ .Release.Name }} + app: {{ .Release.Name }}-{{ .Values.server.name}} + template: + metadata: + labels: + app: {{ .Release.Name }}-{{ .Values.server.name}} + release: {{ .Release.Name }} + {{- if .Values.server.podLabels }} + {{- toYaml .Values.server.podLabels | nindent 8 }} + {{- end }} + {{- if .Values.server.podAnnotations }} + annotations: +{{ toYaml .Values.server.podAnnotations | indent 8}}{{- end }} + spec: + serviceAccountName: {{ .Values.server.serviceAccount | quote }} + containers: + - name: argo-server + args: + - server + image: "{{ .Values.images.namespace }}/{{ .Values.images.server }}:{{ default .Values.images.tag .Values.server.image.tag }}" + imagePullPolicy: {{ .Values.images.pullPolicy }} + {{- if .Values.server.podPortName }} + ports: + - name: {{ .Values.server.podPortName }} + ports: + containerPort: 2746 + readinessProbe: + httpGet: + path: / + port: 2746 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 20 + {{- end }} + env: + {{- if .Values.server.forceNamespaceIsolation }} + - name: FORCE_NAMESPACE_ISOLATION + value: "true" + {{- end }} + - name: IN_CLUSTER + value: "true" + - name: ARGO_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: BASE_HREF + value: / + resources: + {{- toYaml .Values.server.resources | nindent 12 }} + {{- with .Values.server.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.server.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.server.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + +{{- end -}} diff --git a/charts/argo/templates/ui-ingress.yaml b/charts/argo/templates/server-ingress.yaml similarity index 52% rename from charts/argo/templates/ui-ingress.yaml rename to charts/argo/templates/server-ingress.yaml index 590d763b..5786e257 100644 --- a/charts/argo/templates/ui-ingress.yaml +++ b/charts/argo/templates/server-ingress.yaml @@ -1,22 +1,22 @@ -{{- if .Values.ui.enabled -}} -{{- if .Values.ui.ingress.enabled -}} -{{- $serviceName := printf "%s-%s" .Release.Name .Values.ui.name -}} -{{- $servicePort := .Values.ui.servicePort -}} +{{- if .Values.server.enabled -}} +{{- if .Values.server.ingress.enabled -}} +{{- $serviceName := printf "%s-%s" .Release.Name .Values.server.name -}} +{{- $servicePort := .Values.server.servicePort -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: - name: {{ .Release.Name }}-{{ .Values.ui.name }} + name: {{ .Release.Name }}-{{ .Values.server.name }} labels: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} annotations: - {{- range $key, $value := .Values.ui.ingress.annotations }} + {{- range $key, $value := .Values.server.ingress.annotations }} {{ $key }}: {{ $value | quote }} {{- end }} spec: rules: - {{- range .Values.ui.ingress.hosts }} + {{- range .Values.server.ingress.hosts }} - host: {{ . }} http: paths: @@ -24,9 +24,9 @@ spec: serviceName: {{ $serviceName }} servicePort: {{ $servicePort }} {{- end -}} - {{- if .Values.ui.ingress.tls }} + {{- if .Values.server.ingress.tls }} tls: -{{ toYaml .Values.ui.ingress.tls | indent 4 }} +{{ toYaml .Values.server.ingress.tls | indent 4 }} {{- end -}} {{- end -}} {{- end -}} diff --git a/charts/argo/templates/server-sa.yaml b/charts/argo/templates/server-sa.yaml new file mode 100644 index 00000000..8027811e --- /dev/null +++ b/charts/argo/templates/server-sa.yaml @@ -0,0 +1,6 @@ +{{- if .Values.server.enabled -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ .Values.server.serviceAccount }} +{{- end -}} diff --git a/charts/argo/templates/server-service.yaml b/charts/argo/templates/server-service.yaml new file mode 100644 index 00000000..ba4d74f6 --- /dev/null +++ b/charts/argo/templates/server-service.yaml @@ -0,0 +1,33 @@ +{{- if .Values.server.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-{{ .Values.server.name }} + labels: + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + {{- if .Values.server.serviceLabels }} + {{- toYaml .Values.server.serviceLabels | nindent 4 }} + {{- end }} + {{- if .Values.server.serviceAnnotations }} + annotations: +{{ toYaml .Values.server.serviceAnnotations | indent 4}}{{- end }} +spec: + ports: + - port: {{ .Values.server.servicePort }} + {{- if .Values.server.servicePortName }} + name: {{ .Values.server.servicePortName }} + {{- end }} + targetPort: 2746 + selector: + app: {{ .Release.Name }}-{{ .Values.server.name }} + sessionAffinity: None + type: {{ .Values.server.serviceType }} + {{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerIP }} + loadBalancerIP: {{ .Values.server.loadBalancerIP | quote }} + {{- end }} + {{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerSourceRanges }} + loadBalancerSourceRanges: +{{ toYaml .Values.server.loadBalancerSourceRanges | indent 4 }}{{- end }} +{{- end -}} diff --git a/charts/argo/templates/ui-deployment-pdb.yaml b/charts/argo/templates/ui-deployment-pdb.yaml deleted file mode 100644 index 333c7bc1..00000000 --- a/charts/argo/templates/ui-deployment-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.ui.enabled -}} -{{- if .Values.ui.pdb.enabled -}} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ .Release.Name }}-{{ .Values.ui.name}} - labels: - app: {{ .Release.Name }}-{{ .Values.ui.name}} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - {{- if .Values.ui.pdb.minAvailable }} - minAvailable: {{ .Values.ui.pdb.minAvailable }} - {{- else if .Values.ui.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.ui.pdb.maxUnavailable }} - {{- else }} - minAvailable: 0 - {{- end }} - selector: - matchLabels: - app: {{ .Release.Name }}-{{ .Values.ui.name}} - release: {{ .Release.Name }} -{{- end -}} -{{- end -}} diff --git a/charts/argo/templates/ui-deployment.yaml b/charts/argo/templates/ui-deployment.yaml deleted file mode 100644 index 9d0f1c41..00000000 --- a/charts/argo/templates/ui-deployment.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{{- if .Values.ui.enabled -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-{{ .Values.ui.name}} - labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.ui.replicas }} - selector: - matchLabels: - app: {{ .Release.Name }}-{{ .Values.ui.name}} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ .Release.Name }}-{{ .Values.ui.name}} - release: {{ .Release.Name }} - {{- if .Values.ui.podLabels }} - {{- toYaml .Values.ui.podLabels | nindent 8 }} - {{- end }} - {{- if .Values.ui.podAnnotations }} - annotations: -{{ toYaml .Values.ui.podAnnotations | indent 8}}{{- end }} - spec: - serviceAccountName: {{ .Values.ui.serviceAccount | quote }} - containers: - - name: ui - image: "{{ .Values.images.namespace }}/{{ .Values.images.ui }}:{{ default .Values.images.tag .Values.ui.image.tag }}" - imagePullPolicy: {{ .Values.images.pullPolicy }} - {{- if .Values.ui.podPortName }} - ports: - - name: {{ .Values.ui.podPortName }} - containerPort: 8001 - protocol: TCP - {{- end }} - env: - {{- if .Values.ui.forceNamespaceIsolation }} - - name: FORCE_NAMESPACE_ISOLATION - value: "true" - {{- end }} - - name: IN_CLUSTER - value: "true" - - name: ARGO_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: BASE_HREF - value: {{ .Values.ui.baseHref }} - resources: - {{- toYaml .Values.ui.resources | nindent 12 }} - {{- with .Values.ui.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ui.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.ui.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - -{{- end -}} diff --git a/charts/argo/templates/ui-sa.yaml b/charts/argo/templates/ui-sa.yaml deleted file mode 100644 index eebd359c..00000000 --- a/charts/argo/templates/ui-sa.yaml +++ /dev/null @@ -1,6 +0,0 @@ -{{- if .Values.ui.enabled -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.ui.serviceAccount }} -{{- end -}} diff --git a/charts/argo/templates/ui-service.yaml b/charts/argo/templates/ui-service.yaml deleted file mode 100644 index 5f84e246..00000000 --- a/charts/argo/templates/ui-service.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if .Values.ui.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }}-{{ .Values.ui.name }} - labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.ui.serviceLabels }} - {{- toYaml .Values.ui.serviceLabels | nindent 4 }} - {{- end }} - {{- if .Values.ui.serviceAnnotations }} - annotations: -{{ toYaml .Values.ui.serviceAnnotations | indent 4}}{{- end }} -spec: - ports: - - port: {{ .Values.ui.servicePort }} - {{- if .Values.ui.servicePortName }} - name: {{ .Values.ui.servicePortName }} - {{- end }} - protocol: TCP - targetPort: 8001 - selector: - app: {{ .Release.Name }}-{{ .Values.ui.name }} - sessionAffinity: None - type: {{ .Values.ui.serviceType }} - {{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerIP }} - loadBalancerIP: {{ .Values.ui.loadBalancerIP | quote }} - {{- end }} - {{- if and (eq .Values.ui.serviceType "LoadBalancer") .Values.ui.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.ui.loadBalancerSourceRanges | indent 4 }}{{- end }} -{{- end -}} diff --git a/charts/argo/templates/workflow-aggregate-roles.yaml b/charts/argo/templates/workflow-aggregate-roles.yaml index a6d3a7dd..d817ead7 100644 --- a/charts/argo/templates/workflow-aggregate-roles.yaml +++ b/charts/argo/templates/workflow-aggregate-roles.yaml @@ -16,6 +16,8 @@ rules: - workflows/finalizers - workflowtemplates - workflowtemplates/finalizers + - cronworkflows + - cronworkflows/finalizers verbs: - get - list @@ -38,6 +40,8 @@ rules: - workflows/finalizers - workflowtemplates - workflowtemplates/finalizers + - cronworkflows + - cronworkflows/finalizers verbs: - create - delete @@ -65,6 +69,8 @@ rules: - workflows/finalizers - workflowtemplates - workflowtemplates/finalizers + - cronworkflows + - cronworkflows/finalizers verbs: - create - delete diff --git a/charts/argo/templates/workflow-controller-clusterrole.yaml b/charts/argo/templates/workflow-controller-clusterrole.yaml index 57013987..8df46229 100644 --- a/charts/argo/templates/workflow-controller-clusterrole.yaml +++ b/charts/argo/templates/workflow-controller-clusterrole.yaml @@ -43,6 +43,7 @@ rules: - update - patch - delete + - create - apiGroups: - argoproj.io resources: @@ -52,6 +53,24 @@ rules: - get - list - watch +- apiGroups: + - argoproj.io + resources: + - cronworkflows + - cronworkflows/finalizers + verbs: + - get + - list + - watch + - update + - patch + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create - apiGroups: - "" resources: diff --git a/charts/argo/templates/workflow-crd.yaml b/charts/argo/templates/workflow-crd.yaml index bada1925..dca2e1bc 100644 --- a/charts/argo/templates/workflow-crd.yaml +++ b/charts/argo/templates/workflow-crd.yaml @@ -7,12 +7,22 @@ metadata: helm.sh/hook: crd-install helm.sh/hook-delete-policy: before-hook-creation spec: + additionalPrinterColumns: + - JSONPath: .status.phase + description: Status of the workflow + name: Status + type: string + - JSONPath: .status.startedAt + description: When the workflow was started + format: date-time + name: Age + type: date group: argoproj.io - version: v1alpha1 - scope: Namespaced names: kind: Workflow plural: workflows shortNames: - wf + scope: Namespaced + version: v1alpha1 {{- end }} diff --git a/charts/argo/values.yaml b/charts/argo/values.yaml index 12c1c58f..4823e925 100644 --- a/charts/argo/values.yaml +++ b/charts/argo/values.yaml @@ -1,10 +1,10 @@ images: namespace: argoproj controller: workflow-controller - ui: argoui + server: argocli executor: argoexec pullPolicy: Always - tag: v2.4.3 + tag: v2.6.1 crdVersion: v1alpha1 installCRD: true @@ -100,7 +100,7 @@ executor: # Overrides .images.tag if defined. tag: "" -ui: +server: enabled: true # only show workflows where UI installed forceNamespaceIsolation: false @@ -113,11 +113,11 @@ ui: podAnnotations: {} # Optional labels to add to the UI pods podLabels: {} - name: ui + name: server serviceType: ClusterIP - servicePort: 80 + servicePort: 2746 # servicePortName: http - serviceAccount: argo-ui + serviceAccount: argo-server # Annotations to be applied to the UI Service serviceAnnotations: {} # Optional labels to add to the UI Service