From 90bcd1a5ef30b87dafe543726f8fdaaf0fe6cf84 Mon Sep 17 00:00:00 2001 From: Valentin LANDEMAINE <48279741+vlandemaine-orange@users.noreply.github.com> Date: Tue, 19 Mar 2019 16:52:23 +0100 Subject: [PATCH] Feature : Add possibility to specify an ImagePullSecrets for pulling images from private registry (#12326) Fix : Renaming storageClass to storageClassName Fix reviews : rename to helm parameters to storageClassName and fix indent imagePullSecrets Fix : Switch to camel case Bump version to 1.2.0 Signed-off-by: Landemaine Valentin --- stable/atlantis/Chart.yaml | 2 +- stable/atlantis/README.md | 9 +++++---- stable/atlantis/templates/secret-webhook.yaml | 2 +- stable/atlantis/templates/statefulset.yaml | 14 +++++++++----- stable/atlantis/values.yaml | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/stable/atlantis/Chart.yaml b/stable/atlantis/Chart.yaml index 058036f583..a610d4a8ab 100644 --- a/stable/atlantis/Chart.yaml +++ b/stable/atlantis/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "v0.4.11" description: A Helm chart for Atlantis https://www.runatlantis.io name: atlantis -version: 1.1.7 +version: 1.2.0 keywords: - terraform home: https://www.runatlantis.io diff --git a/stable/atlantis/README.md b/stable/atlantis/README.md index 667bb2672b..a2db9fbaba 100644 --- a/stable/atlantis/README.md +++ b/stable/atlantis/README.md @@ -30,16 +30,16 @@ The following options are supported. See [values.yaml](values.yaml) for more de | Parameter | Description | Default | | ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- | -| `allow_repo_config` | Whether to allow the use of [atlantis.yaml files](https://www.runatlantis.io/docs/atlantis-yaml-reference.html). | `false` | -| `atlantis_data_storage` | The amount of storage available for Atlantis' data directory (mostly used to check out git repositories). | `5Gi` | -| `atlantis_data_storageClass` | Storage class of the volume mounted for the Atlantis data directory. | n/a | +| `allowRepoConfig` | Whether to allow the use of [atlantis.yaml files](https://www.runatlantis.io/docs/atlantis-yaml-reference.html). | `false` | +| `atlantisDataStorage` | The amount of storage available for Atlantis' data directory (mostly used to check out git repositories). | `5Gi` | | `aws.config` | Contents of a file to be mounted to `~atlantis/.aws/config`. | n/a | | `aws.credentials` | Contents of a file to be mounted to `~atlantis/.aws/credentials`. | n/a | | `bitbucket.user` | The name of the Atlantis Bitbucket user.,This value should not be defined if Atlantis is not working against Bitbucket repositories. | n/a | | `bitbucket.token` | The personal access token for the Atlantis Bitbucket user.,This value should not be defined if Atlantis is not integrated with Bitbucket repositories. | n/a | | `bitbucket.secret` | Bitbucket Server only: The webhook secret for Bitbucket repositories. | n/a | -| `bitbucket.base_url` | Bitbucket Server only: The hostname of your Bitbucket Server installation. | n/a | +| `bitbucket.baseUrl` | Bitbucket Server only: The hostname of your Bitbucket Server installation. | n/a | | `environment` | Additional environment variables for the container. | n/a | +| `imagePullSecrets` | Specify a secret for pulling images from a private registry. | n/a | | `gitconfig` | Contents of a file to be mounted to `~atlantis/.gitconfig`. Use to allow redirection for Terraform modules in private git repositories. | n/a | | `github.user` | The name of the Atlantis GitHub user. This value should defined if Atlantis is not working against GitHub repositories. | n/a | | `github.token` | The personal access token for the Atlantis GitHub user.,This value should not be defined if Atlantis is not integrated with GitHub repositories. | n/a | @@ -60,6 +60,7 @@ The following options are supported. See [values.yaml](values.yaml) for more de | `serviceAccountSecrets.credentials-staging` | JSON object representing secrets for a Google Cloud Platform staging,service account. Only applicable if hosting Atlantis on GKE. | n/a | | `service.port` | Specifies the port of the service. | `80` | | `service.loadBalancerSourceRanges` | An array of whitelisted IP addresses for the Atlantis Service in Kubernetes. If no value is specified, the Service will allow incoming traffic from all IP addresses (0.0.0.0/0). | n/a | +| `storageClassName` | Storage class of the volume mounted for the Atlantis data directory. | n/a | | `tlsSecretName` | The name of a Kubernetes Secret for Atlantis' HTTPS certificate containing the following data items `tls.crt` with the public certificate and `tls.key` with the private key. | n/a | diff --git a/stable/atlantis/templates/secret-webhook.yaml b/stable/atlantis/templates/secret-webhook.yaml index 0ca10ee845..20cd83308d 100644 --- a/stable/atlantis/templates/secret-webhook.yaml +++ b/stable/atlantis/templates/secret-webhook.yaml @@ -18,7 +18,7 @@ data: {{- end}} {{- if .Values.bitbucket }} bitbucket_token: {{ required "bitbucket.token is required if bitbucket configuration is specified." .Values.bitbucket.token | b64enc }} - {{- if .Values.bitbucket.base_url }} + {{- if .Values.bitbucket.baseUrl }} bitbucket_secret: {{ required "bitbucket.secret is required if bitbucket.baseurl is specified." .Values.bitbucket.secret | b64enc }} {{- end}} {{- end }} diff --git a/stable/atlantis/templates/statefulset.yaml b/stable/atlantis/templates/statefulset.yaml index d3e591881a..41513303fc 100644 --- a/stable/atlantis/templates/statefulset.yaml +++ b/stable/atlantis/templates/statefulset.yaml @@ -141,9 +141,9 @@ spec: secretKeyRef: name: {{ template "atlantis.fullname" . }}-webhook key: bitbucket_token - {{- if .Values.bitbucket.base_url }} + {{- if .Values.bitbucket.baseUrl }} - name: ATLANTIS_BITBUCKET_BASE_URL - value: {{ .Values.bitbucket.base_url }} + value: {{ .Values.bitbucket.baseUrl }} - name: ATLANTIS_BITBUCKET_WEBHOOK_SECRET valueFrom: secretKeyRef: @@ -206,6 +206,10 @@ spec: mountPath: /etc/tls/ {{- end }} resources: + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + - name: {{ .Values.imagePullSecrets }} + {{- end }} {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} nodeSelector: @@ -224,11 +228,11 @@ spec: name: atlantis-data spec: accessModes: ["ReadWriteOnce"] # Volume should not be shared by multiple nodes. - {{- if .Values.atlantis_data_storageClass }} - storageClass: {{ .Values.atlantis_data_storageClass }} # Storage class of the volume + {{- if .Values.storageClassName }} + storageClassName: {{ .Values.storageClassName }} # Storage class of the volume {{- end }} resources: requests: # The biggest thing Atlantis stores is the Git repo when it checks it out. # It deletes the repo after the pull request is merged. - storage: {{ .Values.atlantis_data_storage }} + storage: {{ .Values.atlantisDataStorage }} diff --git a/stable/atlantis/values.yaml b/stable/atlantis/values.yaml index af9d3ee79c..5b8f7d1ef8 100644 --- a/stable/atlantis/values.yaml +++ b/stable/atlantis/values.yaml @@ -138,7 +138,7 @@ resources: cpu: 100m # Disk space for Atlantis to check out repositories -atlantis_data_storage: 5Gi +atlantisDataStorage: 5Gi replicaCount: 1