Skip to content

Commit

Permalink
Added Persistent Volume Claim reference (#3454)
Browse files Browse the repository at this point in the history
* Added Persistent Volume Claim reference

* Added separate PVC

* Correct PVC type for storing shoots

* Change storage class, and change the flag to global

* Changed volume type to standard-rwo

* Increased volume size
  • Loading branch information
akgalwas authored Jul 23, 2024
1 parent 9330008 commit 1f53cd6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
14 changes: 9 additions & 5 deletions resources/kcp/charts/provisioner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ spec:
serviceAccountName: {{ template "fullname" . }}
nodeSelector:
{{- toYaml .Values.deployment.nodeSelector | nindent 8 }}
{{- if .Values.global.shootSpecDump.enabled }}
securityContext:
fsGroup: 2000
{{ end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.global.containerRegistry.path }}/{{ .Values.global.images.provisioner.dir }}/control-plane/provisioner:{{ .Values.global.images.provisioner.version }}"
Expand Down Expand Up @@ -145,7 +149,7 @@ spec:
- name: APP_ENQUEUE_IN_PROGRESS_OPERATIONS
value: "true"
- name: APP_GARDENER_ENABLE_DUMP_SHOOT_SPEC
value: {{ .Values.gardener.enableDumpShootSpec | quote }}
value: {{ .Values.global.shootSpecDump.enabled | quote }}
volumeMounts:
{{if .Values.gardener.auditLogExtensionConfigMapName }}
- mountPath: /gardener/tenant
Expand All @@ -165,7 +169,7 @@ spec:
mountPath: /secrets/cloudsql-sslrootcert
readOnly: true
{{- end }}
{{- if .Values.gardener.enableDumpShootSpec }}
{{- if .Values.global.shootSpecDump.enabled }}
- name: testdata-storage
mountPath: /testdata/provisioner
{{- end }}
Expand Down Expand Up @@ -213,10 +217,10 @@ spec:
{{- end }}
{{- end}}
volumes:
{{- if .Values.gardener.enableDumpShootSpec }}
{{- if .Values.global.shootSpecDump.enabled }}
- name: testdata-storage
emptyDir:
sizeLimit: 500Mi
persistentVolumeClaim:
claimName: test-prov-shoot-spec-storage
{{- end}}
{{- if and (eq .Values.global.database.embedded.enabled false) (eq .Values.global.database.cloudsqlproxy.enabled true) (eq .Values.global.database.cloudsqlproxy.workloadIdentity.enabled false)}}
- name: cloudsql-instance-credentials
Expand Down
14 changes: 14 additions & 0 deletions resources/kcp/charts/provisioner/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.global.shootSpecDump.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test-prov-shoot-spec-storage
namespace: kcp-system
spec:
storageClassName: standard-rwo
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
{{- end }}
3 changes: 2 additions & 1 deletion resources/kcp/charts/provisioner/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
global:
shootSpecDump:
enabled: false
containerRegistry:
path: europe-docker.pkg.dev/kyma-project
images:
Expand Down Expand Up @@ -56,7 +58,6 @@ gardener:
defaultEnableKubernetesVersionAutoUpdate: false
defaultEnableMachineImageVersionAutoUpdate: false
defaultEnableIMDSv2: false
enableDumpShootSpec: false

support:
enabledCreatingRoleBindingForAdmin: false
Expand Down

0 comments on commit 1f53cd6

Please sign in to comment.