Skip to content

Commit

Permalink
feat: OpenTofu support to helm chart (#430)
Browse files Browse the repository at this point in the history
* feat: OpenTofu support to helm chart

---------

Co-authored-by: Gabriel Martinez <[email protected]>
  • Loading branch information
seifrajhi and GMartinez-Sisti authored Oct 13, 2024
1 parent 0f179ba commit bc98b31
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
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
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

0 comments on commit bc98b31

Please sign in to comment.