Skip to content

Commit ce6b31d

Browse files
authored
fix: address a RO directory issue in templates (#706)
1 parent 63da14c commit ce6b31d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

charts/hub-agent/templates/deployment.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,21 @@ spec:
9090
fieldPath: metadata.namespace
9191
resources:
9292
{{- toYaml .Values.resources | nindent 12 }}
93+
{{- if .Values.useCertManager }}
9394
volumeMounts:
9495
- name: webhook-cert
9596
# This path must match FleetWebhookCertDir in pkg/webhook/webhook.go
9697
mountPath: /tmp/k8s-webhook-server/serving-certs
97-
{{- if .Values.useCertManager }}
9898
readOnly: true
99-
{{- end }}
99+
{{- else }}
100+
volumeMounts:
101+
- name: webhook-cert
102+
# This path must match FleetWebhookCertDir in pkg/webhook/webhook.go.
103+
# Note that this must be mounted one level up from the hardcoded path, otherwise
104+
# the read only root filesystem setup would block the agent from attempting to
105+
# clear the directory.
106+
mountPath: /tmp/k8s-webhook-server/
107+
{{- end }}
100108
volumes:
101109
- name: webhook-cert
102110
{{- if .Values.useCertManager }}

0 commit comments

Comments
 (0)