Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: OpenTofu support to helm chart #430

Merged
merged 12 commits into from
Oct 13, 2024
4 changes: 2 additions & 2 deletions charts/atlantis/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
# renovate: datasource=docker depName=ghcr.io/runatlantis/atlantis
appVersion: v0.29.0
appVersion: v0.30.0
seifrajhi marked this conversation as resolved.
Show resolved Hide resolved
description: A Helm chart for Atlantis https://www.runatlantis.io
name: atlantis
version: 5.6.0
version: 5.7.0
keywords:
- terraform
home: https://www.runatlantis.io
Expand Down
1 change: 1 addition & 0 deletions charts/atlantis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ extraManifests:
| containerSecurityContext | object | `{}` | Check values.yaml for examples. |
| customPem | string | `""` | Allows to override the /etc/ssl/certs/ca-certificates.cer with your custom one. You have to create a secret with the specified name. |
| dataStorage | string | `""` | DEPRECATED - Disk space available to check out repositories. Example: 5Gi. |
| defaultTFDistribution | string | `"terraform"` | Sets the default terraform distribution to use. Can be set to terraform or opentofu. |
| defaultTFVersion | string | `""` | Sets the default terraform version to be used in atlantis server. Check values.yaml for examples. |
| disableApply | bool | `false` | Disables running `atlantis apply` regardless of which flags are sent with it. |
| disableApplyAll | bool | `false` | Disables running `atlantis apply` without any flags. |
Expand Down
4 changes: 4 additions & 0 deletions charts/atlantis/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ spec:
- name: ATLANTIS_DEFAULT_TF_VERSION
value: {{ .Values.defaultTFVersion }}
{{- end }}
{{- if .Values.defaultTFDistribution }}
- name: ATLANTIS_TF_DISTRIBUTION
value: {{ .Values.defaultTFDistribution }}
{{- end }}
{{- if .Values.logLevel }}
- name: ATLANTIS_LOG_LEVEL
value: {{ .Values.logLevel | quote}}
Expand Down
10 changes: 10 additions & 0 deletions charts/atlantis/tests/statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ tests:
value:
- name: PATH
value: /plugins:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: ATLANTIS_TF_DISTRIBUTION
value: terraform
- name: ATLANTIS_DATA_DIR
value: /atlantis-data
- name: ATLANTIS_REPO_ALLOWLIST
Expand Down Expand Up @@ -184,6 +186,8 @@ tests:
value:
- name: PATH
value: /plugins:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: ATLANTIS_TF_DISTRIBUTION
value: terraform
- name: ATLANTIS_DATA_DIR
value: /atlantis-data
- name: ATLANTIS_REPO_ALLOWLIST
Expand Down Expand Up @@ -993,6 +997,8 @@ tests:
value:
- name: PATH
value: /foo:/bar:/plugins:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: ATLANTIS_TF_DISTRIBUTION
value: terraform
- name: ATLANTIS_DATA_DIR
value: /atlantis-data
- name: ATLANTIS_REPO_ALLOWLIST
Expand All @@ -1011,6 +1017,8 @@ tests:
value:
- name: PATH
value: /home/atlantis:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: ATLANTIS_TF_DISTRIBUTION
value: terraform
- name: ATLANTIS_DATA_DIR
value: /atlantis-data
- name: ATLANTIS_REPO_ALLOWLIST
Expand All @@ -1030,6 +1038,8 @@ tests:
value:
- name: PATH
value: /foo:/bar:/home/atlantis:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: ATLANTIS_TF_DISTRIBUTION
value: terraform
- name: ATLANTIS_DATA_DIR
value: /atlantis-data
- name: ATLANTIS_REPO_ALLOWLIST
Expand Down
9 changes: 9 additions & 0 deletions charts/atlantis/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,15 @@
"description": "Allow atlantis to hide no-changes plan comments",
"default": false
},
"defaultTFDistribution": {
"type": "string",
"description": "Default Atlantis distribution to be used by atlantis server. Either opentofu or terraform",
"default": "terraform",
"enum": [
"terraform",
"opentofu"
]
},
"defaultTFVersion": {
"type": "string",
"description": "Default Terraform version to be used by atlantis server"
Expand Down
3 changes: 3 additions & 0 deletions charts/atlantis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ hidePrevPlanComments: false
# -- Enables atlantis to hide no-changes plan comments from the pull request.
hideUnchangedPlanComments: false

# -- Sets the default terraform distribution to use. Can be set to terraform or opentofu.
defaultTFDistribution: terraform

# -- Sets the default terraform version to be used in atlantis server.
# Check values.yaml for examples.
defaultTFVersion: ""
Expand Down