Skip to content

Commit

Permalink
Fix(atlantis) Unable to use custom port #420 (#426)
Browse files Browse the repository at this point in the history
update docs

bump minor version

Reset patch version
  • Loading branch information
doctahpopp authored Oct 9, 2024
1 parent 43ad5c3 commit 3f87467
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/atlantis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
appVersion: v0.29.0
description: A Helm chart for Atlantis https://www.runatlantis.io
name: atlantis
version: 5.5.2
version: 5.6.0
keywords:
- terraform
home: https://www.runatlantis.io
Expand Down
2 changes: 1 addition & 1 deletion charts/atlantis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ extraManifests:
| service.nodePort | string | `nil` | |
| service.port | int | `80` | |
| service.portName | string | `"atlantis"` | |
| service.targetPort | int | `4141` | |
| service.targetPort | int | `4141` | [optional] Define the port you would like atlantis to run on. Defaults to 4141. |
| service.type | string | `"NodePort"` | |
| serviceAccount.annotations | object | `{}` | Annotations for the Service Account. Check values.yaml for examples. |
| serviceAccount.create | bool | `true` | Specifies whether a ServiceAccount should be created. |
Expand Down
8 changes: 4 additions & 4 deletions charts/atlantis/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ spec:
{{- end }}
ports:
- name: atlantis
containerPort: 4141
containerPort: {{ .Values.service.targetPort }}
{{- with .Values.lifecycle }}
lifecycle: {{ toYaml . | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -326,7 +326,7 @@ spec:
value: {{ .Values.orgWhitelist | quote }}
{{- end }}
- name: ATLANTIS_PORT
value: "4141"
value: {{ .Values.service.targetPort | quote }}
{{- if .Values.repoConfig }}
- name: ATLANTIS_REPO_CONFIG
value: /etc/atlantis/repos.yaml
Expand Down Expand Up @@ -505,7 +505,7 @@ spec:
livenessProbe:
httpGet:
path: /healthz
port: 4141
port: {{ .Values.service.targetPort }}
scheme: {{ .Values.livenessProbe.scheme }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
Expand All @@ -517,7 +517,7 @@ spec:
readinessProbe:
httpGet:
path: /healthz
port: 4141
port: {{ .Values.service.targetPort }}
scheme: {{ .Values.readinessProbe.scheme }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
Expand Down
48 changes: 48 additions & 0 deletions charts/atlantis/tests/statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,54 @@ tests:
path: spec.template.spec.updateStrategy
- notExists:
path: spec.volumeClaimTemplates
- it: custom port values
template: statefulset.yaml
set:
service:
targetPort: 8888
asserts:
- equal:
path: spec.template.spec.containers[0].ports
value:
- containerPort: 8888
name: atlantis
- equal:
path: spec.template.spec.containers[0].env
value:
- name: PATH
value: /plugins:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: ATLANTIS_DATA_DIR
value: /atlantis-data
- name: ATLANTIS_REPO_ALLOWLIST
value: <replace-me>
- name: ATLANTIS_PORT
value: "8888"
- name: ATLANTIS_ATLANTIS_URL
value: http://
- equal:
path: spec.template.spec.containers[0].livenessProbe
value:
failureThreshold: 5
httpGet:
path: /healthz
port: 8888
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
- equal:
path: spec.template.spec.containers[0].readinessProbe
value:
failureThreshold: 5
httpGet:
path: /healthz
port: 8888
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 60
successThreshold: 1
timeoutSeconds: 5
- it: replicaCount
template: statefulset.yaml
set:
Expand Down
1 change: 1 addition & 0 deletions charts/atlantis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ service:
port: 80
portName: atlantis
nodePort: null
# -- (int) [optional] Define the port you would like atlantis to run on. Defaults to 4141.
targetPort: 4141
loadBalancerIP: null
loadBalancerSourceRanges: []
Expand Down

0 comments on commit 3f87467

Please sign in to comment.