[bitnami/argo-cd] Add new Argo CD Helm Chart (#6770)

* Add Argo CD server

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add Argo CD application controller

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add Argo CD repo server component

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add Dex component

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Fix linter errors

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Change staticasset paths and remove https port from server

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add README.md and NOTES.txt

* Skip the admin password change by creating it automatically

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Remove unneeded comments

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Wait for redis to avoid tokens sync errors

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add Dex validations and instructions

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add readme generator metadata

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Fix linter errors

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Address sugestions

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add Redis image section to the values.yaml file

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Use empty default dex.config

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add trailing space

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Delete additional applications

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add http prefix to metrics ports

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Remove additionalProjects and add selfSigned to ingress values

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Execute readme-generator again

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Remove option to deploy as statefulset

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Use xxx.containerPorts instead of xxx.ports

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Do not edit files from other charts

* Fix wrong template name

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* Add validation and render server configuration from string

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>

* conver to warning the config validation

Signed-off-by: Miguel A. Cabrera Minagorri <macabrera@bitnami.com>
This commit is contained in:
Miguel Ángel Cabrera Miñagorri
2021-07-15 10:34:53 +02:00
committed by GitHub
parent f5c4490afb
commit 87c43a2aa6
56 changed files with 7256 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# 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
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
+9
View File
@@ -0,0 +1,9 @@
dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 14.6.1
- name: common
repository: https://charts.bitnami.com/bitnami
version: 1.6.1
digest: sha256:6ec7bae42782d47c0ad6296b42c25db11a2ed4a15db1a8fe485be28374a1fa73
generated: "2021-06-23T15:35:33.909358101Z"
+33
View File
@@ -0,0 +1,33 @@
annotations:
category: Infrastructure
apiVersion: v2
appVersion: 2.0.3
dependencies:
- condition: redis.enabled
name: redis
repository: https://charts.bitnami.com/bitnami
version: 14.x.x
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
description: Declarative, GitOps continuous delivery tool for Kubernetes.
engine: gotpl
home: https://argoproj.github.io/argo-cd/
icon: https://bitnami.com/assets/stacks/argo-cd/img/argo-cd-stack-220x234.png
keywords:
- Continuous delivery
- Continuous deployment
- Devops
- Kubernetes
maintainers:
- email: containers@bitnami.com
name: Bitnami
name: argo-cd
sources:
- https://github.com/bitnami/bitnami-docker-argo-cd
- https://github.com/argoproj/argo-cd/
- https://github.com/bitnami/bitnami-docker-dex
- https://github.com/dexidp/dex
version: 0.1.0
+592
View File
@@ -0,0 +1,592 @@
# Argo CD
[Argo CD](https://argoproj.github.io/argo-cd/) is a declarative, GitOps continuous delivery tool for Kubernetes.
## TL;DR
```console
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/argo-cd
```
## Introduction
This chart bootstraps an Argo CD deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.
## Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
- PV provisioner support in the underlying infrastructure
- ReadWriteMany volumes for deployment scaling
## Installing the Chart
To install the chart with the release name `my-release`:
```console
helm install my-release bitnami/argo-cd
```
The command deploys argo-cd on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```console
helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Parameters
### Global parameters
| Name | Description | Value |
| ------------------------- | ----------------------------------------------- | ----- |
| `global.imageRegistry` | Global Docker image registry | `nil` |
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` |
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `nil` |
### Common parameters
| Name | Description | Value |
| ------------------- | -------------------------------------------------- | --------------- |
| `kubeVersion` | Override Kubernetes version | `nil` |
| `nameOverride` | String to partially override common.names.fullname | `nil` |
| `fullnameOverride` | String to fully override common.names.fullname | `nil` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
### Argo CD application controller parameters
| Name | Description | Value |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------------- |
| `controller.image.registry` | Argo CD controller image registry | `docker.io` |
| `controller.image.repository` | Argo CD controller image repository | `bitnami/argo-cd` |
| `controller.image.tag` | Argo CD controller image tag (immutable tags are recommended) | `2.0.3-debian-10-r3` |
| `controller.image.pullPolicy` | Argo CD controller image pull policy | `IfNotPresent` |
| `controller.image.pullSecrets` | Argo CD controller image pull secrets | `[]` |
| `controller.replicaCount` | Number of Argo CD replicas to deploy | `1` |
| `controller.livenessProbe.enabled` | Enable livenessProbe on Argo CD nodes | `true` |
| `controller.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
| `controller.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `controller.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `controller.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `controller.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `controller.readinessProbe.enabled` | Enable readinessProbe on Argo CD nodes | `true` |
| `controller.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
| `controller.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `controller.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `controller.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `controller.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `controller.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `controller.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `controller.resources.limits` | The resources limits for the Argo CD containers | `{}` |
| `controller.resources.requests` | The requested resources for the Argo CD containers | `{}` |
| `controller.podSecurityContext.enabled` | Enabled Argo CD pods' Security Context | `true` |
| `controller.podSecurityContext.fsGroup` | Set Argo CD pod's Security Context fsGroup | `1001` |
| `controller.containerSecurityContext.enabled` | Enabled Argo CD containers' Security Context | `true` |
| `controller.containerSecurityContext.runAsUser` | Set Argo CD containers' Security Context runAsUser | `1001` |
| `controller.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `controller.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `controller.serviceAccount.automountServiceAccountToken` | Automount service account token for the application controller service account | `true` |
| `controller.clusterAdminAccess` | Enable K8s cluster admin access for the application controller | `true` |
| `controller.clusterRoleRules` | Use custom rules for the application controller's cluster role | `[]` |
| `controller.logFormat` | Format for the Argo CD application controller logs. Options: [text, json] | `text` |
| `controller.logLevel` | Log level for the Argo CD application controller | `info` |
| `controller.containerPorts.controller` | Argo CD application controller port number | `8082` |
| `controller.containerPorts.metrics` | Argo CD application controller metrics port number | `8082` |
| `controller.service.type` | Argo CD service type | `ClusterIP` |
| `controller.service.port` | Argo CD application controller service port | `8082` |
| `controller.service.nodePort` | Node port for Argo CD application controller service | `nil` |
| `controller.service.loadBalancerIP` | Argo CD application controller service Load Balancer IP | `nil` |
| `controller.service.loadBalancerSourceRanges` | Argo CD application controller service Load Balancer sources | `[]` |
| `controller.service.externalTrafficPolicy` | Argo CD application controller service external traffic policy | `Cluster` |
| `controller.service.annotations` | Additional custom annotations for Argo CD application controller service | `{}` |
| `controller.metrics.enabled` | Enable Argo CD application controller metrics | `false` |
| `controller.metrics.service.type` | Argo CD application controller service type | `ClusterIP` |
| `controller.metrics.service.port` | Argo CD application controller metrics service port | `8082` |
| `controller.metrics.service.nodePort` | Node port for the application controller service | `nil` |
| `controller.metrics.service.loadBalancerIP` | Argo CD application controller service Load Balancer IP | `nil` |
| `controller.metrics.service.loadBalancerSourceRanges` | Argo CD application controller service Load Balancer sources | `[]` |
| `controller.metrics.service.externalTrafficPolicy` | Argo CD application controller service external traffic policy | `Cluster` |
| `controller.metrics.service.annotations` | Additional custom annotations for Argo CD application controller service | `{}` |
| `controller.metrics.serviceMonitor.enabled` | Enable service monirot for Argo CD application controller | `false` |
| `controller.metrics.serviceMonitor.interval` | Interval for the Argo CD application controller service monitor | `30s` |
| `controller.metrics.rules.enabled` | Enable render extra rules for PrometheusRule object | `false` |
| `controller.metrics.rules.spec` | Rules to render into the PrometheusRule object | `[]` |
| `controller.metrics.rules.selector` | Selector for the PrometheusRule object | `{}` |
| `controller.metrics.rules.namespace` | Namespace where to create the PrometheusRule object | `monitoring` |
| `controller.metrics.rules.additionalLabels` | Additional lables to add to the PrometheusRule object | `{}` |
| `controller.command` | Override default container command (useful when using custom images) | `[]` |
| `controller.defaultArgs.statusProcessors` | Default status processors for Argo CD controller | `20` |
| `controller.defaultArgs.operationProcessors` | Default operation processors for Argo CD controller | `10` |
| `controller.defaultArgs.appResyncPeriod` | Default application resync period for Argo CD controller | `180` |
| `controller.defaultArgs.selfHealTimeout` | Default self heal timeout for Argo CD controller | `5` |
| `controller.args` | Override default container args (useful when using custom images). Overrides the defaultArgs. | `[]` |
| `controller.extraArgs` | Add extra arguments to the default arguments for the Argo CD controller | `[]` |
| `controller.hostAliases` | Argo CD pods host aliases | `[]` |
| `controller.podLabels` | Extra labels for Argo CD pods | `{}` |
| `controller.podAnnotations` | Annotations for Argo CD pods | `{}` |
| `controller.podAffinityPreset` | Pod affinity preset. Ignored if `controller.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `controller.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `controller.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `controller.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `controller.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `controller.nodeAffinityPreset.key` | Node label key to match. Ignored if `controller.affinity` is set | `""` |
| `controller.nodeAffinityPreset.values` | Node label values to match. Ignored if `controller.affinity` is set | `[]` |
| `controller.affinity` | Affinity for Argo CD pods assignment | `{}` |
| `controller.nodeSelector` | Node labels for Argo CD pods assignment | `{}` |
| `controller.tolerations` | Tolerations for Argo CD pods assignment | `[]` |
| `controller.updateStrategy.type` | Argo CD statefulset strategy type | `RollingUpdate` |
| `controller.priorityClassName` | Argo CD pods' priorityClassName | `""` |
| `controller.lifecycleHooks` | for the Argo CD container(s) to automate configuration before or after startup | `{}` |
| `controller.extraEnvVars` | Array with extra environment variables to add to Argo CD nodes | `[]` |
| `controller.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Argo CD nodes | `nil` |
| `controller.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Argo CD nodes | `nil` |
| `controller.extraVolumes` | Optionally specify extra list of additional volumes for the Argo CD pod(s) | `[]` |
| `controller.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Argo CD container(s) | `[]` |
| `controller.sidecars` | Add additional sidecar containers to the Argo CD pod(s) | `{}` |
| `controller.initContainers` | Add additional init containers to the Argo CD pod(s) | `{}` |
### Argo CD server Parameters
| Name | Description | Value |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------ |
| `server.image.registry` | Argo CD server image registry | `docker.io` |
| `server.image.repository` | Argo CD server image repository | `bitnami/argo-cd` |
| `server.image.tag` | Argo CD server image tag (immutable tags are recommended) | `2.0.3-debian-10-r3` |
| `server.image.pullPolicy` | Argo CD server image pull policy | `IfNotPresent` |
| `server.image.pullSecrets` | Argo CD server image pull secrets | `[]` |
| `server.replicaCount` | Number of Argo CD server replicas to deploy | `1` |
| `server.livenessProbe.enabled` | Enable livenessProbe on Argo CD server nodes | `true` |
| `server.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
| `server.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `server.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `server.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `server.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `server.readinessProbe.enabled` | Enable readinessProbe on Argo CD server nodes | `true` |
| `server.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
| `server.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `server.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `server.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `server.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `server.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `server.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `server.resources.limits` | The resources limits for the Argo CD server containers | `{}` |
| `server.resources.requests` | The requested resources for the Argo CD server containers | `{}` |
| `server.podSecurityContext.enabled` | Enabled Argo CD server pods' Security Context | `true` |
| `server.podSecurityContext.fsGroup` | Set Argo CD server pod's Security Context fsGroup | `1001` |
| `server.containerSecurityContext.enabled` | Enabled Argo CD server containers' Security Context | `true` |
| `server.containerSecurityContext.runAsUser` | Set Argo CD server containers' Security Context runAsUser | `1001` |
| `server.autoscaling.enabled` | Enable Argo CD server deployment autoscaling | `false` |
| `server.autoscaling.minReplicas` | Argo CD server deployment autoscaling minimum number of replicas | `1` |
| `server.autoscaling.maxReplicas` | Argo CD server deployment autoscaling maximum number of replicas | `5` |
| `server.autoscaling.targetCPU` | Argo CD server deployment autoscaling target CPU percentage | `50` |
| `server.autoscaling.targetMemory` | Argo CD server deployment autoscaling target CPU memory | `50` |
| `server.insecure` | Disable HTTPS redirection for Argo CD server | `false` |
| `server.logFormat` | ArgoCD server logs format. Options: [text, json] | `text` |
| `server.logLevel` | ArgoCD server logs level | `info` |
| `server.configEnabled` | Enable Argo CD server config | `true` |
| `server.url` | Argo CD server base URL. Required when configuring SSO. Required when enabling dex. | `""` |
| `server.config` | Argo CD server configuration that will end on the argocd-cm Config Map | `""` |
| `server.ingress.enabled` | Enable the creation of an ingress for the Argo CD server | `false` |
| `server.ingress.certManager` | Set to true to add certmanager annotations for Argo CD server ingress | `false` |
| `server.ingress.pathType` | Path type for the Argo CD server ingress | `ImplementationSpecific` |
| `server.ingress.apiVersion` | Ingress API version for the Argo CD server ingress | `nil` |
| `server.ingress.hostname` | Ingress hostname for the Argo CD server ingress | `argocd.server.local` |
| `server.ingress.annotations` | Annotations for the Argo CD server ingress | `{}` |
| `server.ingress.tls` | Enable TLS for the Argo CD server ingress | `false` |
| `server.ingress.extraHosts` | Extra hosts array for the Argo CD server ingress | `nil` |
| `server.ingress.path` | Path array for the Argo CD server ingress | `ImplementationSpecific` |
| `server.ingress.extraPaths` | Extra paths for the Argo CD server ingress | `nil` |
| `server.ingress.extraTls` | Extra TLS configuration for the Argo CD server ingress | `nil` |
| `server.ingress.secrets` | Secrets array to mount into the Ingress | `[]` |
| `server.ingress.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `server.metrics.enabled` | Enable metrics for the Argo CD server | `false` |
| `server.metrics.service.type` | Argo CD server service type | `ClusterIP` |
| `server.metrics.service.port` | Argo CD server metrics service port | `8084` |
| `server.metrics.service.nodePort` | Node port for Argo CD server metrics service | `nil` |
| `server.metrics.service.loadBalancerIP` | Argo CD server service Load Balancer IP | `nil` |
| `server.metrics.service.loadBalancerSourceRanges` | Argo CD server service Load Balancer sources | `[]` |
| `server.metrics.service.externalTrafficPolicy` | Argo CD server service external traffic policy | `Cluster` |
| `server.metrics.service.annotations` | Additional custom annotations for Argo CD server service | `{}` |
| `server.metrics.serviceMonitor.enabled` | Enable service monirot for Argo CD server | `false` |
| `server.metrics.serviceMonitor.interval` | Interval for the Argo CD server service monitor | `30s` |
| `server.ingressGrpc.enabled` | Enable the creation of an ingress for the Argo CD gRPC server | `false` |
| `server.ingressGrpc.certManager` | Set to true to add certmanager annotations for Argo CD gRPC server ingress | `false` |
| `server.ingressGrpc.pathType` | Path type for the Argo CD gRPC server ingress | `ImplementationSpecific` |
| `server.ingressGrpc.apiVersion` | Ingress API version for the Argo CD gRPC server ingress | `nil` |
| `server.ingressGrpc.hostname` | Ingress hostname for the Argo CD gRPC server ingress | `argocd.server.local` |
| `server.ingressGrpc.annotations` | Annotations for the Argo CD gRPC server ingress | `{}` |
| `server.ingressGrpc.tls` | Enable TLS for the Argo CD server ingress | `false` |
| `server.ingressGrpc.extraHosts` | Extra hosts array for the Argo CD gRPC server ingress | `nil` |
| `server.ingressGrpc.path` | Path array for the Argo CD gRPC server ingress | `ImplementationSpecific` |
| `server.ingressGrpc.extraPaths` | Extra paths for the Argo CD gRPC server ingress | `nil` |
| `server.ingressGrpc.extraTls` | Extra TLS configuration for the Argo CD gRPC server ingress | `nil` |
| `server.ingressGrpc.secrets` | Secrets array to mount into the Ingress | `[]` |
| `server.ingressGrpc.selfSigned` | Create a TLS secret for this ingress record using self-signed certificates generated by Helm | `false` |
| `server.containerPorts.http` | Argo CD server HTTP container port | `8080` |
| `server.containerPorts.https` | Argo CD server HTTPS container port | `8443` |
| `server.containerPorts.metrics` | Argo CD server metrics container port | `8083` |
| `server.service.type` | Argo CD service type | `ClusterIP` |
| `server.service.ports.http` | HTTP port for the gRPC ingress when enabled | `80` |
| `server.service.ports.https` | HTTPS port for the gRPC ingress when enabled | `443` |
| `server.service.nodePorts.http` | Node port for HTTP | `nil` |
| `server.service.nodePorts.https` | Node port for HTTPS | `nil` |
| `server.service.loadBalancerIP` | Argo CD service Load Balancer IP | `nil` |
| `server.service.loadBalancerSourceRanges` | Argo CD service Load Balancer sources | `[]` |
| `server.service.externalTrafficPolicy` | Argo CD service external traffic policy | `Cluster` |
| `server.service.annotations` | Additional custom annotations for Argo CD service | `{}` |
| `server.command` | Override default container command (useful when using custom images) | `[]` |
| `server.args` | Override default container args (useful when using custom images) | `[]` |
| `server.extraArgs` | concat to the default args | `[]` |
| `server.hostAliases` | Argo CD server pods host aliases | `[]` |
| `server.podLabels` | Extra labels for Argo CD server pods | `{}` |
| `server.podAnnotations` | Annotations for Argo CD server pods | `{}` |
| `server.podAffinityPreset` | Pod affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `server.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `server.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `server.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `server.nodeAffinityPreset.key` | Node label key to match. Ignored if `server.affinity` is set | `""` |
| `server.nodeAffinityPreset.values` | Node label values to match. Ignored if `server.affinity` is set | `[]` |
| `server.affinity` | Affinity for Argo CD server pods assignment | `{}` |
| `server.nodeSelector` | Node labels for Argo CD server pods assignment | `{}` |
| `server.tolerations` | Tolerations for Argo CD server pods assignment | `[]` |
| `server.updateStrategy.type` | Argo CD server statefulset strategy type | `RollingUpdate` |
| `server.priorityClassName` | Argo CD server pods' priorityClassName | `""` |
| `server.lifecycleHooks` | for the Argo CD server container(s) to automate configuration before or after startup | `{}` |
| `server.extraEnvVars` | Array with extra environment variables to add to Argo CD server nodes | `[]` |
| `server.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Argo CD server nodes | `nil` |
| `server.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Argo CD server nodes | `nil` |
| `server.extraVolumes` | Optionally specify extra list of additional volumes for the Argo CD server pod(s) | `[]` |
| `server.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Argo CD server container(s) | `[]` |
| `server.sidecars` | Add additional sidecar containers to the Argo CD server pod(s) | `{}` |
| `server.initContainers` | Add additional init containers to the Argo CD server pod(s) | `{}` |
| `server.serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `server.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `server.serviceAccount.automountServiceAccountToken` | Automount service account token for the server service account | `true` |
### Argo CD repo server Parameters
| Name | Description | Value |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | -------------------- |
| `repoServer.image.registry` | Argo CD repo server image registry | `docker.io` |
| `repoServer.image.repository` | Argo CD repo server image repository | `bitnami/argo-cd` |
| `repoServer.image.tag` | Argo CD repo server image tag (immutable tags are recommended) | `2.0.3-debian-10-r3` |
| `repoServer.image.pullPolicy` | Argo CD repo server image pull policy | `IfNotPresent` |
| `repoServer.image.pullSecrets` | Argo CD repo server image pull secrets | `[]` |
| `repoServer.replicaCount` | Number of Argo CD repo server replicas to deploy | `1` |
| `repoServer.livenessProbe.enabled` | Enable livenessProbe on Argo CD repo server nodes | `true` |
| `repoServer.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
| `repoServer.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `repoServer.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `repoServer.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `repoServer.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `repoServer.readinessProbe.enabled` | Enable readinessProbe on Argo CD repo server nodes | `true` |
| `repoServer.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
| `repoServer.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `repoServer.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `repoServer.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `repoServer.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `repoServer.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `repoServer.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `repoServer.resources.limits` | The resources limits for the Argo CD repo server containers | `{}` |
| `repoServer.resources.requests` | The requested resources for the Argo CD repo server containers | `{}` |
| `repoServer.podSecurityContext.enabled` | Enabled Argo CD repo server pods' Security Context | `true` |
| `repoServer.podSecurityContext.fsGroup` | Set Argo CD repo server pod's Security Context fsGroup | `1001` |
| `repoServer.containerSecurityContext.enabled` | Enabled Argo CD repo server containers' Security Context | `true` |
| `repoServer.containerSecurityContext.runAsUser` | Set Argo CD repo server containers' Security Context runAsUser | `1001` |
| `repoServer.service.type` | Repo server service type | `ClusterIP` |
| `repoServer.service.port` | Repo server service port | `8081` |
| `repoServer.service.nodePort` | Node port for the repo server service | `nil` |
| `repoServer.service.loadBalancerIP` | Repo server service Load Balancer IP | `nil` |
| `repoServer.service.loadBalancerSourceRanges` | Repo server service Load Balancer sources | `[]` |
| `repoServer.service.externalTrafficPolicy` | Repo server service external traffic policy | `Cluster` |
| `repoServer.service.annotations` | Additional custom annotations for Repo server service | `{}` |
| `repoServer.logFormat` | Format for the Argo CD repo server logs. Options: [text, json] | `text` |
| `repoServer.logLevel` | Log level for the Argo CD repo server | `info` |
| `repoServer.containerPorts.repoServer` | Container port for Argo CD repo server | `8081` |
| `repoServer.containerPorts.metrics` | Metrics port for Argo CD repo server | `nil` |
| `repoServer.metrics.enabled` | Enable metrics for the Argo CD repo server | `false` |
| `repoServer.metrics.service.type` | Argo CD repo server service type | `ClusterIP` |
| `repoServer.metrics.service.port` | Argo CD repo server metrics service port | `8084` |
| `repoServer.metrics.service.nodePort` | Node port for the repo server metrics service | `nil` |
| `repoServer.metrics.service.loadBalancerIP` | Argo CD repo server service Load Balancer IP | `nil` |
| `repoServer.metrics.service.loadBalancerSourceRanges` | Argo CD repo server service Load Balancer sources | `[]` |
| `repoServer.metrics.service.externalTrafficPolicy` | Argo CD repo server service external traffic policy | `Cluster` |
| `repoServer.metrics.service.annotations` | Additional custom annotations for Argo CD repo server service | `{}` |
| `repoServer.metrics.serviceMonitor.enabled` | Enable service monirot for Argo CD repo server | `false` |
| `repoServer.metrics.serviceMonitor.interval` | Interval for the Argo CD repo server service monitor | `30s` |
| `repoServer.autoscaling.enabled` | Enable Argo CD repo server deployment autoscaling | `false` |
| `repoServer.autoscaling.minReplicas` | Argo CD repo server deployment autoscaling minimum number of replicas | `1` |
| `repoServer.autoscaling.maxReplicas` | Argo CD repo server deployment autoscaling maximum number of replicas | `5` |
| `repoServer.autoscaling.targetCPU` | Argo CD repo server deployment autoscaling target CPU percentage | `50` |
| `repoServer.autoscaling.targetMemory` | Argo CD repo server deployment autoscaling target CPU memory | `50` |
| `repoServer.serviceAccount.create` | Specifies whether a ServiceAccount for repo server should be created | `true` |
| `repoServer.serviceAccount.name` | The name of the ServiceAccount for repo server to use. | `""` |
| `repoServer.serviceAccount.automountServiceAccountToken` | Automount service account token for the repo server service account | `true` |
| `repoServer.command` | Override default container command (useful when using custom images) | `[]` |
| `repoServer.args` | Override default container args (useful when using custom images) | `[]` |
| `repoServer.extraArgs` | Add extra args to the default repo server args | `[]` |
| `repoServer.hostAliases` | Argo CD repo server pods host aliases | `[]` |
| `repoServer.podLabels` | Extra labels for Argo CD repo server pods | `{}` |
| `repoServer.podAnnotations` | Annotations for Argo CD repo server pods | `{}` |
| `repoServer.podAffinityPreset` | Pod affinity preset. Ignored if `repoServer.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `repoServer.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `repoServer.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `repoServer.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `repoServer.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `repoServer.nodeAffinityPreset.key` | Node label key to match. Ignored if `repoServer.affinity` is set | `""` |
| `repoServer.nodeAffinityPreset.values` | Node label values to match. Ignored if `repoServer.affinity` is set | `[]` |
| `repoServer.affinity` | Affinity for Argo CD repo server pods assignment | `{}` |
| `repoServer.nodeSelector` | Node labels for Argo CD repo server pods assignment | `{}` |
| `repoServer.tolerations` | Tolerations for Argo CD repo server pods assignment | `[]` |
| `repoServer.updateStrategy.type` | Argo CD repo server statefulset strategy type | `RollingUpdate` |
| `repoServer.priorityClassName` | Argo CD repo server pods' priorityClassName | `""` |
| `repoServer.lifecycleHooks` | for the Argo CD repo server container(s) to automate configuration before or after startup | `{}` |
| `repoServer.extraEnvVars` | Array with extra environment variables to add to Argo CD repo server nodes | `[]` |
| `repoServer.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Argo CD repo server nodes | `nil` |
| `repoServer.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Argo CD repo server nodes | `nil` |
| `repoServer.extraVolumes` | Optionally specify extra list of additional volumes for the Argo CD repo server pod(s) | `[]` |
| `repoServer.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Argo CD repo server container(s) | `[]` |
| `repoServer.sidecars` | Add additional sidecar containers to the Argo CD repo server pod(s) | `{}` |
| `repoServer.initContainers` | Add additional init containers to the Argo CD repo server pod(s) | `{}` |
### Dex Parameters
| Name | Description | Value |
| ------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------- |
| `dex.image.registry` | Dex image registry | `docker.io` |
| `dex.image.repository` | Dex image repository | `bitnami/dex` |
| `dex.image.tag` | Dex image tag (immutable tags are recommended) | `2.28.1-debian-10-r4` |
| `dex.image.pullPolicy` | Dex image pull policy | `IfNotPresent` |
| `dex.image.pullSecrets` | Dex image pull secrets | `[]` |
| `dex.enabled` | Enable the creation of a Dex deployment for SSO | `false` |
| `dex.replicaCount` | Number of Dex replicas to deploy | `1` |
| `dex.livenessProbe.enabled` | Enable livenessProbe on Dex nodes | `true` |
| `dex.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `10` |
| `dex.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `dex.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `1` |
| `dex.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `dex.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `dex.readinessProbe.enabled` | Enable readinessProbe on Dex nodes | `true` |
| `dex.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `10` |
| `dex.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `dex.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` |
| `dex.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `dex.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `dex.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `dex.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `dex.resources.limits` | The resources limits for the Dex containers | `{}` |
| `dex.resources.requests` | The requested resources for the Dex containers | `{}` |
| `dex.podSecurityContext.enabled` | Enabled Dex pods' Security Context | `true` |
| `dex.podSecurityContext.fsGroup` | Set Dex pod's Security Context fsGroup | `1001` |
| `dex.containerSecurityContext.enabled` | Enabled Dex containers' Security Context | `true` |
| `dex.containerSecurityContext.runAsUser` | Set Dex containers' Security Context runAsUser | `1001` |
| `dex.service.type` | Dex service type | `ClusterIP` |
| `dex.service.ports.http` | Dex HTTP service port | `5556` |
| `dex.service.ports.grpc` | Dex grpc service port | `5557` |
| `dex.service.nodePorts.http` | HTTP node port for the Dex service | `nil` |
| `dex.service.nodePorts.grpc` | gRPC node port for the Dex service | `nil` |
| `dex.service.loadBalancerIP` | Dex service Load Balancer IP | `nil` |
| `dex.service.loadBalancerSourceRanges` | Dex service Load Balancer sources | `[]` |
| `dex.service.externalTrafficPolicy` | Dex service external traffic policy | `Cluster` |
| `dex.service.annotations` | Additional custom annotations for Dex service | `{}` |
| `dex.containerPorts.http` | Dex container HTTP port | `5556` |
| `dex.containerPorts.grpc` | Dex gRPC port | `5557` |
| `dex.containerPorts.metrics` | Dex metrics port | `5558` |
| `dex.metrics.enabled` | Enable metrics for Dex | `false` |
| `dex.metrics.service.type` | Dex service type | `ClusterIP` |
| `dex.metrics.service.port` | Dex metrics service port | `5558` |
| `dex.metrics.service.nodePort` | Node port for the Dex service | `nil` |
| `dex.metrics.service.loadBalancerIP` | Dex service Load Balancer IP | `nil` |
| `dex.metrics.service.loadBalancerSourceRanges` | Dex service Load Balancer sources | `[]` |
| `dex.metrics.service.externalTrafficPolicy` | Dex service external traffic policy | `Cluster` |
| `dex.metrics.service.annotations` | Additional custom annotations for Dex service | `{}` |
| `dex.metrics.serviceMonitor.enabled` | Enable service monirot for Dex | `false` |
| `dex.metrics.serviceMonitor.interval` | Interval for the Dex service monitor | `30s` |
| `dex.serviceAccount.create` | Specifies whether a ServiceAccount should be created for Dex | `true` |
| `dex.serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `dex.serviceAccount.automountServiceAccountToken` | Automount service account token for the Dex service account | `true` |
| `dex.command` | Override default container command (useful when using custom images) | `[]` |
| `dex.args` | Override default container args (useful when using custom images) | `[]` |
| `dex.extraArgs` | Add extra args to the default args for Dex | `[]` |
| `dex.hostAliases` | Dex pods host aliases | `[]` |
| `dex.podLabels` | Extra labels for Dex pods | `{}` |
| `dex.podAnnotations` | Annotations for Dex pods | `{}` |
| `dex.podAffinityPreset` | Pod affinity preset. Ignored if `dex.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `dex.podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `dex.affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `dex.nodeAffinityPreset.type` | Node affinity preset type. Ignored if `dex.affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `dex.nodeAffinityPreset.key` | Node label key to match. Ignored if `dex.affinity` is set | `""` |
| `dex.nodeAffinityPreset.values` | Node label values to match. Ignored if `dex.affinity` is set | `[]` |
| `dex.affinity` | Affinity for Dex pods assignment | `{}` |
| `dex.nodeSelector` | Node labels for Dex pods assignment | `{}` |
| `dex.tolerations` | Tolerations for Dex pods assignment | `[]` |
| `dex.updateStrategy.type` | Dex statefulset strategy type | `RollingUpdate` |
| `dex.priorityClassName` | Dex pods' priorityClassName | `""` |
| `dex.lifecycleHooks` | for the Dex container(s) to automate configuration before or after startup | `{}` |
| `dex.extraEnvVars` | Array with extra environment variables to add to Dex nodes | `[]` |
| `dex.extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Dex nodes | `nil` |
| `dex.extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Dex nodes | `nil` |
| `dex.extraVolumes` | Optionally specify extra list of additional volumes for the Dex pod(s) | `[]` |
| `dex.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Dex container(s) | `[]` |
| `dex.sidecars` | Add additional sidecar containers to the Dex pod(s) | `{}` |
| `dex.initContainers` | Add additional init containers to the Dex pod(s) | `{}` |
### Shared config for Argo CD components
| Name | Description | Value |
| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ------ |
| `config.knownHosts` | Known hosts to be added to the known hosts list by default. Check the values to see the default value | `""` |
| `config.extraKnownHosts` | Add extra known hosts to the known hosts list | `""` |
| `config.createExtraKnownHosts` | Whether to create or not the extra known hosts configmap | `true` |
| `config.styles` | Custom CSS styles | `""` |
| `config.existingStylesConfigmap` | Use an existing styles configmap | `nil` |
| `config.tlsCerts` | TLS certificates used to verify the authenticity of the repository servers | `{}` |
| `config.secret.create` | Whether to create or not the secret | `true` |
| `config.secret.annotations` | General secret extra annotations | `{}` |
| `config.secret.githubSecret` | GitHub secret to configure webhooks | `""` |
| `config.secret.gitlabSecret` | GitLab secret to configure webhooks | `""` |
| `config.secret.bitbucketServerSecret` | BitBucket secret to configure webhooks | `""` |
| `config.secret.bitbucketUUID` | BitBucket UUID to configure webhooks | `""` |
| `config.secret.gogsSecret` | Gogs secret to configure webhooks | `""` |
| `config.secret.extra` | Extra keys to add to the configuration secret. | `{}` |
| `config.secret.argocdServerTlsConfig.key` | TLS key for the Argo CD config secret | `nil` |
| `config.secret.argocdServerTlsConfig.crt` | TLS certificate for the Argo CD config secret | `nil` |
| `config.secret.argocdServerAdminPassword` | Argo CD server admin password. Autogenerated by default. | `""` |
| `config.secret.argocdServerAdminPasswordMtime` | Argo CD server password modification time | `""` |
| `config.secret.repositoryCredentials` | Repository credentials to add to the Argo CD server confgi secret | `{}` |
| `config.clusterCredentials` | Configure external cluster credentials | `[]` |
### Init Container Parameters
| Name | Description | Value |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ----------------------- |
| `volumePermissions.enabled` | Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` | `false` |
| `volumePermissions.image.registry` | Bitnami Shell image registry | `docker.io` |
| `volumePermissions.image.repository` | Bitnami Shell image repository | `bitnami/bitnami-shell` |
| `volumePermissions.image.tag` | Bitnami Shell image tag (immutable tags are recommended) | `10` |
| `volumePermissions.image.pullPolicy` | Bitnami Shell image pull policy | `Always` |
| `volumePermissions.image.pullSecrets` | Bitnami Shell image pull secrets | `[]` |
| `volumePermissions.resources.limits` | The resources limits for the init container | `{}` |
| `volumePermissions.resources.requests` | The requested resources for the init container | `{}` |
| `volumePermissions.containerSecurityContext.runAsUser` | Set init container's Security Context runAsUser | `0` |
### Other Parameters
| Name | Description | Value |
| ----------------------------------------- | --------------------------------------------------------------------------- | --------------------- |
| `rbac.create` | Specifies whether RBAC resources should be created | `true` |
| `redis.image.registry` | Argo CD controller image registry | `docker.io` |
| `redis.image.repository` | Argo CD controller image repository | `bitnami/redis` |
| `redis.image.tag` | Argo CD controller image tag (immutable tags are recommended) | `6.2.4-debian-10-r13` |
| `redis.image.pullPolicy` | Argo CD controller image pull policy | `IfNotPresent` |
| `redis.image.pullSecrets` | Argo CD controller image pull secrets | `[]` |
| `redis.enabled` | Enable Redis dependency | `true` |
| `redis.nameOverride` | Name override for the Redis dependency | `""` |
| `redis.service.port` | Service port for Redis dependency | `6379` |
| `redis.auth.enabled` | Enable Redis dependency authentication | `true` |
| `redis.auth.existingSecret` | Existing secret to load redis dependency password | `nil` |
| `redis.auth.existingSecretPasswordKey` | Pasword key name inside the existing secret | `redis-password` |
| `externalRedis.host` | External Redis host | `""` |
| `externalRedis.port` | External Redis port | `6379` |
| `externalRedis.password` | External Redis password | `""` |
| `externalRedis.existingSecret` | Existing secret for the external redis | `nil` |
| `externalRedis.existingSecretPasswordKey` | Password key for the existing secret containing the external redis password | `redis-password` |
The above parameters map to the env variables defined in [bitnami/argo-cd](http://github.com/bitnami/bitnami-docker-argo-cd). For more information please refer to the [bitnami/argo-cd](http://github.com/bitnami/bitnami-docker-argo-cd) image documentation.
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console
helm install my-release \
--set controller.replicaCount=2 \
--set server.metrics.enabled=true \
bitnami/argo-cd
```
The above command sets the argo-cd controller replicas to 2, and enabled argo-cd server metrics.
> NOTE: Once this chart is deployed, it is not possible to change the application's access credentials, such as usernames or passwords, using Helm. To change these application credentials after deployment, delete any persistent volumes (PVs) used by the chart and re-deploy it, or use the application's built-in administrative tools if available.
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
```console
helm install my-release -f values.yaml bitnami/argo-cd
```
> **Tip**: You can use the default [values.yaml](values.yaml)
## Configuration and installation details
### [Rolling VS Immutable tags](https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/)
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
### Ingress
This chart provides support for Ingress resources. If an Ingress controller, such as [nginx-ingress](https://kubeapps.com/charts/stable/nginx-ingress) or [traefik](https://kubeapps.com/charts/stable/traefik), that Ingress controller can be used to serve Argo CD.
To enable Ingress integration, set `server.ingress.enabled` to `true` for the http ingress or `server.grpcIngress.enabled` to `true` for the gRPC ingress. The `xxx.ingress.hostname` property can be used to set the host name. The `xxx.ingress.tls` parameter can be used to add the TLS configuration for this host. It is also possible to have more than one host, with a separate TLS configuration for each host. [Learn more about configuring and using Ingress](https://docs.bitnami.com/kubernetes/apps/argo-cd/configuration/configure-use-ingress/).
### TLS secrets
The chart also facilitates the creation of TLS secrets for use with the Ingress controller, with different options for certificate management. [Learn more about TLS secrets](https://docs.bitnami.com/kubernetes/apps/argo-cd/administration/enable-tls/).
Apart from the Ingress TLS certificates, Argo CD repo server will auto-generate a secret named `argocd-repo-server-tls`. This secret contains the TLS configuration for the Argo CD components. The secret will be created only if it does not exist, so if you want to add custom TLS configuration you can create a secret with that name before installing the chart.
### Default config maps and secrets
The chart has hardcoded names for some ConfigMaps and Secrets like `argocd-ssh-known-hosts-cm`, `argocd-repo-server-tls` or `argocd-ssh-known-hosts-cm`. Argo CD will search for those specific names when the chart installed, so installing the chart twice in the same namespaces is not possible due to this restriction.
For more information about each configmap or secret check the references at the corresponding YAML files.
### Using SSO
In order to use SSO you need to enable Dex by setting `dex.enabled=true`. You can follow [this guide](https://argoproj.github.io/argo-cd/operator-manual/user-management/#1-register-the-application-in-the-identity-provider) to configure your Argo CD deployment into your identity provider. After that, you need to configure Argo CD like described [here](https://argoproj.github.io/argo-cd/operator-manual/user-management/#2-configure-argo-cd-for-sso). You can set the Dex configuration at `server.config.dex\.config` that will populate the `argocd-cm` config map.
> NOTE: `dex.config` is the key of the object. IF you are using the Helm CLI to set the parameter you need to scape the `.` like `--set server.config.dex\.config`.
> IMPORTANT: if you enable Dex without configuring it you will get an error similar to `msg="dex is not configured"`, and the Dex pod will never reach the running state.
### Additional environment variables
In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the `extraEnvVars` property.
```yaml
argo-cd:
extraEnvVars:
- name: LOG_LEVEL
value: error
```
Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the `extraEnvVarsCM` or the `extraEnvVarsSecret` values.
### Sidecars
If additional containers are needed in the same pod as argo-cd (such as additional metrics or logging exporters), they can be defined using the `sidecars` parameter. If these sidecars export extra ports, extra port definitions can be added using the `service.extraPorts` parameter. [Learn more about configuring and using sidecar containers](https://docs.bitnami.com/kubernetes/apps/argo-cd/administration/configure-use-sidecars/).
### Pod affinity
This chart allows you to set your custom affinity using the `affinity` parameter. Find more information about Pod affinity in the [kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity).
As an alternative, use one of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the [bitnami/common](https://github.com/bitnami/charts/tree/master/bitnami/common#affinities) chart. To do so, set the `podAffinityPreset`, `podAntiAffinityPreset`, or `nodeAffinityPreset` parameters.
## Troubleshooting
Find more information about how to deal with common errors related to Bitnami's Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
File diff suppressed because it is too large Load Diff
+257
View File
@@ -0,0 +1,257 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: appprojects.argoproj.io
app.kubernetes.io/part-of: argocd
name: appprojects.argoproj.io
spec:
group: argoproj.io
names:
kind: AppProject
listKind: AppProjectList
plural: appprojects
shortNames:
- appproj
- appprojs
singular: appproject
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: 'AppProject provides a logical grouping of applications, providing controls for: * where the apps may deploy to (cluster whitelist) * what may be deployed (repository whitelist, resource whitelist/blacklist) * who can access these applications (roles, OIDC group claims bindings) * and what they can do (RBAC policies) * automation access to these roles (JWT tokens)'
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: AppProjectSpec is the specification of an AppProject
properties:
clusterResourceBlacklist:
description: ClusterResourceBlacklist contains list of blacklisted cluster level resources
items:
description: GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
properties:
group:
type: string
kind:
type: string
required:
- group
- kind
type: object
type: array
clusterResourceWhitelist:
description: ClusterResourceWhitelist contains list of whitelisted cluster level resources
items:
description: GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
properties:
group:
type: string
kind:
type: string
required:
- group
- kind
type: object
type: array
description:
description: Description contains optional project description
type: string
destinations:
description: Destinations contains list of destinations available for deployment
items:
description: ApplicationDestination holds information about the application's destination
properties:
name:
description: Name is an alternate way of specifying the target cluster by its symbolic name
type: string
namespace:
description: Namespace specifies the target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace
type: string
server:
description: Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API
type: string
type: object
type: array
namespaceResourceBlacklist:
description: NamespaceResourceBlacklist contains list of blacklisted namespace level resources
items:
description: GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
properties:
group:
type: string
kind:
type: string
required:
- group
- kind
type: object
type: array
namespaceResourceWhitelist:
description: NamespaceResourceWhitelist contains list of whitelisted namespace level resources
items:
description: GroupKind specifies a Group and a Kind, but does not force a version. This is useful for identifying concepts during lookup stages without having partially valid types
properties:
group:
type: string
kind:
type: string
required:
- group
- kind
type: object
type: array
orphanedResources:
description: OrphanedResources specifies if controller should monitor orphaned resources of apps in this project
properties:
ignore:
description: Ignore contains a list of resources that are to be excluded from orphaned resources monitoring
items:
description: OrphanedResourceKey is a reference to a resource to be ignored from
properties:
group:
type: string
kind:
type: string
name:
type: string
type: object
type: array
warn:
description: Warn indicates if warning condition should be created for apps which have orphaned resources
type: boolean
type: object
roles:
description: Roles are user defined RBAC roles associated with this project
items:
description: ProjectRole represents a role that has access to a project
properties:
description:
description: Description is a description of the role
type: string
groups:
description: Groups are a list of OIDC group claims bound to this role
items:
type: string
type: array
jwtTokens:
description: JWTTokens are a list of generated JWT tokens bound to this role
items:
description: JWTToken holds the issuedAt and expiresAt values of a token
properties:
exp:
format: int64
type: integer
iat:
format: int64
type: integer
id:
type: string
required:
- iat
type: object
type: array
name:
description: Name is a name for this role
type: string
policies:
description: Policies Stores a list of casbin formated strings that define access policies for the role in the project
items:
type: string
type: array
required:
- name
type: object
type: array
signatureKeys:
description: SignatureKeys contains a list of PGP key IDs that commits in Git must be signed with in order to be allowed for sync
items:
description: SignatureKey is the specification of a key required to verify commit signatures with
properties:
keyID:
description: The ID of the key in hexadecimal notation
type: string
required:
- keyID
type: object
type: array
sourceRepos:
description: SourceRepos contains list of repository URLs which can be used for deployment
items:
type: string
type: array
syncWindows:
description: SyncWindows controls when syncs can be run for apps in this project
items:
description: SyncWindow contains the kind, time, duration and attributes that are used to assign the syncWindows to apps
properties:
applications:
description: Applications contains a list of applications that the window will apply to
items:
type: string
type: array
clusters:
description: Clusters contains a list of clusters that the window will apply to
items:
type: string
type: array
duration:
description: Duration is the amount of time the sync window will be open
type: string
kind:
description: Kind defines if the window allows or blocks syncs
type: string
manualSync:
description: ManualSync enables manual syncs when they would otherwise be blocked
type: boolean
namespaces:
description: Namespaces contains a list of namespaces that the window will apply to
items:
type: string
type: array
schedule:
description: Schedule is the time the window will begin, specified in cron format
type: string
type: object
type: array
type: object
status:
description: AppProjectStatus contains status information for AppProject CRs
properties:
jwtTokensByRole:
additionalProperties:
description: JWTTokens represents a list of JWT tokens
properties:
items:
items:
description: JWTToken holds the issuedAt and expiresAt values of a token
properties:
exp:
format: int64
type: integer
iat:
format: int64
type: integer
id:
type: string
required:
- iat
type: object
type: array
type: object
description: JWTTokensByRole contains a list of JWT tokens issued for a given role
type: object
type: object
required:
- metadata
- spec
type: object
served: true
storage: true
+56
View File
@@ -0,0 +1,56 @@
** Please be patient while the chart is being deployed **
1. Access your Argo CD installation:
{{- if .Values.server.ingress.enabled }}
Connect to one of the following hosts:
{{ if .Values.server.ingress.tls }}
https://{{ .Values.server.ingress.hostname }}
{{- else }}
http://{{ .Values.server.ingress.hostname }}
{{- end }}
{{- else }}
Execute the following commands:
{{- if contains "NodePort" .Values.server.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "argocd.server" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
export URL="http://${NODE_IP}:${NODE_PORT}/"
echo "Argo CD URL: http://$NODE_IP:$NODE_PORT/"
{{- else if contains "LoadBalancer" .Values.server.service.type }}
** Please ensure an external IP is associated to the {{ include "argocd.server" . }} service before proceeding **
** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "argocd.server" . }} **
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "argocd.server" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
{{- $port:=.Values.server.service.ports.http | toString }}
export URL="http://${SERVICE_IP}{{- if ne $port "80" }}:{{ .Values.server.service.ports.http }}{{ end }}"
echo "Argo CD URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.server.service.ports.http }}{{ end }}/"
{{- else if contains "ClusterIP" .Values.server.service.type }}
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "argocd.server" . }} 8080:{{ .Values.server.service.ports.http }} &
export URL=http://127.0.0.1:8080/
echo "Argo CD URL: http://127.0.0.1:8080/"
{{- end }}
{{- end }}
2. Execute the following commands to obtain the Argo CD credentials:
echo "Username: \"admin\""
echo "Password: $(kubectl -n {{ .Release.Namespace }} get secret argocd-secret -o jsonpath="{.data.clearPassword}" | base64 -d)"
{{- if not .Values.server.configEnabled -}}
WARNING: server.configEnabled is disabled, a config map called "argocd-cm" must exist in your namespace
{{- end -}}
{{- if not .Values.config.createExtraKnownHosts -}}
WARNING: config.createExtraKnownHosts is disabled, a secret called "argocd-ssh-known-hosts-cm" must exist in your namespace
{{- end -}}
{{- include "common.warnings.rollingTag" .Values.server.image }}
{{- include "common.warnings.rollingTag" .Values.controller.image }}
{{- include "common.warnings.rollingTag" .Values.repoServer.image }}
{{- include "common.warnings.rollingTag" .Values.dex.image }}
{{- include "argocd.validateValues" . }}
+267
View File
@@ -0,0 +1,267 @@
{{/*
Return the proper Argo CD controller image name
*/}}
{{- define "argocd.application-controller.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.controller.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Argo CD server image name
*/}}
{{- define "argocd.server.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.server.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Argo CD repoServer image name
*/}}
{{- define "argocd.repo-server.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.repoServer.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper Dex image name
*/}}
{{- define "argocd.dex.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.dex.image "global" .Values.global) }}
{{- end -}}
{{/*
Return the proper image name (for the init container volume-permissions image)
*/}}
{{- define "argocd.volumePermissions.image" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.volumePermissions.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "argocd.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.controller.image .Values.server.image .Values.repoServer.image .Values.dex.image .Values.volumePermissions.image) "global" .Values.global) -}}
{{- end -}}
{{/*
Return the proper service name for Argo CD controller
*/}}
{{- define "argocd.application-controller" -}}
{{- printf "%s-app-controller" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end -}}
{{/*
Return the proper service name for Argo CD server
*/}}
{{- define "argocd.server" -}}
{{- printf "%s-server" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end -}}
{{/*
Return the proper service name for Argo CD repo server
*/}}
{{- define "argocd.repo-server" -}}
{{- printf "%s-repo-server" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end -}}
{{/*
Return the proper service name for Dex
*/}}
{{- define "argocd.dex" -}}
{{- printf "%s-dex" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
{{- end -}}
{{/*
Create a default fully qualified redis name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "argocd.redis.fullname" -}}
{{- $name := default "redis" .Values.redis.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default name for known hosts configmap.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "argocd.custom-styles.fullname" -}}
{{- if .Values.config.existingStylesConfigmap -}}
{{- .Values.config.existingStylesConfigmap -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name "custom-styles" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Create the name of the service account to use for the Argo CD server
*/}}
{{- define "argocd.server.serviceAccountName" -}}
{{- if .Values.server.serviceAccount.create -}}
{{ default (printf "%s-argocd-server" (include "common.names.fullname" .)) .Values.server.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
{{ default "default" .Values.server.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the service account to use for the Argo CD application controller
*/}}
{{- define "argocd.application-controller.serviceAccountName" -}}
{{- if .Values.controller.serviceAccount.create -}}
{{ default (printf "%s-argocd-app-controller" (include "common.names.fullname" .)) .Values.controller.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
{{ default "default" .Values.controller.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the service account to use for the Argo CD repo server
*/}}
{{- define "argocd.repo-server.serviceAccountName" -}}
{{- if .Values.repoServer.serviceAccount.create -}}
{{ default (printf "%s-argocd-repo-server" (include "common.names.fullname" .)) .Values.repoServer.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
{{ default "default" .Values.repoServer.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the service account to use for Dex
*/}}
{{- define "argocd.dex.serviceAccountName" -}}
{{- if .Values.dex.serviceAccount.create -}}
{{ default (printf "%s-dex" (include "common.names.fullname" .)) .Values.dex.serviceAccount.name | trunc 63 | trimSuffix "-" }}
{{- else -}}
{{ default "default" .Values.dex.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/*
Compile all warnings into a single message.
*/}}
{{/*
Return the Redis(TM) secret name
*/}}
{{- define "argocd.redis.secretName" -}}
{{- if .Values.redis.enabled }}
{{- if .Values.redis.auth.existingSecret }}
{{- printf "%s" .Values.redis.auth.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "argocd.redis.fullname" .)}}
{{- end -}}
{{- else if .Values.externalRedis.existingSecret }}
{{- printf "%s" .Values.externalRedis.existingSecret -}}
{{- else -}}
{{- printf "%s-redis" (include "argocd.redis.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis(TM) secret key
*/}}
{{- define "argocd.redis.secretPasswordKey" -}}
{{- if and .Values.redis.enabled .Values.redis.auth.existingSecret }}
{{- .Values.redis.auth.existingSecretPasswordKey | printf "%s" }}
{{- else if and (not .Values.redis.enabled) .Values.externalRedis.existingSecret }}
{{- .Values.externalRedis.existingSecretPasswordKey | printf "%s" }}
{{- else -}}
{{- printf "redis-password" -}}
{{- end -}}
{{- end -}}
{{/*
Return whether Redis(TM) uses password authentication or not
*/}}
{{- define "argocd.redis.auth.enabled" -}}
{{- if or (and .Values.redis.enabled .Values.redis.auth.enabled) (and (not .Values.redis.enabled) (or .Values.externalRedis.password .Values.externalRedis.existingSecret)) }}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis(TM) hostname
*/}}
{{- define "argocd.redisHost" -}}
{{- if .Values.redis.enabled }}
{{- printf "%s-master" (include "argocd.redis.fullname" .) -}}
{{- else -}}
{{- required "If the redis dependency is disabled you need to add an external redis host" .Values.externalRedis.host -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis(TM) port
*/}}
{{- define "argocd.redisPort" -}}
{{- if .Values.redis.enabled }}
{{- .Values.redis.service.port -}}
{{- else -}}
{{- .Values.externalRedis.port -}}
{{- end -}}
{{- end -}}
{{/*
Validate Redis config
*/}}
{{- define "argocd.validateValues.redis" -}}
{{- if and .Values.redis.enabled .Values.redis.auth.existingSecret }}
{{- if not .Values.redis.auth.existingSecretPasswordKey -}}
Argo CD: You need to provide existingSecretPasswordKey when an existingSecret is specified in redis dependency
{{- end -}}
{{- else if and (not .Values.redis.enabled) .Values.externalRedis.existingSecret }}
{{- if not .Values.externalRedis.existingSecretPasswordKey -}}
Argo CD: You need to provide existingSecretPasswordKey when an existingSecret is specified in redis
{{- end }}
{{- end -}}
{{- end -}}
{{/*
Validate external Redis config
*/}}
{{- define "argocd.validateValues.externalRedis" -}}
{{- if not .Values.redis.enabled -}}
Argo CD: If the redis dependency is disabled you need to add an external redis port
{{- end -}}
{{- end -}}
{{/*
Validate Dex config
*/}}
{{- define "argocd.validateValues.dex.config" -}}
{{- if .Values.dex.enabled -}}
{{- if not .Values.server.url -}}
Argo CD: server.url must be set when enabling Dex for SSO. Please add `--set server.url=<your-argo-cd-url>` to the installation parameters.
{{- end -}}
{{- if not (index .Values "server" "config" "dex.config") -}}
Argo CD: server.config.dex\.config must be set when enabling Dex for SSO. Please add `--set server.config.dex\.config=<your-dex-configuration>` to the installation parameters.
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Validate cluster credentials
*/}}
{{- define "argocd.validateValues.clusterCredentials" -}}
{{- range .Values.config.clusterCredentials -}}
{{- if not .name -}}
Argo CD: A valid .name entry is required in all clusterCrendials objects!
{{- end -}}
{{- if not .server -}}
Argo CD: A valid .server entry is required in all clusterCrendials objects!
{{- end -}}
{{- if not .config -}}
Argo CD: A valid .config entry is required in all clusterCrendials objects!
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Compile all warnings into a single message.
*/}}
{{- define "argocd.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "argocd.validateValues.dex.config" .) -}}
{{- $messages := append $messages (include "argocd.validateValues.clusterCredentials" .) -}}
{{- $messages := append $messages (include "argocd.validateValues.externalRedis" .) -}}
{{- $messages := append $messages (include "argocd.validateValues.redis" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
{{- end -}}
@@ -0,0 +1,29 @@
{{- if and .Values.rbac.create .Values.controller.clusterAdminAccess }}
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: ClusterRole
metadata:
name: {{ include "argocd.application-controller" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
{{- if .Values.controller.clusterRoleRules }}
{{- include "common.tplvalues.render" ( dict "value" .Values.controller.clusterRoleRules "context" $ ) | nindent 2 }}
{{ else }}
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- nonResourceURLs:
- '*'
verbs:
- '*'
{{- end }}
{{- end }}
@@ -0,0 +1,22 @@
{{- if and .Values.rbac.create .Values.controller.clusterAdminAccess }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "argocd.application-controller" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "argocd.application-controller" . }}
subjects:
- kind: ServiceAccount
name: {{ include "argocd.application-controller.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
@@ -0,0 +1,221 @@
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "argocd.application-controller" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.controller.replicaCount }}
{{- if .Values.controller.updateStrategy }}
strategy: {{- toYaml .Values.controller.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: controller
template:
metadata:
{{- if .Values.controller.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.controller.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: controller
{{- if .Values.controller.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "argocd.application-controller.serviceAccountName" . }}
{{- include "argocd.imagePullSecrets" . | nindent 6 }}
{{- if .Values.controller.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.controller.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.controller.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.controller.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.controller.podAffinityPreset "component" "controller" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.controller.podAntiAffinityPreset "component" "controller" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.controller.nodeAffinityPreset.type "key" .Values.controller.nodeAffinityPreset.key "values" .Values.controller.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.controller.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.controller.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.controller.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.controller.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.controller.priorityClassName }}
priorityClassName: {{ .Values.controller.priorityClassName | quote }}
{{- end }}
{{- if .Values.controller.podSecurityContext.enabled }}
securityContext: {{- omit .Values.controller.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
initContainers:
- name: wait-for-redis
image: {{ include "common.images.image" (dict "imageRoot" .Values.redis.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.redis.image.pullPolicy | quote }}
command:
- /bin/bash
args:
- -ec
- |
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
check_redis_connection() {
local result="$(redis-cli -h {{ include "argocd.redisHost" . }} -p {{ include "argocd.redisPort" . }} PING)"
if [[ "$result" != "PONG" ]]; then
false
fi
}
info "Checking redis connection..."
if ! retry_while "check_redis_connection"; then
error "Could not connect to the Redis server"
return 1
else
info "Connected to the Redis instance"
fi
env:
- name: REDISCLI_AUTH
valueFrom:
secretKeyRef:
name: {{ include "argocd.redis.secretName" . }}
key: {{ include "argocd.redis.secretPasswordKey" . }}
{{- if .Values.controller.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: controller
image: {{ include "argocd.application-controller.image" . }}
imagePullPolicy: {{ .Values.controller.image.pullPolicy }}
{{- if .Values.controller.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.controller.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.controller.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.controller.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.controller.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.controller.command "context" $) | nindent 12 }}
{{- else }}
command:
- argocd-application-controller
{{- end }}
{{- if .Values.controller.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.controller.args "context" $) | nindent 12 }}
{{- else }}
args:
- --status-processors
- {{ .Values.controller.defaultArgs.statusProcessors | quote }}
- --operation-processors
- {{ .Values.controller.defaultArgs.operationProcessors | quote }}
- --app-resync
- {{ .Values.controller.defaultArgs.appResyncPeriod | quote }}
- --self-heal-timeout-seconds
- {{ .Values.controller.defaultArgs.selfHealTimeout | quote }}
- --repo-server
- {{ include "argocd.application-controller" . }}:{{ .Values.repoServer.service.port }}
- --logformat
- {{ .Values.controller.logFormat }}
- --loglevel
- {{ .Values.controller.logLevel }}
# TODO(miguelaeh): Test the chart using redis sentinel enabled: https://github.com/argoproj/argo-cd/blob/2a410187565e15633b6f2a8c8d8da22cf02b257d/util/cache/cache.go#L40
- --redis
- {{ include "argocd.redisHost" . }}:{{ include "argocd.redisPort" . }}
{{- if .Values.controller.extraArgs }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraArgs "context" $) | nindent 8 }}
{{- end }}
{{- end }}
ports:
- name: controller
containerPort: {{ .Values.controller.containerPorts.controller }}
protocol: TCP
- name: metrics
containerPort: {{ .Values.controller.containerPorts.metrics }}
protocol: TCP
env:
{{- if and .Values.redis.enabled (include "argocd.redis.auth.enabled" .) }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "argocd.redis.secretName" . }}
key: {{ include "argocd.redis.secretPasswordKey" . }}
{{- end }}
{{- if .Values.controller.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.controller.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.controller.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.controller.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.controller.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.controller.resources }}
resources: {{- toYaml .Values.controller.resources | nindent 12 }}
{{- end }}
{{- if .Values.controller.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.controller.containerPorts.controller }}
initialDelaySeconds: {{ .Values.controller.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.livenessProbe.failureThreshold }}
{{- else if .Values.controller.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.controller.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.controller.readinessProbe.enabled }}
readinessProbe:
tcpSocket:
port: {{ .Values.controller.containerPorts.controller }}
initialDelaySeconds: {{ .Values.controller.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.controller.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.controller.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }}
{{- else if .Values.controller.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.controller.readinessProbe "enabled") "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
# Mounting into a path that will be read by Argo CD.
# This secret will be autogenerated by Argo CD repo server unless it already exists. Users can create its own certificate to override it.
# Ref: https://argoproj.github.io/argo-cd/operator-manual/tls/#inbound-tls-certificates-used-by-argocd-repo-sever
- mountPath: /app/config/server/tls
name: argocd-repo-server-tls
{{- if .Values.controller.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.controller.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.controller.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: argocd-repo-server-tls
secret:
items:
- key: tls.crt
path: tls.crt
- key: tls.key
path: tls.key
- key: ca.crt
path: ca.crt
optional: true
secretName: argocd-repo-server-tls
{{- if .Values.controller.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.controller.extraVolumes "context" $) | nindent 8 }}
{{- end }}
@@ -0,0 +1,43 @@
{{- if .Values.controller.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.application-controller" . }}-metrics
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.controller.metrics.service.annotations }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.controller.metrics.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.controller.metrics.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.controller.metrics.service.type }}
{{- if (or (eq .Values.controller.metrics.service.type "LoadBalancer") (eq .Values.controller.metrics.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.controller.metrics.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.controller.metrics.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.controller.metrics.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.controller.metrics.service.type "LoadBalancer") (not (empty .Values.controller.metrics.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.controller.metrics.service.loadBalancerIP }}
{{- end }}
ports:
- name: metrics
port: {{ .Values.controller.metrics.service.port }}
protocol: TCP
{{- if (and (or (eq .Values.controller.service.type "NodePort") (eq .Values.controller.service.type "LoadBalancer")) (not (empty .Values.controller.metrics.service.nodePort))) }}
nodePort: {{ .Values.controller.metrics.service.nodePort }}
{{- else if eq .Values.controller.metrics.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- end }}
@@ -0,0 +1,25 @@
{{- if and .Values.controller.metrics.enabled .Values.controller.metrics.rules.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ include "argocd.application-controller" . }}
{{- if .Values.controller.metrics.rules.namespace }}
namespace: {{ .Values.controller.metrics.rules.namespace }}
{{- end }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.controller.metrics.rules.selector }}
{{- include "common.tplvalues.render" ( dict "value" .Values.controller.metrics.rules.selector "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.controller.metrics.rules.additionalLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.controller.metrics.rules.additionalLabels "context" $ ) | nindent 4 }}
{{- end }}
spec:
groups:
- name: argocd
rules:
{{- include "common.tplvalues.render" ( dict "value" .Values.controller.metrics.rules.spec "context" $ ) | nindent 6 }}
{{- end }}
@@ -0,0 +1,41 @@
{{- if .Values.rbac.create }}
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.application-controller" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ""
resources:
- secrets
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- argoproj.io
resources:
- applications
- appprojects
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- ""
resources:
- events
verbs:
- create
- list
{{- end }}
@@ -0,0 +1,18 @@
{{- if and .Values.controller.serviceAccount.create .Values.rbac.create }}
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.application-controller" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "argocd.application-controller.serviceAccountName" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "argocd.application-controller" . }}
{{- end }}
@@ -0,0 +1,16 @@
{{- if and .Values.rbac.create .Values.controller.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "argocd.application-controller.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.controller.serviceAccount.automountServiceAccountToken }}
{{- end }}
@@ -0,0 +1,42 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.application-controller" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: controller
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.controller.service.annotations }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.controller.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.controller.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.controller.service.type }}
{{- if (or (eq .Values.controller.service.type "LoadBalancer") (eq .Values.controller.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.controller.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.controller.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.controller.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.controller.service.type "LoadBalancer") (not (empty .Values.controller.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.controller.service.loadBalancerIP }}
{{- end }}
ports:
- name: tcp-controller
port: {{ .Values.controller.service.port }}
targetPort: controller
protocol: TCP
{{- if (and (or (eq .Values.controller.service.type "NodePort") (eq .Values.controller.service.type "LoadBalancer")) (not (empty .Values.controller.service.nodePort))) }}
nodePort: {{ .Values.controller.service.nodePort }}
{{- else if eq .Values.controller.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: controller
@@ -0,0 +1,22 @@
{{- if and .Values.controller.metrics.enabled .Values.controller.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "argocd.application-controller" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: controller
spec:
endpoints:
- port: http-metrics
interval: {{ .Values.controller.metrics.serviceMonitor.interval }}
path: /metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: controller
{{- end }}
+21
View File
@@ -0,0 +1,21 @@
{{- if .Values.server.configEnabled }}
apiVersion: v1
kind: ConfigMap
metadata:
# Mandatory hardcoded name.
# Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/argocd-cm.yaml
name: argocd-cm
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
# Mandatory label
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#atomic-configuration
app.kubernetes.io/part-of: argocd
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- include "common.tplvalues.render" ( dict "value" .Values.server.config "context" $ ) | nindent 2 }}
{{- end }}
@@ -0,0 +1,54 @@
{{- if .Values.config.secret.create }}
apiVersion: v1
kind: Secret
metadata:
# Mandatory hardcoded name.
# Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/argocd-secret.yaml
name: argocd-secret
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
# Mandatory label
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#atomic-configuration
app.kubernetes.io/part-of: argocd
{{- if or .Values.commonAnnotations .Values.config.secret.annotations}}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.config.secret.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
type: Opaque
data:
{{- if .Values.config.secret.githubSecret }}
webhook.github.secret: {{ .Values.config.secret.githubSecret | b64enc }}
{{- end }}
{{- if .Values.config.secret.gitlabSecret }}
webhook.gitlab.secret: {{ .Values.config.secret.gitlabSecret | b64enc }}
{{- end }}
{{- if .Values.config.secret.bitbucketServerSecret }}
webhook.bitbucketserver.secret: {{ .Values.config.secret.bitbucketServerSecret | b64enc }}
{{- end }}
{{- if .Values.config.secret.bitbucketUUID }}
webhook.bitbucket.uuid: {{ .Values.config.secret.bitbucketUUID | b64enc }}
{{- end }}
{{- if .Values.config.secret.gogsSecret }}
webhook.gogs.secret: {{ .Values.config.secret.gogsSecret | b64enc }}
{{- end }}
{{- if and .Values.config.secret.argocdServerTlsConfig.key .Values.config.secret.argocdServerTlsConfig.crt }}
tls.key: {{ .Values.config.secret.argocdServerTlsConfig.key | b64enc }}
tls.crt: {{ .Values.config.secret.argocdServerTlsConfig.crt | b64enc }}
{{- end }}
{{- $password := default (randAlphaNum 10) .Values.config.secret.argocdServerAdminPassword }}
clearPassword: {{ $password | b64enc }}
# The password needs to be bcrypt hashed
admin.password: {{ (split ":" (htpasswd "" $password))._1 | b64enc }}
admin.passwordMtime: {{ default (date "2006-01-02T15:04:05Z" now) .Values.config.secret.argocdServerAdminPasswordMtime | b64enc }}
{{- range $key, $value := .Values.config.secret.extra }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}
{{- end }}
@@ -0,0 +1,25 @@
{{- range .Values.config.clusterCredentials }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ include "common.names.fullname" $ }}-cluster-{{ .name }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
# Mandatory label
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#atomic-configuration
app.kubernetes.io/part-of: argocd
argocd.argoproj.io/secret-type: cluster
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
stringData:
name: {{ .name }}
server: {{ .server }}
namespaces: {{ .namespaces }}
config: |
{{- .config | toPrettyJson | nindent 4 }}
{{- end }}
@@ -0,0 +1,199 @@
{{- if .Values.dex.enabled }}
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "argocd.dex" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: dex
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.dex.replicaCount }}
{{- if .Values.dex.updateStrategy }}
strategy: {{- toYaml .Values.dex.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: dex
template:
metadata:
{{- if .Values.dex.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.dex.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: dex
{{- if .Values.dex.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.dex.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "argocd.dex.serviceAccountName" . }}
{{- include "argocd.imagePullSecrets" . | nindent 6 }}
{{- if .Values.dex.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.dex.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.dex.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.dex.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dex.podAffinityPreset "component" "dex" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dex.podAntiAffinityPreset "component" "dex" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.dex.nodeAffinityPreset.type "key" .Values.dex.nodeAffinityPreset.key "values" .Values.dex.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.dex.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.dex.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.dex.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.dex.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.dex.priorityClassName }}
priorityClassName: {{ .Values.dex.priorityClassName | quote }}
{{- end }}
{{- if .Values.dex.podSecurityContext.enabled }}
securityContext: {{- omit .Values.dex.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
initContainers:
{{- if .Values.volumePermissions.enabled }}
- name: volume-permissions
image: {{ include "argocd.volumePermissions.image" . }}
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
chown -R {{ .Values.dex.containerSecurityContext.runAsUser }}:{{ .Values.dex.containerSecurityContext.fsGroup }} /shared
chown -R {{ .Values.dex.containerSecurityContext.runAsUser }}:{{ .Values.dex.containerSecurityContext.fsGroup }} /tmp
securityContext:
runAsUser: {{ .Values.volumePermissions.containerSecurityContext.runAsUser }}
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- end }}
volumeMounts:
- name: static-files
mountPath: /shared
- name: tmp-dir
mountPath: /tmp
{{- end }}
- name: copyutil
image: {{ include "argocd.server.image" . }}
imagePullPolicy: {{ .Values.server.image.pullPolicy }}
{{- if .Values.dex.resources }}
resources: {{- toYaml .Values.dex.resources | nindent 12 }}
{{- end }}
{{- if .Values.dex.containerSecurityContext }}
securityContext: {{- omit .Values.dex.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
command:
- cp
- -n
- /opt/bitnami/argo-cd/bin/argocd
- /shared/argocd-dex
volumeMounts:
- mountPath: /shared
name: static-files
{{- if .Values.dex.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.dex.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: dex
image: {{ include "argocd.dex.image" . }}
imagePullPolicy: {{ .Values.dex.image.pullPolicy }}
{{- if .Values.dex.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.dex.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.dex.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.dex.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.dex.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.dex.command "context" $) | nindent 12 }}
{{- else }}
command:
- /shared/argocd-dex
{{- end }}
{{- if .Values.dex.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.dex.args "context" $) | nindent 12 }}
{{- else }}
args:
- rundex
{{- if .Values.dex.extraArgs }}
{{- include "common.tplvalues.render" (dict "value" .Values.dex.extraArgs "context" $) | nindent 8 }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.dex.containerPorts.http }}
protocol: TCP
- name: grpc
containerPort: {{ .Values.dex.containerPorts.grpc }}
protocol: TCP
{{- if .Values.dex.metrics.enabled }}
- name: metrics
containerPort: {{ .Values.dex.containerPorts.metrics }}
protocol: TCP
{{- end }}
env:
{{- if .Values.dex.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.dex.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.dex.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.dex.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.dex.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.dex.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.dex.resources }}
resources: {{- toYaml .Values.dex.resources | nindent 12 }}
{{- end }}
{{- if .Values.dex.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.dex.containerPorts.http }}
initialDelaySeconds: {{ .Values.dex.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dex.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dex.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dex.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.dex.livenessProbe.failureThreshold }}
{{- else if .Values.dex.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.dex.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.dex.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /healthz
port: {{ .Values.dex.containerPorts.http }}
initialDelaySeconds: {{ .Values.dex.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.dex.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.dex.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.dex.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.dex.readinessProbe.failureThreshold }}
{{- else if .Values.dex.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.dex.readinessProbe "enabled") "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: static-files
mountPath: /shared
- name: tmp-dir
mountPath: /tmp
{{- if .Values.dex.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.dex.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.dex.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.dex.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: tmp-dir
emptyDir: {}
- name: static-files
emptyDir: {}
{{- if .Values.dex.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.dex.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }}
@@ -0,0 +1,44 @@
{{- if and .Values.dex.enabled .Values.dex.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.dex" . }}-metrics
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: dex
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.dex.metrics.service.annotations }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.dex.metrics.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.dex.metrics.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.dex.metrics.service.type }}
{{- if (or (eq .Values.dex.metrics.service.type "LoadBalancer") (eq .Values.dex.metrics.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.dex.metrics.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.dex.metrics.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.dex.metrics.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.dex.metrics.service.type "LoadBalancer") (not (empty .Values.dex.metrics.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.dex.metrics.service.loadBalancerIP }}
{{- end }}
ports:
- name: metrics
port: {{ .Values.dex.metrics.service.port }}
targetPort: metrics
protocol: TCP
{{- if (and (or (eq .Values.dex.service.type "NodePort") (eq .Values.dex.service.type "LoadBalancer")) (not (empty .Values.dex.metrics.service.nodePort))) }}
nodePort: {{ .Values.dex.metrics.service.nodePort }}
{{- else if eq .Values.dex.metrics.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: dex
{{- end }}
+21
View File
@@ -0,0 +1,21 @@
{{- if and .Values.dex.enabled .Values.rbac.create }}
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.dex" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ""
resources:
- secrets
- configmaps
verbs:
- get
- list
- watch
{{- end }}
@@ -0,0 +1,18 @@
{{- if and .Values.dex.enabled .Values.dex.serviceAccount.create .Values.rbac.create }}
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.dex" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "argocd.dex.serviceAccountName" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "argocd.dex" . }}
{{- end }}
@@ -0,0 +1,16 @@
{{- if and .Values.dex.enabled .Values.rbac.create .Values.dex.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "argocd.dex.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: dex
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.dex.serviceAccount.automountServiceAccountToken }}
{{- end }}
@@ -0,0 +1,53 @@
{{- if .Values.dex.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.dex" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: dex
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.dex.service.annotations }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.dex.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.dex.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.dex.service.type }}
{{- if (or (eq .Values.dex.service.type "LoadBalancer") (eq .Values.dex.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.dex.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.dex.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.dex.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.dex.service.type "LoadBalancer") (not (empty .Values.dex.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.dex.service.loadBalancerIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.dex.service.ports.http }}
targetPort: http
protocol: TCP
{{- if (and (or (eq .Values.dex.service.type "NodePort") (eq .Values.dex.service.type "LoadBalancer")) (not (empty .Values.dex.service.nodePorts.http))) }}
nodePort: {{ .Values.dex.service.nodePorts.http }}
{{- else if eq .Values.dex.service.type "ClusterIP" }}
nodePort: null
{{- end }}
- name: grpc
port: {{ .Values.dex.service.ports.grpc }}
targetPort: grpc
protocol: TCP
{{- if (and (or (eq .Values.dex.service.type "NodePort") (eq .Values.dex.service.type "LoadBalancer")) (not (empty .Values.dex.service.nodePorts.grpc))) }}
nodePort: {{ .Values.dex.service.nodePorts.grpc }}
{{- else if eq .Values.dex.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: dex
{{- end }}
@@ -0,0 +1,22 @@
{{- if and .Values.dex.enabled .Values.dex.metrics.enabled .Values.dex.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "argocd.dex" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: dex
spec:
endpoints:
- port: http-metrics
interval: {{ .Values.dex.metrics.serviceMonitor.interval }}
path: /metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: dex
{{- end }}
@@ -0,0 +1,4 @@
{{- range .Values.extraDeploy }}
---
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
{{- end }}
@@ -0,0 +1,25 @@
{{- if .Values.config.createExtraKnownHosts }}
apiVersion: v1
kind: ConfigMap
metadata:
# Mandatory hardcoded name.
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#ssh-known-host-public-keys
name: argocd-ssh-known-hosts-cm
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
# Mandatory label
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#atomic-configuration
app.kubernetes.io/part-of: argocd
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
ssh_known_hosts: |
{{- include "common.tplvalues.render" (dict "value" .Values.config.knownHosts "context" $) | nindent 4 }}
{{- if .Values.config.extraKnownHosts }}
{{- include "common.tplvalues.render" (dict "value" .Values.config.extraKnownHosts "context" $) | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,255 @@
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "argocd.repo-server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: repo-server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.repoServer.replicaCount }}
{{- if .Values.repoServer.updateStrategy }}
strategy: {{- toYaml .Values.repoServer.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: repo-server
template:
metadata:
{{- if .Values.repoServer.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.repoServer.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: repo-server
{{- if .Values.repoServer.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.repoServer.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "argocd.repo-server.serviceAccountName" . }}
{{- include "argocd.imagePullSecrets" . | nindent 6 }}
{{- if .Values.repoServer.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.repoServer.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.repoServer.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.repoServer.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.repoServer.podAffinityPreset "component" "repo-server" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.repoServer.podAntiAffinityPreset "component" "repo-server" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.repoServer.nodeAffinityPreset.type "key" .Values.repoServer.nodeAffinityPreset.key "values" .Values.repoServer.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.repoServer.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.repoServer.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.repoServer.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.repoServer.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.repoServer.priorityClassName }}
priorityClassName: {{ .Values.repoServer.priorityClassName | quote }}
{{- end }}
{{- if .Values.repoServer.podSecurityContext.enabled }}
securityContext: {{- omit .Values.repoServer.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
initContainers:
{{- if .Values.volumePermissions.enabled }}
- name: volume-permissions
image: {{ include "argocd.volumePermissions.image" . }}
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
chown -R {{ .Values.repoServer.containerSecurityContext.runAsUser }}:{{ .Values.repoServer.containerSecurityContext.fsGroup }} /tmp
securityContext:
runAsUser: {{ .Values.volumePermissions.containerSecurityContext.runAsUser }}
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- end }}
volumeMounts:
- name: tmp-dir
mountPath: /tmp
{{- end }}
- name: wait-for-redis
image: {{ include "common.images.image" (dict "imageRoot" .Values.redis.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.redis.image.pullPolicy | quote }}
command:
- /bin/bash
args:
- -ec
- |
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
check_redis_connection() {
local result="$(redis-cli -h {{ include "argocd.redisHost" . }} -p {{ include "argocd.redisPort" . }} PING)"
if [[ "$result" != "PONG" ]]; then
false
fi
}
info "Checking redis connection..."
if ! retry_while "check_redis_connection"; then
error "Could not connect to the Redis server"
return 1
else
info "Connected to the Redis instance"
fi
env:
- name: REDISCLI_AUTH
valueFrom:
secretKeyRef:
name: {{ include "argocd.redis.secretName" . }}
key: {{ include "argocd.redis.secretPasswordKey" . }}
{{- if .Values.repoServer.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.repoServer.initContainers "context" $) | nindent 8 }}
{{- end }}
containers:
- name: argocd-repo-server
image: {{ include "argocd.repo-server.image" . }}
imagePullPolicy: {{ .Values.repoServer.image.pullPolicy }}
{{- if .Values.repoServer.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.repoServer.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.repoServer.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.repoServer.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.repoServer.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.repoServer.command "context" $) | nindent 12 }}
{{- else }}
command:
- argocd-repo-server
{{- end }}
{{- if .Values.repoServer.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.repoServer.args "context" $) | nindent 12 }}
{{- else }}
args:
- --logformat
- {{ .Values.repoServer.logFormat }}
- --loglevel
- {{ .Values.repoServer.logLevel }}
- --redis
- {{ include "argocd.redisHost" . }}:{{ include "argocd.redisPort" . }}
{{- if .Values.repoServer.extraArgs }}
{{- include "common.tplvalues.render" (dict "value" .Values.repoServer.extraArgs "context" $) | nindent 8 }}
{{- end }}
{{- end }}
ports:
- name: repo-server
containerPort: {{ .Values.repoServer.containerPorts.repoServer }}
protocol: TCP
{{- if .Values.repoServer.metrics.enabled }}
- name: metrics
containerPort: {{ .Values.repoServer.containerPorts.metrics }}
protocol: TCP
{{- end }}
env:
{{- if and .Values.redis.enabled (include "argocd.redis.auth.enabled" .) }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "argocd.redis.secretName" . }}
key: {{ include "argocd.redis.secretPasswordKey" . }}
{{- end }}
{{- if .Values.repoServer.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.repoServer.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.repoServer.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.repoServer.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.repoServer.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.repoServer.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.repoServer.resources }}
resources: {{- toYaml .Values.repoServer.resources | nindent 12 }}
{{- end }}
{{- if .Values.repoServer.livenessProbe.enabled }}
livenessProbe:
tcpSocket:
port: {{ .Values.repoServer.containerPorts.repoServer }}
initialDelaySeconds: {{ .Values.repoServer.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.repoServer.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.repoServer.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.repoServer.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.repoServer.livenessProbe.failureThreshold }}
{{- else if .Values.repoServer.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.repoServer.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.repoServer.readinessProbe.enabled }}
readinessProbe:
tcpSocket:
port: {{ .Values.repoServer.containerPorts.repoServer }}
initialDelaySeconds: {{ .Values.repoServer.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.repoServer.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.repoServer.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.repoServer.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.repoServer.readinessProbe.failureThreshold }}
{{- else if .Values.repoServer.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.repoServer.readinessProbe "enabled") "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
# Mounting into a path that will be read by Argo CD
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#ssh-known-host-public-keys
- name: ssh-known-hosts
mountPath: /app/config/ssh
{{- if .Values.config.tlsCerts }}
# Mounting into a path that will be read by Argo CD
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#repositories-using-self-signed-tls-certificates-or-are-signed-by-custom-ca
- mountPath: /app/config/tls
name: tls-certs
{{- end }}
# Mounting into a path that will be read by Argo CD.
# This secret will be autogenerated by Argo CD repo server unless it already exists. Users can create its own certificate to override it.
# Ref: https://argoproj.github.io/argo-cd/operator-manual/tls/#inbound-tls-certificates-used-by-argocd-repo-sever
- mountPath: /app/config/server/tls
name: argocd-repo-server-tls
- mountPath: /app/config/gpg/keys
name: gpg-keyring
- mountPath: /tmp
name: tmp-dir
{{- if .Values.repoServer.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.repoServer.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.repoServer.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.repoServer.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: ssh-known-hosts
configMap:
name: argocd-ssh-known-hosts-cm
{{- if .Values.config.tlsCerts }}
- configMap:
name: argocd-tls-certs-cm
name: tls-certs
{{- end }}
- name: argocd-repo-server-tls
secret:
items:
- key: tls.crt
path: tls.crt
- key: tls.key
path: tls.key
- key: ca.crt
path: ca.crt
optional: true
secretName: argocd-repo-server-tls
- emptyDir: {}
name: tmp-dir
- emptyDir: {}
name: gpg-keyring
{{- if .Values.repoServer.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.repoServer.extraVolumes "context" $) | nindent 8 }}
{{- end }}
@@ -0,0 +1,35 @@
{{- if .Values.repoServer.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "argocd.repo-server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: repo-server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ include "argocd.repo-server" . }}
minReplicas: {{ .Values.repoServer.autoscaling.minReplicas }}
maxReplicas: {{ .Values.repoServer.autoscaling.maxReplicas }}
metrics:
{{- if .Values.repoServer.autoscaling.targetCPU }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.repoServer.autoscaling.targetCPU }}
{{- end }}
{{- if .Values.repoServer.autoscaling.targetMemory }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.repoServer.autoscaling.targetMemory }}
{{- end }}
{{- end }}
@@ -0,0 +1,38 @@
{{- if .Values.repoServer.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.repo-server" . }}-metrics
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: repo-server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.repoServer.metrics.service.type }}
{{- if (or (eq .Values.repoServer.metrics.service.type "LoadBalancer") (eq .Values.repoServer.metrics.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.repoServer.metrics.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.repoServer.metrics.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.repoServer.metrics.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.repoServer.metrics.service.type "LoadBalancer") (not (empty .Values.repoServer.metrics.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.repoServer.metrics.service.loadBalancerIP }}
{{- end }}
ports:
- name: metrics
targetPort: metrics
port: {{ .Values.repoServer.metrics.service.port }}
protocol: TCP
{{- if (and (or (eq .Values.repoServer.service.type "NodePort") (eq .Values.repoServer.service.type "LoadBalancer")) (not (empty .Values.repoServer.metrics.service.nodePort))) }}
nodePort: {{ .Values.repoServer.metrics.service.nodePort }}
{{- else if eq .Values.repoServer.metrics.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: repo-server
{{- end }}
@@ -0,0 +1,25 @@
{{- if .Values.config.secret.repositoryCredentials }}
piVersion: v1
kind: Secret
metadata:
# Mandatory hardcoded name.
# Ref: https://github.com/argoproj/argo-helm/blob/master/charts/argo-cd/templates/argocd-repo-server/repository-credentials-secret.yaml
name: argocd-repository-credentials
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: repo-server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
# Mandatory label
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#atomic-configuration
app.kubernetes.io/part-of: argocd
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: Opaque
data:
{{- range $key, $value := .Values.config.secret.repositoryCredentials }}
{{ $key }}: {{ $value | b64enc }}
{{- end }}
{{- end }}
@@ -0,0 +1,20 @@
{{- if .Values.rbac.create }}
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.repo-server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- argoproj.io
resources:
- applications
verbs:
- get
- list
- watch
{{- end }}
@@ -0,0 +1,18 @@
{{- if and .Values.repoServer.serviceAccount.create .Values.rbac.create }}
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.repo-server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "argocd.repo-server.serviceAccountName" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "argocd.repo-server" . }}
{{- end }}
@@ -0,0 +1,16 @@
{{- if and .Values.rbac.create .Values.repoServer.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "argocd.repo-server.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: repo-server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.repoServer.serviceAccount.automountServiceAccountToken }}
{{- end }}
@@ -0,0 +1,42 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.repo-server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: repo-server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.repoServer.service.annotations }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.repoServer.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.repoServer.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.repoServer.service.type }}
{{- if (or (eq .Values.repoServer.service.type "LoadBalancer") (eq .Values.repoServer.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.repoServer.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.repoServer.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.repoServer.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.repoServer.service.type "LoadBalancer") (not (empty .Values.repoServer.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.repoServer.service.loadBalancerIP }}
{{- end }}
ports:
- name: tcp-repo-server
port: {{ .Values.repoServer.service.port }}
targetPort: repo-server
protocol: TCP
{{- if (and (or (eq .Values.repoServer.service.type "NodePort") (eq .Values.repoServer.service.type "LoadBalancer")) (not (empty .Values.repoServer.service.nodePort))) }}
nodePort: {{ .Values.repoServer.service.nodePort }}
{{- else if eq .Values.repoServer.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: repo-server
@@ -0,0 +1,22 @@
{{- if and .Values.repoServer.metrics.enabled .Values.repoServer.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "argocd.repo-server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: repo-server
spec:
endpoints:
- port: http-metrics
interval: {{ .Values.repoServer.metrics.serviceMonitor.interval }}
path: /metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: repo-server
{{- end }}
@@ -0,0 +1,36 @@
{{- if .Values.rbac.create -}}
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: ClusterRole
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- delete
- get
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- list
- apiGroups:
- ""
resources:
- pods
- pods/log
verbs:
- get
{{- end }}
@@ -0,0 +1,23 @@
{{- if .Values.rbac.create -}}
kind: ClusterRoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "argocd.server" . }}
subjects:
- kind: ServiceAccount
name: {{ include "argocd.server.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
@@ -0,0 +1,271 @@
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.server.replicaCount }}
{{- if .Values.server.updateStrategy }}
strategy: {{- toYaml .Values.server.updateStrategy | nindent 4 }}
{{- end }}
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: server
template:
metadata:
{{- if .Values.server.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.server.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: server
{{- if .Values.server.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.server.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ include "argocd.server.serviceAccountName" . }}
{{- include "argocd.imagePullSecrets" . | nindent 6 }}
{{- if .Values.server.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.server.hostAliases "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.server.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.server.affinity "context" $) | nindent 8 }}
{{- else }}
affinity:
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.server.podAffinityPreset "component" "server" "context" $) | nindent 10 }}
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.server.podAntiAffinityPreset "component" "server" "context" $) | nindent 10 }}
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.server.nodeAffinityPreset.type "key" .Values.server.nodeAffinityPreset.key "values" .Values.server.nodeAffinityPreset.values) | nindent 10 }}
{{- end }}
{{- if .Values.server.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.server.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.server.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.server.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.server.priorityClassName }}
priorityClassName: {{ .Values.server.priorityClassName | quote }}
{{- end }}
{{- if .Values.server.podSecurityContext.enabled }}
securityContext: {{- omit .Values.server.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
initContainers:
{{- if .Values.volumePermissions.enabled }}
- name: volume-permissions
image: {{ include "argocd.volumePermissions.image" . }}
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
command:
- /bin/bash
- -ec
- |
chown -R {{ .Values.server.containerSecurityContext.runAsUser }}:{{ .Values.server.containerSecurityContext.fsGroup }} /opt/bitnami/argo-cd/app
securityContext:
runAsUser: {{ .Values.volumePermissions.containerSecurityContext.runAsUser }}
{{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- end }}
volumeMounts:
- name: static-assets
mountPath: /opt/bitnami/argo-cd/app
{{- end }}
{{- if .Values.server.initContainers }}
{{- include "common.tplvalues.render" (dict "value" .Values.server.initContainers "context" $) | nindent 8 }}
{{- end }}
- name: wait-for-redis
image: {{ include "common.images.image" (dict "imageRoot" .Values.redis.image "global" .Values.global) }}
imagePullPolicy: {{ .Values.redis.image.pullPolicy | quote }}
command:
- /bin/bash
args:
- -ec
- |
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/liblog.sh
check_redis_connection() {
local result="$(redis-cli -h {{ include "argocd.redisHost" . }} -p {{ include "argocd.redisPort" . }} PING)"
if [[ "$result" != "PONG" ]]; then
false
fi
}
info "Checking redis connection..."
if ! retry_while "check_redis_connection"; then
error "Could not connect to the Redis server"
return 1
else
info "Connected to the Redis instance"
fi
env:
- name: REDISCLI_AUTH
valueFrom:
secretKeyRef:
name: {{ include "argocd.redis.secretName" . }}
key: {{ include "argocd.redis.secretPasswordKey" . }}
containers:
- name: argocd-server
image: {{ include "argocd.server.image" . }}
imagePullPolicy: {{ .Values.server.image.pullPolicy }}
{{- if .Values.server.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.server.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.server.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.server.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.server.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.server.command "context" $) | nindent 12 }}
{{- else }}
command:
- argocd-server
{{- end }}
{{- if .Values.server.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.server.args "context" $) | nindent 12 }}
{{- else }}
args:
- --staticassets
- /opt/bitnami/argo-cd/app
- --repo-server
- {{ include "argocd.repo-server" . }}:{{ .Values.repoServer.service.port }}
{{- if .Values.dex.enabled }}
- --dex-server
- http://{{ include "argocd.dex" . }}:{{ .Values.dex.service.ports.http }}
{{- end }}
- --logformat
- {{ .Values.server.logFormat }}
- --loglevel
- {{ .Values.server.logLevel }}
# TODO(miguelaeh): Test the chart using redis sentinel enabled: https://github.com/argoproj/argo-cd/blob/2a410187565e15633b6f2a8c8d8da22cf02b257d/util/cache/cache.go#L40
- --redis
- {{ include "argocd.redisHost" . }}:{{ include "argocd.redisPort" . }}
{{- if .Values.server.insecure }}
- --insecure
{{- end }}
{{- if .Values.server.extraArgs }}
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraArgs "context" $) | nindent 8 }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.server.containerPorts.http }}
protocol: TCP
{{- if .Values.server.metrics.enabled }}
- name: metrics
containerPort: {{ .Values.server.containerPorts.metrics }}
protocol: TCP
{{- end }}
env:
{{- if and .Values.redis.enabled (include "argocd.redis.auth.enabled" .) }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "argocd.redis.secretName" . }}
key: {{ include "argocd.redis.secretPasswordKey" . }}
{{- end }}
{{- if .Values.server.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
{{- if .Values.server.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.server.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.server.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.server.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- if .Values.server.resources }}
resources: {{- toYaml .Values.server.resources | nindent 12 }}
{{- end }}
{{- if .Values.server.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /healthz
port: {{ .Values.server.containerPorts.http }}
initialDelaySeconds: {{ .Values.server.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.server.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.server.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.server.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.server.livenessProbe.failureThreshold }}
{{- else if .Values.server.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.server.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /healthz
port: {{ .Values.server.containerPorts.http }}
initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.server.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.server.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.server.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.server.readinessProbe.failureThreshold }}
{{- else if .Values.server.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.server.readinessProbe "enabled") "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
# Mounting into a path that will be read by Argo CD
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#ssh-known-host-public-keys
- name: ssh-known-hosts
mountPath: /app/config/ssh
{{- if .Values.config.styles }}
- mountPath: "/bitnami/argocd/app/custom/custom.styles.css"
subPath: "custom.styles.css"
name: custom-styles
{{- end }}
{{- if .Values.config.tlsCerts }}
# Mounting into a path that will be read by Argo CD
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#repositories-using-self-signed-tls-certificates-or-are-signed-by-custom-ca
- mountPath: /app/config/tls
name: tls-certs
{{- end }}
# Mounting into a path that will be read by Argo CD.
# This secret will be autogenerated by Argo CD repo server unless it already exists. Users can create its own certificate to override it.
# Ref: https://argoproj.github.io/argo-cd/operator-manual/tls/#inbound-tls-certificates-used-by-argocd-repo-sever
- mountPath: /app/config/server/tls
name: argocd-repo-server-tls
{{- if .Values.server.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.server.sidecars }}
{{- include "common.tplvalues.render" ( dict "value" .Values.server.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes:
- name: ssh-known-hosts
configMap:
name: argocd-ssh-known-hosts-cm
{{- if .Values.config.styles }}
- configMap:
name: {{ include "argocd.custom-styles.fullname" . }}
name: custom-styles
{{- end }}
{{- if .Values.config.tlsCerts }}
- configMap:
name: argocd-tls-certs-cm
name: tls-certs
{{- end }}
- name: argocd-repo-server-tls
secret:
items:
- key: tls.crt
path: tls.crt
- key: tls.key
path: tls.key
- key: ca.crt
path: ca.crt
optional: true
secretName: argocd-repo-server-tls
{{- if .Values.server.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraVolumes "context" $) | nindent 8 }}
{{- end }}
@@ -0,0 +1,46 @@
{{- if .Values.server.ingressGrpc.enabled }}
{{- if .Values.server.ingressGrpc.secrets }}
{{- range .Values.server.ingressGrpc.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ $.Release.Namespace | quote }}
labels: {{- include "common.labels.standard" $ | nindent 4 }}
app.kubernetes.io/component: server
{{- if $.Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.server.ingressGrpc.tls .Values.server.ingressGrpc.selfSigned }}
{{- $ca := genCA "server-ca" 365 }}
{{- $cert := genSignedCert .Values.server.ingressGrpc.hostname nil (list .Values.server.ingressGrpc.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-tls" .Values.server.ingressGrpc.hostname }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ $cert.Cert | b64enc | quote }}
tls.key: {{ $cert.Key | b64enc | quote }}
ca.crt: {{ $ca.Cert | b64enc | quote }}
{{- end }}
{{- end }}
+35
View File
@@ -0,0 +1,35 @@
{{- if .Values.server.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
kind: Deployment
name: {{ include "argocd.server" . }}
minReplicas: {{ .Values.server.autoscaling.minReplicas }}
maxReplicas: {{ .Values.server.autoscaling.maxReplicas }}
metrics:
{{- if .Values.server.autoscaling.targetCPU }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.server.autoscaling.targetCPU }}
{{- end }}
{{- if .Values.server.autoscaling.targetMemory }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.server.autoscaling.targetMemory }}
{{- end }}
{{- end }}
@@ -0,0 +1,60 @@
{{- if .Values.server.ingressGrpc.enabled -}}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "argocd.server" . }}-grpc
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.server.ingressGrpc.annotations .Values.commonAnnotations .Values.server.ingressGrpc.certManager }}
annotations:
{{- if .Values.server.ingressGrpc.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- if .Values.server.ingressGrpc.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.server.ingressGrpc.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
rules:
{{- if .Values.server.ingressGrpc.hostname }}
- host: {{ .Values.server.ingressGrpc.hostname }}
http:
paths:
{{- if .Values.server.ingressGrpc.extraPaths }}
{{- toYaml .Values.server.ingressGrpc.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.server.ingressGrpc.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.server.ingressGrpc.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "argocd.server" .) "servicePort" (ternary "https" "http" .Values.server.ingressGrpc.tls) "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.server.ingressGrpc.extraHosts }}
- host: {{ .name | quote }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "argocd.server" .) "servicePort" (ternary "https" "http" .Values.server.ingressGrpc.tls) "context" $) | nindent 14 }}
{{- end }}
{{- if or .Values.server.ingressGrpc.tls .Values.server.ingressGrpc.extraTls }}
tls:
{{- if .Values.server.ingressGrpc.tls }}
- hosts:
- {{ .Values.server.ingressGrpc.hostname }}
secretName: {{ printf "%s-tls" .Values.server.ingressGrpc.hostname }}
{{- end }}
{{- if .Values.server.ingressGrpc.extraTls }}
{{- include "common.tplvalues.render" ( dict "value" .Values.server.ingressGrpc.extraTls "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
{{- end -}}
@@ -0,0 +1,60 @@
{{- if .Values.server.ingress.enabled -}}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.server.ingress.annotations .Values.commonAnnotations .Values.server.ingress.certManager }}
annotations:
{{- if .Values.server.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- if .Values.server.ingress.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.server.ingress.annotations "context" $) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
rules:
{{- if .Values.server.ingress.hostname }}
- host: {{ .Values.server.ingress.hostname }}
http:
paths:
{{- if .Values.server.ingress.extraPaths }}
{{- toYaml .Values.server.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.server.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.server.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "argocd.server" .) "servicePort" (ternary "https" "http" .Values.server.ingress.tls) "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.server.ingress.extraHosts }}
- host: {{ .name | quote }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "argocd.server" .) "servicePort" (ternary "https" "http" .Values.server.ingress.tls) "context" $) | nindent 14 }}
{{- end }}
{{- if or .Values.server.ingress.tls .Values.server.ingress.extraTls }}
tls:
{{- if .Values.server.ingress.tls }}
- hosts:
- {{ .Values.server.ingress.hostname }}
secretName: {{ printf "%s-tls" .Values.server.ingress.hostname }}
{{- end }}
{{- if .Values.server.ingress.extraTls }}
{{- include "common.tplvalues.render" ( dict "value" .Values.server.ingress.extraTls "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
{{- end -}}
@@ -0,0 +1,44 @@
{{- if .Values.server.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.server" . }}-metrics
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.server.metrics.service.annotations }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.server.metrics.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.server.metrics.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.server.metrics.service.type }}
{{- if (or (eq .Values.server.metrics.service.type "LoadBalancer") (eq .Values.server.metrics.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.server.metrics.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.server.metrics.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.server.metrics.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.server.metrics.service.type "LoadBalancer") (not (empty .Values.server.metrics.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.server.metrics.service.loadBalancerIP }}
{{- end }}
ports:
- name: metrics
targetPort: metrics
port: {{ .Values.server.metrics.service.port }}
protocol: TCP
{{- if (and (or (eq .Values.server.service.type "NodePort") (eq .Values.server.service.type "LoadBalancer")) (not (empty .Values.server.metrics.service.nodePort))) }}
nodePort: {{ .Values.server.metrics.service.nodePort }}
{{- else if eq .Values.server.metrics.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: server
{{- end }}
@@ -0,0 +1,45 @@
{{- if .Values.rbac.create }}
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
- apiGroups:
- ""
resources:
- secrets
- configmaps
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
- apiGroups:
- argoproj.io
resources:
- applications
- appprojects
verbs:
- create
- get
- list
- watch
- update
- delete
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- list
{{- end }}
@@ -0,0 +1,18 @@
{{- if and .Values.server.serviceAccount.create .Values.rbac.create }}
kind: RoleBinding
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
subjects:
- kind: ServiceAccount
name: {{ include "argocd.server.serviceAccountName" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "argocd.server" . }}
{{- end }}
@@ -0,0 +1,16 @@
{{- if and .Values.rbac.create .Values.server.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "argocd.server.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.server.serviceAccount.automountServiceAccountToken }}
{{- end }}
@@ -0,0 +1,52 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if or .Values.commonAnnotations .Values.server.service.annotations }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.server.service.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.server.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
spec:
type: {{ .Values.server.service.type }}
{{- if (or (eq .Values.server.service.type "LoadBalancer") (eq .Values.server.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.server.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if eq .Values.server.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.server.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.server.service.type "LoadBalancer") (not (empty .Values.server.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.server.service.loadBalancerIP }}
{{- end }}
ports:
- name: http
port: {{ .Values.server.service.ports.http }}
targetPort: http
protocol: TCP
{{- if (and (or (eq .Values.server.service.type "NodePort") (eq .Values.server.service.type "LoadBalancer")) (not (empty .Values.server.service.nodePorts.http))) }}
nodePort: {{ .Values.server.service.nodePorts.http }}
{{- else if eq .Values.server.service.type "ClusterIP" }}
nodePort: null
{{- end }}
- name: https
port: {{ .Values.server.service.ports.https }}
# NOTE: Argo CD uses only one port (8080) configured with https and always redirects http request to it, so the target port is the same than for http
targetPort: http
protocol: TCP
{{- if (and (or (eq .Values.server.service.type "NodePort") (eq .Values.server.service.type "LoadBalancer")) (not (empty .Values.server.service.nodePorts.https))) }}
nodePort: {{ .Values.server.service.nodePorts.https }}
{{- else if eq .Values.server.service.type "ClusterIP" }}
nodePort: null
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
app.kubernetes.io/component: server
@@ -0,0 +1,22 @@
{{- if and .Values.server.metrics.enabled .Values.server.metrics.serviceMonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "argocd.server" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
spec:
endpoints:
- port: http-metrics
interval: {{ .Values.server.metrics.serviceMonitor.interval }}
path: /metrics
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: server
{{- end }}
@@ -0,0 +1,46 @@
{{- if .Values.server.ingress.enabled }}
{{- if .Values.server.ingress.secrets }}
{{- range .Values.server.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .name }}
namespace: {{ $.Release.Namespace | quote }}
labels: {{- include "common.labels.standard" $ | nindent 4 }}
app.kubernetes.io/component: server
{{- if $.Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if and .Values.server.ingress.tls .Values.server.ingress.selfSigned }}
{{- $ca := genCA "server-ca" 365 }}
{{- $cert := genSignedCert .Values.server.ingress.hostname nil (list .Values.server.ingress.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-tls" .Values.server.ingress.hostname }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: server
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
tls.crt: {{ $cert.Cert | b64enc | quote }}
tls.key: {{ $cert.Key | b64enc | quote }}
ca.crt: {{ $ca.Cert | b64enc | quote }}
{{- end }}
{{- end }}
+20
View File
@@ -0,0 +1,20 @@
{{- if and .Values.config.styles (not .Values.config.existingStylesConfigmap) }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "argocd.custom-styles.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
# Mandatory label
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#atomic-configuration
app.kubernetes.io/part-of: argocd
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
custom.styles.css: |
{{- include "common.tplvalues.render" ( dict "value" .Values.config.styles "context" $ ) | nindent 4 }}
{{- end }}
@@ -0,0 +1,21 @@
{{- if .Values.tlsCerts }}
apiVersion: v1
kind: ConfigMap
metadata:
# Mandatory hardcoded name.
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#repositories-using-self-signed-tls-certificates-or-are-signed-by-custom-ca
name: argocd-tls-certs-cm
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
# Mandatory label
# Ref: https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#atomic-configuration
app.kubernetes.io/part-of: argocd
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
{{- include "common.tplvalues.render" (dict "value" .Values.config.tlsCerts "context" $) | nindent 2 }}
{{- end }}
File diff suppressed because it is too large Load Diff