diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 5db1fbc3..168f8edb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -11,6 +11,23 @@ body: validations: required: true +- type: dropdown + attributes: + label: Related helm chart + description: You may select more than one. + multiple: true + options: + - argo-cd + - argo-events + - argo-rollouts + - argo-workflows + - argocd-applicationset + - argocd-image-updater + - argocd-notifications + - other + validations: + required: true + - type: textarea attributes: label: To Reproduce diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 2ff5ab68..2fa38441 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -13,6 +13,23 @@ body: validations: required: false +- type: dropdown + attributes: + label: Related helm chart + description: You may select more than one. + multiple: true + options: + - argo-cd + - argo-events + - argo-rollouts + - argo-workflows + - argocd-applicationset + - argocd-image-updater + - argocd-notifications + - other + validations: + required: true + - type: textarea attributes: label: Describe the solution you'd like diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 03965cc5..5947dfc3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -7,7 +7,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3 + - uses: actions/stale@v4 with: repo-token: ${{ secrets.GITHUB_TOKEN }} # Number of days of inactivity before an issue becomes stale diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 58cd634e..a68ababd 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.1.2 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.17.6 +version: 3.22.1 home: https://github.com/argoproj/argo-helm icon: https://argoproj.github.io/argo-cd/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Changed]: Upgrade argocd to 2.1.2" + - "[Fixed]: repoServer.extraContainers unused" diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 99114a91..95a938dc 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -175,19 +175,25 @@ NAME: my-release | configs.secret.extra | add additional secrets to be added to argocd-secret | `{}` | | configs.styles | Define custom CSS styles for your argo instance ([Read More](https://argo-cd.readthedocs.io/en/stable/operator-manual/custom-styles/)). This Settings will automatically mount the provided css and reference it in the argo configuration. | `""` (See [values.yaml](values.yaml)) | | openshift.enabled | enables using arbitrary uid for argo repo server | `false` | +| server.additionalApplications | Deploy ArgoCD Applications within this helm release | `[]` (See [values.yaml](values.yaml)) | +| server.additionalProjects | Deploy ArgoCD Projects within this helm release | `[]` (See [values.yaml](values.yaml)) | ## ArgoCD Controller | Parameter | Description | Default | |-----|---------|-------------| | controller.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| controller.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | controller.args.operationProcessors | define the controller `--operation-processors` | `"10"` | | controller.args.appResyncPeriod | define the controller `--app-resync` | `"180"` | | controller.args.selfHealTimeout | define the controller `--self-heal-timeout-seconds` | `"5"` | | controller.args.statusProcessors | define the controller `--status-processors` | `"20"` | | controller.clusterAdminAccess.enabled | Enable RBAC for local cluster deployments. | `true` | +| controller.clusterRoleRules.enabled | Enable custom rules for the Application Controller's Cluster Role resource. | `false` | +| controller.clusterRoleRules.rules | List of custom rules for the Application Controller's Cluster Role resource. | `[]` | | controller.containerPort | Controller listening port. | `8082` | | controller.extraArgs | Additional arguments for the controller. A list of flags | `[]` | +| controller.extraContainers | Additional containers for the controller. A list of containers. | `[]` | | controller.enableStatefulSet | Enable deploying the controller as a StatefulSet instead of a Deployment. Used for HA installations. | `false` | | controller.env | Environment variables for the controller. | `[]` | | controller.envFrom | `envFrom` to pass to the controller. | `[]` (See [values.yaml](values.yaml)) | @@ -236,13 +242,18 @@ NAME: my-release | Property | Description | Default | |-----|---------|-------------| | repoServer.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| repoServer.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | repoServer.autoscaling.enabled | Enable Horizontal Pod Autoscaler ([HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)) for the repo server | `false` | | repoServer.autoscaling.minReplicas | Minimum number of replicas for the repo server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `1` | | repoServer.autoscaling.maxReplicas | Maximum number of replicas for the repo server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `5` | | repoServer.autoscaling.targetCPUUtilizationPercentage | Average CPU utilization percentage for the repo server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `50` | | repoServer.autoscaling.targetMemoryUtilizationPercentage | Average memory utilization percentage for the repo server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `50` | +| repoServer.clusterAdminAccess.enabled | Enable RBAC for local cluster deployments. | `false` | +| repoServer.clusterRoleRules.enabled | Enable custom rules for the Repo server's Cluster Role resource. | `false` | +| repoServer.clusterRoleRules.rules | List of custom rules for the Repo server's Cluster Role resource. | `[]` | | repoServer.containerPort | Repo server port | `8081` | | repoServer.extraArgs | Additional arguments for the repo server. A list of flags. | `[]` | +| repoServer.extraContainers | Additional containers for the repo server. A list of containers. | `[]` | | repoServer.env | Environment variables for the repo server. | `[]` | | repoServer.envFrom | `envFrom` to pass to the repo server. | `[]` (See [values.yaml](values.yaml)) | | repoServer.image.repository | Repository to use for the repo server | `global.image.repository` | @@ -290,6 +301,7 @@ NAME: my-release | Parameter | Description | Default | |-----|---------|-------------| | server.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| server.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | server.autoscaling.enabled | Enable Horizontal Pod Autoscaler ([HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)) for the server | `false` | | server.autoscaling.minReplicas | Minimum number of replicas for the server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `1` | | server.autoscaling.maxReplicas | Maximum number of replicas for the server [HPA](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) | `5` | @@ -385,6 +397,7 @@ NAME: my-release | Property | Description | Default | |-----|---------|-------------| | dex.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| dex.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | dex.containerPortGrpc | GRPC container port | `5557` | | dex.containerPortHttp | HTTP container port | `5556` | | dex.enabled | Enable dex | `true` | @@ -402,6 +415,7 @@ NAME: my-release | dex.metrics.serviceMonitor.relabelings | Prometheus [RelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) to apply to samples before scraping | `[]` | | dex.metrics.serviceMonitor.metricRelabelings | Prometheus [MetricRelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs) to apply to samples before ingestion | `[]` | | dex.name | Dex name | `"dex-server"` | +| dex.extraContainers | Additional containers for the Dex server. A list of containers. | `[]` | | dex.env | Environment variables for the Dex server. | `[]` | | dex.envFrom | `envFrom` to pass to the Dex server. | `[]` (See [values.yaml](values.yaml)) | | dex.nodeSelector | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) | `{}` | @@ -443,12 +457,14 @@ through `xxx.extraArgs` | Parameter | Description | Default | |-----|---------|-------------| | redis.affinity | [Assign custom affinity rules to the deployment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/) | `{}` | +| redis.topologySpreadConstraints | [Assign custom topologySpreadConstraints rules to the deployment](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `[]` | | redis.containerPort | Redis container port | `6379` | | redis.enabled | Enable redis | `true` | | redis.image.imagePullPolicy | Redis imagePullPolicy | `"IfNotPresent"` | | redis.image.repository | Redis repository | `"redis"` | | redis.image.tag | Redis tag | `"6.2.1-alpine"` | | redis.extraArgs | Additional arguments for the `redis-server`. A list of flags. | `[]` | +| redis.extraContainers | Additional containers for the redis. A list of containers. | `[]` | | redis.name | Redis name | `"redis"` | | redis.env | Environment variables for the Redis server. | `[]` | | redis.envFrom | `envFrom` to pass to the Redis server. | `[]` (See [values.yaml](values.yaml)) | @@ -460,6 +476,25 @@ through `xxx.extraArgs` | redis.securityContext | Redis Pod Security Context | See [values.yaml](values.yaml) | | redis.servicePort | Redis service port | `6379` | | redis.tolerations | [Tolerations for use with node taints](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` | +| redis.metrics.enabled | Deploy metrics service and redis-exporter sidecar | `false` | +| redis.metrics.image.repository | redis-exporter image repository | `quay.io/bitnami/redis-exporter` | +| redis.metrics.image.tag | redis-exporter image tag | `1.26.0-debian-10-r2` | +| redis.metrics.image.imagePullPolicy | redis-exporter image PullPolicy | `IfNotPresent` | +| redis.metrics.containerPort | Port to use for redis-exporter sidecar | `9121` | +| redis.metrics.resources | Resource limits and requests for redis-exporter sidecar | `{}` | +| redis.metrics.service.type | Metrics service type | `ClusterIP` | +| redis.metrics.service.clusterIP | Metrics service clusterIP. `None` makes a "headless service" (no virtual IP) | `None` | +| redis.metrics.service.annotations | Metrics service annotations | `{}` | +| redis.metrics.service.labels | Metrics service labels | `{}` | +| redis.metrics.service.servicePort | Metrics service port | `9121` | +| redis.metrics.service.portName | Metrics service port name | `http-metrics` | +| redis.metrics.serviceMonitor.enabled | Enable a prometheus ServiceMonitor | `false` | +| redis.metrics.serviceMonitor.interval | Interval at which metrics should be scraped | `30s` | +| redis.metrics.serviceMonitor.relabelings | Prometheus [RelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) to apply to samples before scraping | `[]` | +| redis.metrics.serviceMonitor.metricRelabelings | Prometheus [MetricRelabelConfigs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs) to apply to samples before ingestion | `[]` | +| redis.metrics.serviceMonitor.selector | Prometheus ServiceMonitor selector labels | `{}` | +| redis.metrics.serviceMonitor.namespace | Prometheus ServiceMonitor namespace | `` | +| redis.metrics.serviceMonitor.additionalLabels | Additional labels to add to the Prometheus ServiceMonitor | `{}` | | redis-ha | Configures [Redis HA subchart](https://github.com/DandyDeveloper/charts/tree/master/charts/redis-ha) The properties below have been changed from the subchart defaults | | | redis-ha.enabled | Enables the Redis HA subchart and disables the custom Redis single node deployment| `false` | | redis-ha.exporter.enabled | If `true`, the prometheus exporter sidecar is enabled | `true` | diff --git a/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml b/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml index bd6ff8aa..0aa82961 100644 --- a/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml @@ -6,9 +6,9 @@ metadata: labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} rules: -{{- if .Values.controller.clusterRoleRules.enabled }} -{{- toYaml .Values.controller.clusterRoleRules.rules | nindent 2 }} -{{ else }} + {{- if .Values.controller.clusterRoleRules.enabled }} + {{- toYaml .Values.controller.clusterRoleRules.rules | nindent 0 }} + {{- else }} - apiGroups: - '*' resources: @@ -19,5 +19,5 @@ rules: - '*' verbs: - '*' -{{- end }} + {{- end }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index a75c1af1..b924ea41 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -17,14 +17,14 @@ spec: replicas: {{ .Values.controller.replicas }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.controller.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.controller.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.controller.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.controller.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.controller.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -105,7 +105,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} resources: -{{- toYaml .Values.controller.resources | nindent 10 }} + {{- toYaml .Values.controller.resources | nindent 10 }} + {{- with .Values.controller.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.controller.nodeSelector }} nodeSelector: {{- toYaml .Values.controller.nodeSelector | nindent 8 }} @@ -117,12 +120,23 @@ spec: {{- if .Values.controller.affinity }} affinity: {{- toYaml .Values.controller.affinity | nindent 8 }} + {{- end }} + {{- with .Values.controller.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.controller.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.controllerServiceAccountName" . }} -{{- with .Values.global.hostAliases }} + {{- with .Values.global.hostAliases }} hostAliases: -{{ toYaml . | indent 6 }} -{{- end }} + {{- toYaml . | nindent 6 }} + {{- end }} volumes: - emptyDir: {} name: argocd-home diff --git a/charts/argo-cd/templates/argocd-repo-server/clusterrole.yaml b/charts/argo-cd/templates/argocd-repo-server/clusterrole.yaml new file mode 100644 index 00000000..4ea41da3 --- /dev/null +++ b/charts/argo-cd/templates/argocd-repo-server/clusterrole.yaml @@ -0,0 +1,23 @@ +{{- if and .Values.repoServer.serviceAccount.create .Values.repoServer.clusterAdminAccess.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "argo-cd.repoServer.fullname" . }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} +rules: + {{- if .Values.repoServer.clusterRoleRules.enabled }} + {{- toYaml .Values.repoServer.clusterRoleRules.rules | nindent 0 }} + {{- else }} +- apiGroups: + - '*' + resources: + - '*' + verbs: + - '*' +- nonResourceURLs: + - '*' + verbs: + - '*' + {{- end }} +{{- end }} diff --git a/charts/argo-cd/templates/argocd-repo-server/clusterrolebinding.yaml b/charts/argo-cd/templates/argocd-repo-server/clusterrolebinding.yaml new file mode 100644 index 00000000..9757912e --- /dev/null +++ b/charts/argo-cd/templates/argocd-repo-server/clusterrolebinding.yaml @@ -0,0 +1,16 @@ +{{- if and .Values.repoServer.serviceAccount.create .Values.repoServer.clusterAdminAccess.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "argo-cd.repoServer.fullname" . }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "argo-cd.repoServer.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ template "argo-cd.repoServerServiceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 9b4c3400..3c86cb8f 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -16,14 +16,14 @@ spec: {{- end }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.repoServer.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.repoServer.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.repoServer.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.repoServer.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.repoServer.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -113,7 +113,10 @@ spec: successThreshold: {{ .Values.repoServer.readinessProbe.successThreshold }} failureThreshold: {{ .Values.repoServer.readinessProbe.failureThreshold }} resources: -{{- toYaml .Values.repoServer.resources | nindent 10 }} + {{- toYaml .Values.repoServer.resources | nindent 10 }} + {{- with .Values.repoServer.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.repoServer.nodeSelector }} nodeSelector: {{- toYaml .Values.repoServer.nodeSelector | nindent 8 }} @@ -125,12 +128,23 @@ spec: {{- if .Values.repoServer.affinity }} affinity: {{- toYaml .Values.repoServer.affinity | nindent 8 }} + {{- end }} + {{- with .Values.repoServer.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.repoServer.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.repoServerServiceAccountName" . }} -{{- with .Values.global.hostAliases }} + {{- with .Values.global.hostAliases }} hostAliases: -{{ toYaml . | indent 6 }} -{{- end }} + {{- toYaml . | nindent 6 }} + {{- end }} volumes: {{- if .Values.repoServer.volumes }} {{- toYaml .Values.repoServer.volumes | nindent 6 }} diff --git a/charts/argo-cd/templates/argocd-server/applications.yaml b/charts/argo-cd/templates/argocd-server/applications.yaml index 1b9d424a..d4d6171b 100644 --- a/charts/argo-cd/templates/argocd-server/applications.yaml +++ b/charts/argo-cd/templates/argocd-server/applications.yaml @@ -2,41 +2,45 @@ apiVersion: v1 kind: List items: -{{- range .Values.server.additionalApplications }} + {{- range .Values.server.additionalApplications }} - apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - {{- if .additionalAnnotations }} + {{- with .additionalAnnotations }} annotations: - {{- range $key, $value := .additionalAnnotations }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} + {{- end }} {{- end }} - {{- end }} - {{- if .additionalLabels }} + {{- with .additionalLabels }} labels: -{{- toYaml .additionalLabels | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} name: {{ .name }} - {{- if .namespace }} - namespace: {{ .namespace }} + {{- with .namespace }} + namespace: {{ . }} {{- end }} - {{- if .finalizers }} + {{- with .finalizers }} finalizers: -{{- toYaml .finalizers | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: project: {{ tpl .project $ }} source: -{{- toYaml .source | nindent 8 }} + {{- toYaml .source | nindent 8 }} destination: -{{- toYaml .destination | nindent 8 }} - {{- if .syncPolicy }} + {{- toYaml .destination | nindent 8 }} + {{- with .syncPolicy }} syncPolicy: -{{- toYaml .syncPolicy | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .ignoreDifferences }} + {{- with .ignoreDifferences }} ignoreDifferences: -{{- toYaml .ignoreDifferences | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} -{{- end }} + {{- with .info }} + info: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 05d1a5ae..38cd5cbf 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -16,14 +16,14 @@ spec: {{- end }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.server.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.server.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }} app.kubernetes.io/version: {{ default .Values.global.image.tag .Values.server.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.server.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.server.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -120,14 +120,14 @@ spec: successThreshold: {{ .Values.server.readinessProbe.successThreshold }} failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }} resources: -{{- toYaml .Values.server.resources | nindent 10 }} - {{- if .Values.server.lifecycle }} + {{- toYaml .Values.server.resources | nindent 10 }} + {{- if .Values.server.lifecycle }} lifecycle: -{{- toYaml .Values.server.lifecycle | nindent 10 }} + {{- toYaml .Values.server.lifecycle | nindent 10 }} + {{- end }} + {{- with .Values.server.extraContainers }} + {{- toYaml . | nindent 6 }} {{- end }} - {{- if .Values.server.extraContainers }} -{{- toYaml .Values.server.extraContainers | nindent 6 }} - {{- end }} {{- if .Values.server.nodeSelector }} nodeSelector: {{- toYaml .Values.server.nodeSelector | nindent 8 }} @@ -139,12 +139,23 @@ spec: {{- if .Values.server.affinity }} affinity: {{- toYaml .Values.server.affinity | nindent 8 }} + {{- end }} + {{- with .Values.server.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.server.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.serverServiceAccountName" . }} -{{- with .Values.global.hostAliases }} + {{- with .Values.global.hostAliases }} hostAliases: -{{ toYaml . | indent 6 }} -{{- end }} + {{- toYaml . | nindent 6 }} + {{- end }} volumes: {{- if .Values.server.volumes }} {{- toYaml .Values.server.volumes | nindent 6}} diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 97951d01..17043a95 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -12,14 +12,14 @@ spec: {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.dex.name) | nindent 6 }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.dex.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.dex.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.dex.name "name" .Values.dex.name) | nindent 8 }} app.kubernetes.io/version: {{ .Values.dex.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.dex.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.dex.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -99,7 +99,10 @@ spec: {{- toYaml .Values.dex.volumeMounts | nindent 8 }} {{- end }} resources: -{{- toYaml .Values.dex.resources | nindent 10 }} + {{- toYaml .Values.dex.resources | nindent 10 }} + {{- with .Values.dex.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.dex.nodeSelector }} nodeSelector: {{- toYaml .Values.dex.nodeSelector | nindent 8 }} @@ -111,8 +114,23 @@ spec: {{- if .Values.dex.affinity }} affinity: {{- toYaml .Values.dex.affinity | nindent 8 }} + {{- end }} + {{- with .Values.dex.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" $ "name" $.Values.dex.name) | nindent 12 }} + {{- end }} + {{- end }} {{- end }} serviceAccountName: {{ template "argo-cd.dexServiceAccountName" . }} + {{- with .Values.global.hostAliases }} + hostAliases: + {{- toYaml . | nindent 6 }} + {{- end }} volumes: - emptyDir: {} name: tmp-dir diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index 05d9f43d..fa01c7b4 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -13,14 +13,14 @@ spec: app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.redis.name }} template: metadata: - {{- with (mergeOverwrite .Values.global.podAnnotations .Values.redis.podAnnotations) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podAnnotations) .Values.redis.podAnnotations) }} annotations: {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 8 }} app.kubernetes.io/version: {{ .Values.redis.image.tag | quote }} - {{- with (mergeOverwrite .Values.global.podLabels .Values.redis.podLabels) }} + {{- with (mergeOverwrite (deepCopy .Values.global.podLabels) .Values.redis.podLabels) }} {{- toYaml . | nindent 8 }} {{- end }} spec: @@ -64,6 +64,27 @@ spec: {{- end }} resources: {{- toYaml .Values.redis.resources | nindent 10 }} + {{- if .Values.redis.metrics.enabled }} + - name: metrics + env: + - name: REDIS_ADDR + value: {{ printf "redis://localhost:%v" .Values.redis.containerPort }} + - name: REDIS_EXPORTER_WEB_LISTEN_ADDRESS + value: {{ printf "0.0.0.0:%v" .Values.redis.metrics.containerPort }} + image: {{ .Values.redis.metrics.image.repository }}:{{ .Values.redis.metrics.image.tag }} + imagePullPolicy: {{ .Values.redis.metrics.image.imagePullPolicy}} + ports: + - containerPort: {{ .Values.redis.metrics.containerPort }} + name: metrics + protocol: TCP + resources: {{- toYaml .Values.redis.metrics.resources | nindent 10 }} + {{- with .Values.redis.containerSecurityContext }} + securityContext: {{- toYaml . | nindent 10 }} + {{- end }} + {{- end }} + {{- with .Values.redis.extraContainers }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.redis.nodeSelector }} nodeSelector: {{- toYaml .Values.redis.nodeSelector | nindent 8 }} @@ -76,6 +97,17 @@ spec: affinity: {{- toYaml .Values.redis.affinity | nindent 8 }} {{- end }} + {{- with .Values.redis.topologySpreadConstraints }} + topologySpreadConstraints: + {{- range $constraint := . }} + - {{ toYaml $constraint | nindent 8 | trim }} + {{- if not $constraint.labelSelector }} + labelSelector: + matchLabels: + app.kubernetes.io/name: {{ include "argo-cd.name" $ }}-{{ $.Values.redis.name }} + {{- end }} + {{- end }} + {{- end }} {{- if .Values.redis.volumes }} volumes: {{- toYaml .Values.redis.volumes | nindent 8}} diff --git a/charts/argo-cd/templates/redis/metrics-service.yaml b/charts/argo-cd/templates/redis/metrics-service.yaml new file mode 100644 index 00000000..e799b5ea --- /dev/null +++ b/charts/argo-cd/templates/redis/metrics-service.yaml @@ -0,0 +1,28 @@ +{{- $redisHa := (index .Values "redis-ha") -}} +{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "argo-cd.redis.fullname" . }}-metrics + {{- with .Values.redis.metrics.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} + {{- with .Values.redis.metrics.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.redis.metrics.service.clusterIP }} + clusterIP: {{ . }} + {{- end }} + ports: + - name: {{ .Values.redis.metrics.service.portName }} + protocol: TCP + port: {{ .Values.redis.metrics.service.servicePort }} + targetPort: metrics + selector: + {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} + type: {{ .Values.redis.metrics.service.type }} +{{- end }} diff --git a/charts/argo-cd/templates/redis/networkpolicy.yaml b/charts/argo-cd/templates/redis/networkpolicy.yaml index 881e257c..8b564add 100644 --- a/charts/argo-cd/templates/redis/networkpolicy.yaml +++ b/charts/argo-cd/templates/redis/networkpolicy.yaml @@ -21,6 +21,13 @@ spec: ports: - port: redis protocol: TCP + {{- if .Values.redis.metrics.enabled }} + - from: + - namespaceSelector: {} + ports: + - port: metrics + protocol: TCP + {{- end }} podSelector: matchLabels: {{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.redis.name) | nindent 6 }} diff --git a/charts/argo-cd/templates/redis/servicemonitor.yaml b/charts/argo-cd/templates/redis/servicemonitor.yaml new file mode 100644 index 00000000..b7029b74 --- /dev/null +++ b/charts/argo-cd/templates/redis/servicemonitor.yaml @@ -0,0 +1,39 @@ +{{- $redisHa := (index .Values "redis-ha") -}} +{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.metrics.enabled .Values.redis.metrics.serviceMonitor.enabled -}} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: {{ template "argo-cd.redis.fullname" . }} + {{- with .Values.redis.metrics.serviceMonitor.namespace }} + namespace: {{ . }} + {{- end }} + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} + {{- with .Values.redis.metrics.serviceMonitor.selector }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.redis.metrics.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + endpoints: + - port: {{ .Values.redis.metrics.service.portName }} + {{- with .Values.redis.metrics.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} + path: /metrics + {{- with .Values.redis.metrics.serviceMonitor.relabelings }} + relabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.redis.metrics.serviceMonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 8 }} + {{- end }} + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + selector: + matchLabels: + {{- include "argo-cd.selectorLabels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 6 }} +{{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index 022ecfb2..d914eacf 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -143,6 +143,14 @@ controller: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" resources: {} @@ -220,6 +228,8 @@ controller: enabled: false rules: [] + ## Additional containers to be added to the controller pod. + extraContainers: [] ## Dex dex: @@ -321,6 +331,14 @@ dex: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts @@ -339,6 +357,9 @@ dex: # cpu: 10m # memory: 32Mi + ## Additional containers to be added to the dex pod. + extraContainers: [] + ## Redis redis: enabled: true @@ -385,6 +406,14 @@ redis: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts @@ -419,6 +448,40 @@ redis: volumeMounts: [] volumes: [] + ## Additional containers to be added to the redis pod. + extraContainers: [] + + metrics: + enabled: false + image: + repository: quay.io/bitnami/redis-exporter + tag: 1.26.0-debian-10-r2 + imagePullPolicy: IfNotPresent + containerPort: 9121 + resources: {} + # limits: + # cpu: 50m + # memory: 64Mi + # requests: + # cpu: 10m + # memory: 32Mi + service: + type: ClusterIP + clusterIP: None + annotations: {} + labels: {} + servicePort: 9121 + portName: http-metrics + serviceMonitor: + enabled: false + interval: 30s + relabelings: [] + metricRelabelings: [] + selector: {} + # prometheus: kube-prometheus + # namespace: monitoring + additionalLabels: {} + # This key configures Redis-HA subchart and when enabled (redis-ha.enabled=true) # the custom redis deployment is omitted redis-ha: @@ -527,6 +590,14 @@ server: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts @@ -776,13 +847,21 @@ server: # path: guestbook # directory: # recurse: true - # destination: + # destination: # server: https://kubernetes.default.svc # namespace: guestbook - # syncPolicy: - # automated: - # prune: false - # selfHeal: false + # syncPolicy: + # automated: + # prune: false + # selfHeal: false + # ignoreDifferences: + # - group: apps + # kind: Deployment + # jsonPointers: + # - /spec/replicas + # info: + # - name: url + # value: https://argoproj.github.io/ ## Projects ## reference: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/ @@ -940,6 +1019,14 @@ repoServer: tolerations: [] affinity: {} + # Pod Topology Spread Constraints + # Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ + # If labelSelector is left out, it will default to the labelSelector configuration of the deployment + topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: topology.kubernetes.io/zone + # whenUnsatisfiable: DoNotSchedule + priorityClassName: "" ## Labels to set container specific security contexts @@ -982,6 +1069,17 @@ repoServer: # namespace: monitoring # additionalLabels: {} + ## Enable Admin ClusterRole resources. + ## Enable if you would like to grant cluster rights to ArgoCD repo-server. + clusterAdminAccess: + enabled: false + ## Enable Custom Rules for the Repo server's Cluster Role resource + ## Enable this and set the rules: to whatever custom rules you want for the Cluster Role resource. + ## Defaults to off + clusterRoleRules: + enabled: false + rules: [] + ## Repo server service account ## If create is set to true, make sure to uncomment the name and update the rbac section below serviceAccount: @@ -992,6 +1090,9 @@ repoServer: ## Automount API credentials for the Service Account automountServiceAccountToken: true + ## Additional containers to be added to the repo server pod. + extraContainers: [] + ## Repo server rbac rules # rbac: # - apiGroups: diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index 74431538..a71abd6b 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v1.0.2" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 2.0.1 +version: 2.1.1 icon: https://argoproj.github.io/argo-rollouts/assets/logo.png home: https://github.com/argoproj/argo-helm maintainers: @@ -11,4 +11,4 @@ maintainers: - name: jessesuen annotations: artifacthub.io/changes: | - - "[Fixed]: ServiceMonitor selector labels match metrics Service" + - "[Added]: Two separate tests. One for default values and one for dashboard enabled." diff --git a/charts/argo-rollouts/README.md b/charts/argo-rollouts/README.md index 9fcd862a..52ced182 100644 --- a/charts/argo-rollouts/README.md +++ b/charts/argo-rollouts/README.md @@ -48,6 +48,7 @@ If dashboard is installed by `--set dashboard.enabled=true`, checkout the argo-r | controller.metrics.serviceMonitor.additionalLabels | object | `{}` | Labels to be added to the ServiceMonitor | | imagePullSecrets | list | `[]` | Registry secret names as an array | | installCRDs | bool | `true` | Install and upgrade CRDs | +| keepCRDs | bool | `true` | Keep CRD's on helm uninstall | | crdAnnotations | object | `{}` | Annotations to be added to all CRDs | | podAnnotations | object | `{}` | Annotations to be added to the Rollout pods | | podLabels | object | `{}` | Labels to be added to the Rollout pods | diff --git a/charts/argo-rollouts/ci/default-values.yaml b/charts/argo-rollouts/ci/default-values.yaml new file mode 100644 index 00000000..507f1e54 --- /dev/null +++ b/charts/argo-rollouts/ci/default-values.yaml @@ -0,0 +1 @@ +# Test with default values diff --git a/charts/argo-rollouts/ci/enable-dashboard-values.yaml b/charts/argo-rollouts/ci/enable-dashboard-values.yaml new file mode 100644 index 00000000..5c0a1c04 --- /dev/null +++ b/charts/argo-rollouts/ci/enable-dashboard-values.yaml @@ -0,0 +1,6 @@ +# Test with dashboard enabled +# Do not deploy the CRDs as they are already present from the previous test +installCRDs: false + +dashboard: + enabled: true diff --git a/charts/argo-rollouts/ci/test-values.yaml b/charts/argo-rollouts/ci/test-values.yaml deleted file mode 100644 index 7ea0c4c8..00000000 --- a/charts/argo-rollouts/ci/test-values.yaml +++ /dev/null @@ -1,2 +0,0 @@ -dashboard: - enabled: true diff --git a/charts/argo-rollouts/templates/_helpers.tpl b/charts/argo-rollouts/templates/_helpers.tpl index 2e5153b5..f3611889 100644 --- a/charts/argo-rollouts/templates/_helpers.tpl +++ b/charts/argo-rollouts/templates/_helpers.tpl @@ -38,7 +38,7 @@ Common labels helm.sh/chart: {{ include "argo-rollouts.chart" . }} {{ include "argo-rollouts.selectorLabels" . }} {{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +app.kubernetes.io/version: {{ default .Chart.AppVersion $.Values.controller.image.tag | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/part-of: argo-rollouts diff --git a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml index 08786ca0..1ed7df98 100644 --- a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml index 12fc5340..85eafd38 100644 --- a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} 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 e357b4d2..76866712 100644 --- a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/templates/crds/experiment-crd.yaml b/charts/argo-rollouts/templates/crds/experiment-crd.yaml index 5f9f8cfc..7965030a 100644 --- a/charts/argo-rollouts/templates/crds/experiment-crd.yaml +++ b/charts/argo-rollouts/templates/crds/experiment-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/templates/crds/rollout-crd.yaml b/charts/argo-rollouts/templates/crds/rollout-crd.yaml index 10d0a8e1..748d5897 100644 --- a/charts/argo-rollouts/templates/crds/rollout-crd.yaml +++ b/charts/argo-rollouts/templates/crds/rollout-crd.yaml @@ -4,6 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 + {{- if .Values.keepCRDs }} + "helm.sh/resource-policy": keep + {{- end }} {{- if .Values.crdAnnotations }} {{- toYaml .Values.crdAnnotations | nindent 4 }} {{- end }} diff --git a/charts/argo-rollouts/values.yaml b/charts/argo-rollouts/values.yaml index 4c288b98..f706f1e8 100644 --- a/charts/argo-rollouts/values.yaml +++ b/charts/argo-rollouts/values.yaml @@ -1,4 +1,5 @@ installCRDs: true +keepCRDs: true clusterInstall: true diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index 075e36f4..156c3a0d 100644 --- a/charts/argo-workflows/Chart.yaml +++ b/charts/argo-workflows/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argo-workflows description: A Helm chart for Argo Workflows type: application -version: 0.6.0 +version: 0.8.0 appVersion: "v3.1.8" icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm @@ -15,5 +15,4 @@ maintainers: - name: benjaminws annotations: artifacthub.io/changes: | - - "[Added]: Add controller namespaceParallelism param to configmap" - "[Changed]: Changed default GCP keyFormat" diff --git a/charts/argo-workflows/ci/default-values.yaml b/charts/argo-workflows/ci/default-values.yaml new file mode 100644 index 00000000..507f1e54 --- /dev/null +++ b/charts/argo-workflows/ci/default-values.yaml @@ -0,0 +1 @@ +# Test with default values diff --git a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml index ce6f166b..86c7b709 100644 --- a/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml @@ -14,12 +14,19 @@ data: {{- end }} {{- end }} containerRuntimeExecutor: {{ .Values.controller.containerRuntimeExecutor }} + {{- with .Values.controller.containerRuntimeExecutors }} + containerRuntimeExecutors: + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.controller.parallelism }} parallelism: {{ .Values.controller.parallelism }} {{- end }} {{- with .Values.controller.namespaceParallelism }} namespaceParallelism: {{ . }} {{- end }} + {{- with .Values.controller.initialDelay }} + initialDelay: {{ . }} + {{- end }} {{- if or .Values.executor.resources .Values.executor.env .Values.executor.securityContext}} executor: {{- with .Values.executor.resources }} diff --git a/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml index 7dee67e5..1cd28df2 100644 --- a/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml @@ -75,7 +75,7 @@ spec: resources: {{- toYaml .Values.controller.resources | nindent 12 }} ports: - - name: metrics + - name: {{ .Values.controller.metricsConfig.portName }} containerPort: {{ .Values.controller.metricsConfig.port }} - containerPort: 6060 livenessProbe: {{ .Values.controller.livenessProbe | toYaml | nindent 12 }} diff --git a/charts/argo-workflows/templates/server/server-service.yaml b/charts/argo-workflows/templates/server/server-service.yaml index 5d161ee8..49314e6e 100644 --- a/charts/argo-workflows/templates/server/server-service.yaml +++ b/charts/argo-workflows/templates/server/server-service.yaml @@ -17,6 +17,9 @@ spec: name: {{ . }} {{- end }} targetPort: 2746 + {{- if and (eq .Values.server.serviceType "NodePort") .Values.server.serviceNodePort }} + nodePort: {{ .Values.server.serviceNodePort }} + {{- end }} selector: {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 4 }} sessionAffinity: None diff --git a/charts/argo-workflows/values.yaml b/charts/argo-workflows/values.yaml index ecd8db7b..735bf4e8 100644 --- a/charts/argo-workflows/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -44,6 +44,8 @@ controller: parallelism: # Limits the maximum number of incomplete workflows in a namespace namespaceParallelism: + # Resolves ongoing, uncommon AWS EKS bug: https://github.com/argoproj/argo-workflows/pull/4224 + initialDelay: # podAnnotations is an optional map of annotations to be applied to the controller Pods podAnnotations: {} # Optional labels to add to the controller pods @@ -55,6 +57,7 @@ controller: enabled: false path: /metrics port: 9090 + portName: metrics servicePort: 8080 servicePortName: metrics # the controller container's securityContext @@ -113,6 +116,11 @@ controller: workflowNamespaces: - default containerRuntimeExecutor: docker + # containerRuntimeExecutors: + # - name: emissary + # selector: + # matchLabels: + # workflows.argoproj.io/container-runtime-executor: emissary instanceID: # `instanceID.enabled` configures the controller to filter workflow submissions # to only those which have a matching instanceID attribute. @@ -215,6 +223,7 @@ server: name: server serviceType: ClusterIP servicePort: 2746 + # serviceNodePort: 32746 # servicePortName: http serviceAccount: create: true diff --git a/charts/argocd-applicationset/Chart.yaml b/charts/argocd-applicationset/Chart.yaml index ba9b62cd..652adaf4 100644 --- a/charts/argocd-applicationset/Chart.yaml +++ b/charts/argocd-applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationset description: A Helm chart for installing ArgoCD ApplicationSet type: application -version: 1.4.0 +version: 1.5.1 appVersion: "v0.2.0" home: https://github.com/argoproj/argo-helm icon: https://argocd-applicationset.readthedocs.io/en/stable/assets/logo.png @@ -14,4 +14,4 @@ maintainers: - name: maruina annotations: artifacthub.io/changes: | - - "[Added]: Configuration for Pod labels" + - "[Removed]: Duplicated default values during chart testing" diff --git a/charts/argocd-applicationset/README.md b/charts/argocd-applicationset/README.md index 1683c33b..506880a6 100644 --- a/charts/argocd-applicationset/README.md +++ b/charts/argocd-applicationset/README.md @@ -65,6 +65,7 @@ kubectl apply -k https://github.com/argoproj-labs/applicationset.git/manifests/c | args.namespace | string | `"argocd"` | The default Argo CD repo namespace | | args.policy | string | `"sync"` | How application is synced between the generator and the cluster | | args.probeBindAddr | string | `":8081"` | The default health check port | +| extraArgs | list | `[]` | List of extra cli args to add | | extraVolumeMounts | list | `[]` | List of extra mounts to add (normally used with extraVolumes) | | extraVolumes | list | `[]` | List of extra volumes to add | | fullnameOverride | string | `""` | Override the default fully qualified app name | diff --git a/charts/argocd-applicationset/ci/default-values.yaml b/charts/argocd-applicationset/ci/default-values.yaml index 233dd8e2..507f1e54 100644 --- a/charts/argocd-applicationset/ci/default-values.yaml +++ b/charts/argocd-applicationset/ci/default-values.yaml @@ -1,75 +1 @@ -# Default values for argo-applicationset. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -image: - # The image repository - repository: quay.io/argocdapplicationset/argocd-applicationset - # Image pull policy - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -args: - metricsAddr: :8080 - probeBindAddr: :8081 - enableLeaderElection: false - namespace: argocd - argocdRepoServer: argocd-repo-server:8081 - policy: sync - debug: false - dryRun: false - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -rbac: - pspEnabled: true - -podSecurityContext: {} - # fsGroup: 2000 - -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -mountSSHKnownHostsVolume: true -mountTLSCertsVolume: true -mountGPGKeysVolume: false -mountGPGKeyringVolume: true +# Test with default values diff --git a/charts/argocd-applicationset/templates/deployment.yaml b/charts/argocd-applicationset/templates/deployment.yaml index a577854b..c0527562 100644 --- a/charts/argocd-applicationset/templates/deployment.yaml +++ b/charts/argocd-applicationset/templates/deployment.yaml @@ -44,6 +44,9 @@ spec: - --policy={{ .Values.args.policy }} - --debug={{ .Values.args.debug }} - --dry-run={{ .Values.args.dryRun }} + {{- with .Values.extraArgs }} + {{- toYaml . | nindent 12 }} + {{- end }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: diff --git a/charts/argocd-applicationset/values.yaml b/charts/argocd-applicationset/values.yaml index 5c9f8225..fd5a50d5 100644 --- a/charts/argocd-applicationset/values.yaml +++ b/charts/argocd-applicationset/values.yaml @@ -113,3 +113,7 @@ extraVolumeMounts: [] extraVolumes: [] # - name: foobar # emptyDir: {} + +# -- List of extra cli args to add +extraArgs: [] + # - --loglevel=warn diff --git a/charts/argocd-image-updater/Chart.yaml b/charts/argocd-image-updater/Chart.yaml index 1ace2616..7ff1d925 100644 --- a/charts/argocd-image-updater/Chart.yaml +++ b/charts/argocd-image-updater/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-image-updater description: A Helm chart for Argo CD Image Updater, a tool to automatically update the container images of Kubernetes workloads which are managed by Argo CD type: application -version: 0.1.0 +version: 0.2.1 appVersion: v0.10.1 home: https://github.com/argoproj-labs/argocd-image-updater icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png @@ -15,4 +15,4 @@ maintainers: url: https://argoproj.github.io/ annotations: artifacthub.io/changes: | - - "[Added]: First chart release" + - "[Fixed]: Update default values example for extraArgs diff --git a/charts/argocd-image-updater/README.md b/charts/argocd-image-updater/README.md index d3440dd6..a3c97ced 100644 --- a/charts/argocd-image-updater/README.md +++ b/charts/argocd-image-updater/README.md @@ -67,6 +67,7 @@ The `config.registries` value can be used exactly as it looks in the documentati | config.logLevel | string | `"info"` | ArgoCD Image Update log level | | config.registries | list | `[]` | ArgoCD Image Updater registries list configuration. More information [here](https://argocd-image-updater.readthedocs.io/en/stable/configuration/registries/) | | extraArgs | list | `[]` | Extra arguments for argocd-image-updater not defined in config.argocd | +| extraEnv | list | `[]` | Extra environment variables for argocd-image-updater | | fullnameOverride | string | `""` | Global fullname (argocd-image-updater.fullname in _helpers.tpl) override | | image.pullPolicy | string | `"Always"` | Default image pull policy | | image.repository | string | `"argoprojlabs/argocd-image-updater"` | Default image repository | diff --git a/charts/argocd-image-updater/templates/deployment.yaml b/charts/argocd-image-updater/templates/deployment.yaml index cfc350ec..d19ecf4e 100644 --- a/charts/argocd-image-updater/templates/deployment.yaml +++ b/charts/argocd-image-updater/templates/deployment.yaml @@ -51,6 +51,9 @@ spec: optional: true - name: IMAGE_UPDATER_LOGLEVEL value: {{ .Values.config.logLevel }} + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 10 }} + {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" @@ -74,6 +77,8 @@ spec: volumeMounts: - mountPath: /app/config name: registries-conf + - mountPath: /tmp + name: tmp-dir volumes: - configMap: items: @@ -81,6 +86,8 @@ spec: path: registries.conf name: argocd-image-updater-config name: registries-conf + - emptyDir: {} + name: tmp-dir {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/argocd-image-updater/values.yaml b/charts/argocd-image-updater/values.yaml index f939137c..01f63fc7 100644 --- a/charts/argocd-image-updater/values.yaml +++ b/charts/argocd-image-updater/values.yaml @@ -16,16 +16,28 @@ nameOverride: "" fullnameOverride: "" # -- Extra arguments for argocd-image-updater not defined in config.argocd +# If a flag contains both key and value, they need to be split to a new entry extraArgs: [] # - --disable-kubernetes # - --dry-run - # - --health-port 8080 - # - --interval 2m - # - --kubeconfig ~/.kube/config - # - --match-application-name staging-* - # - --max-concurrency 5 + # - --health-port + # - 8080 + # - --interval + # - 2m + # - --kubeconfig + # - ~/.kube/config + # - --match-application-name + # - staging-* + # - --max-concurrency + # - 5 # - --once - # - --registries-conf-path /app/config/registries.conf + # - --registries-conf-path + # - /app/config/registries.conf + +# -- Extra environment variables for argocd-image-updater +extraEnv: [] + # - name: AWS_REGION + # value: "us-west-1" config: # Described in detail here https://argocd-image-updater.readthedocs.io/en/stable/install/running/#flags diff --git a/charts/argocd-notifications/Chart.yaml b/charts/argocd-notifications/Chart.yaml index fe9b6f45..171a5dfa 100644 --- a/charts/argocd-notifications/Chart.yaml +++ b/charts/argocd-notifications/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 1.1.1 description: A Helm chart for ArgoCD notifications, an add-on to ArgoCD. name: argocd-notifications type: application -version: 1.5.0 +version: 1.5.1 home: https://github.com/argoproj/argo-helm icon: https://argocd-notifications.readthedocs.io/en/stable/assets/logo.png keywords: @@ -15,4 +15,4 @@ maintainers: - name: andyfeller annotations: artifacthub.io/changes: | - - "[Added]: Configuration for Pod labels" + - "[Added]: Support annotations on secret objects" diff --git a/charts/argocd-notifications/templates/secret.yaml b/charts/argocd-notifications/templates/secret.yaml index e912eef7..ea1569c7 100644 --- a/charts/argocd-notifications/templates/secret.yaml +++ b/charts/argocd-notifications/templates/secret.yaml @@ -5,6 +5,12 @@ metadata: name: argocd-notifications-secret labels: {{- include "argocd-notifications.labels" . | nindent 4 }} + {{- if .Values.secret.annotations }} + annotations: + {{- range $key, $value := .Values.secret.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} type: Opaque stringData: {{- with .Values.secret.items }} diff --git a/charts/argocd-notifications/values.yaml b/charts/argocd-notifications/values.yaml index 6eeb97a0..554bedc1 100644 --- a/charts/argocd-notifications/values.yaml +++ b/charts/argocd-notifications/values.yaml @@ -28,6 +28,9 @@ secret: # Whether helm chart creates controller secret create: true + # key:value pairs to be added to the secret + annotations: {} + items: # Generic key:value pairs to be inserted into the secret # Can be used for templates, notification services etc. Some examples given below.