Skip to content

Commit

Permalink
[stable/atlantis] Add support for require-approval option to Atlantis…
Browse files Browse the repository at this point in the history
… chart. (helm#11438)

* Add support for --require-approval flag to Atlantis chart.

Signed-off-by: Daniel Whelan <[email protected]>

* Set 'require approval' via environment variable instead of flag.

Signed-off-by: Daniel Whelan <[email protected]>

* Update stable/atlantis/README.md

Co-Authored-By: ophelan <[email protected]>
Signed-off-by: Daniel Whelan <[email protected]>

* Update stable/atlantis/values.yaml

Co-Authored-By: ophelan <[email protected]>
Signed-off-by: Daniel Whelan <[email protected]>

* Add requireMergeable parameter.

Signed-off-by: Daniel Whelan <[email protected]>

* Remove trailing space.

Signed-off-by: Daniel Whelan <[email protected]>
  • Loading branch information
ophelan authored and k8s-ci-robot committed Mar 1, 2019
1 parent 40aee78 commit 0b62512
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/atlantis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.5
version: 1.1.6
keywords:
- terraform
home: https://www.runatlantis.io
Expand Down
2 changes: 2 additions & 0 deletions stable/atlantis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ The following options are supported. See [values.yaml](values.yaml) for more de
| `podTemplate.annotations` | Specifies additional annotations to use for the StatefulSet | n/a |
| `logLevel` | The level to use for logging. | n/a |
| `orgWhiteList` | A whitelist of repositories from which Atlantis will accept webhooks. **This value must be changed for Atlantis to function correctly.** Accepts wildcard characters (`*`). Multiple values may be comma-separated. | `github.com/yourorg/*` |
| `requireApproval` | Whether to require pull request approval prior to applies. See [Approved Requirement](https://www.runatlantis.io/docs/apply-requirements.html#approved). | `false` |
| `requireMergeable` | Whether to require pull request to meet repository mergeability requirements prior to applies. See [Approved Requirement](https://www.runatlantis.io/docs/apply-requirements.html#mergeable). | `false` |
| `serviceAccount.create` | Whether to create a Kubernetes ServiceAccount if no account matching `serviceAccount.name` exists. | `true` |
| `serviceAccount.name` | The name of the Kubernetes ServiceAccount under which Atlantis should run.<br /><br />If no value is specified and `serviceAccount.create` is `true`, Atlantis will be run under a ServiceAccount whose name is the FullName of the Helm chart's instance. <br /><br />If no value is specified and `serviceAccount.create` is `false`, Atlantis will be run under the `default` ServiceAccount. | n/a |
| `serviceAccountSecrets.credentials` | JSON object representing secrets for a Google Cloud Platform production service account. Only applicable if hosting Atlantis on GKE. | n/a |
Expand Down
8 changes: 8 additions & 0 deletions stable/atlantis/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ spec:
key: bitbucket_secret
{{- end }}
{{- end }}
{{- if .Values.requireApproval }}
- name: ATLANTIS_REQUIRE_APPROVAL
value: "true"
{{- end }}
{{- if .Values.requireMergeable }}
- name: ATLANTIS_REQUIRE_MERGEABLE
value: "true"
{{- end }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
httpGet:
Expand Down
6 changes: 6 additions & 0 deletions stable/atlantis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ image:
## enable using atlantis.yaml file
allowRepoConfig: false

# Require all pull requests be approved prior to apply.
requireApproval: false

# Require all pull requests to meet repository mergeability requirements prior to apply.
requireMergeable: false

# We only need to check every 60s since Atlantis is not a high-throughput service.
livenessProbe:
enabled: true
Expand Down

0 comments on commit 0b62512

Please sign in to comment.