diff --git a/roles/kubernetes-apps/ansible/templates/dashboard.yml.j2 b/roles/kubernetes-apps/ansible/templates/dashboard.yml.j2 index cf222011c8d5e52a4e5bf300f94c8294f3607127..ed8478dc4608c0e7ee2f3066e2013cde0a0b6e8c 100644 --- a/roles/kubernetes-apps/ansible/templates/dashboard.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/dashboard.yml.j2 @@ -176,8 +176,10 @@ spec: # to it. Uncomment only if the default does not work. # - --apiserver-host=http://my-address:port volumeMounts: +{% if not dashboard_use_custom_certs %} - name: kubernetes-dashboard-certs mountPath: /certs +{% endif %} # Create on-disk volume to store exec logs - mountPath: /tmp name: tmp-volume @@ -189,9 +191,11 @@ spec: initialDelaySeconds: 30 timeoutSeconds: 30 volumes: +{% if not dashboard_use_custom_certs %} - name: kubernetes-dashboard-certs secret: secretName: kubernetes-dashboard-certs +{% endif %} - name: tmp-volume emptyDir: {} serviceAccountName: kubernetes-dashboard