-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move atlantis-data volume to a separate PVC (#304)
* Move atlantis-data volume to a separate PVC * bump chart version * change access mode to ReadWriteMany * Bump chart version * Add custom access modes to pvc * Add volumeClaim.accessModes in jsonSchema * Fix jsonSchema missing comma * add unit tests * concatenate conditions Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com> * add volume in sts if pvc is created --------- Co-authored-by: PePe Amengual <jose.amengual@gmail.com> Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com>
- Loading branch information
1 parent
6d24ec5
commit 4cdb790
Showing
7 changed files
with
147 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if and .Values.volumeClaim.enabled ( not .Values.dataStorage ) }} | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ template "atlantis.fullname" . }}-data | ||
labels: | ||
{{- include "atlantis.labels" . | nindent 2 }} | ||
spec: | ||
accessModes: {{ .Values.volumeClaim.accessModes| toYaml | nindent 2 }} | ||
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.volumeClaim.dataStorage }} | ||
{{- if .Values.volumeClaim.storageClassName }} | ||
storageClassName: {{ .Values.volumeClaim.storageClassName }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
suite: test pvc | ||
templates: | ||
- pvc.yaml | ||
chart: | ||
appVersion: test-appVersion | ||
release: | ||
name: my-release | ||
tests: | ||
- it: pvc | ||
template: pvc.yaml | ||
asserts: | ||
- isKind: | ||
of: PersistentVolumeClaim | ||
- equal: | ||
path: apiVersion | ||
value: v1 | ||
- equal: | ||
path: metadata.name | ||
value: my-release-atlantis-data | ||
- equal: | ||
path: spec.accessModes | ||
value: | ||
- ReadWriteOnce | ||
- equal: | ||
path: spec.resources.requests.storage | ||
value: 5Gi | ||
- it: accessModes | ||
template: pvc.yaml | ||
set: | ||
volumeClaim: | ||
accessModes: | ||
- ReadWriteMany | ||
asserts: | ||
- equal: | ||
path: spec.accessModes | ||
value: | ||
- ReadWriteMany | ||
- it: storage requests | ||
template: pvc.yaml | ||
set: | ||
volumeClaim: | ||
dataStorage: 10Gi | ||
asserts: | ||
- equal: | ||
path: spec.resources.requests.storage | ||
value: 10Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters