Improve upstream CA
Signed-off-by: Marco Franssen <[email protected]> Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
@@ -64,10 +64,10 @@ data:
|
||||
{{- if eq (.enabled | toString) "true" }}
|
||||
UpstreamAuthority "disk" {
|
||||
plugin_data {
|
||||
cert_file_path = "{{ .certFilePath }}"
|
||||
key_file_path = "{{ .keyFilePath }}"
|
||||
{{- if ne .bundleFilePath "" }}
|
||||
bundle_file_path = "{{ .bundleFilePath }}"
|
||||
cert_file_path = "/run/spire/upstream_ca/tls.crt"
|
||||
key_file_path = "/run/spire/upstream_ca/tls.key"
|
||||
{{- if ne .bundle "" }}
|
||||
bundle_file_path = "/run/spire/upstream_ca/bundle.crt"
|
||||
{{- end }}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ spec:
|
||||
mountPath: /run/spire/data
|
||||
readOnly: false
|
||||
{{ end }}
|
||||
{{- if eq (.Values.server.caSecretStorage.enabled | toString) "true" }}
|
||||
- name: secret-data
|
||||
mountPath: {{ .Values.server.caSecretStorage.path }}
|
||||
{{- if eq (.Values.server.config.upstreamAuthority.disk.enabled | toString) "true" }}
|
||||
- name: upstream-ca
|
||||
mountPath: /run/spire/upstream_ca
|
||||
readOnly: false
|
||||
{{ end }}
|
||||
livenessProbe:
|
||||
@@ -127,10 +127,10 @@ spec:
|
||||
hostPath:
|
||||
path: /run/spire/server-sockets
|
||||
type: DirectoryOrCreate
|
||||
{{- if eq (.Values.server.caSecretStorage.enabled | toString) "true" }}
|
||||
- name: secret-data
|
||||
{{- if eq (.Values.server.config.upstreamAuthority.disk.enabled | toString) "true" }}
|
||||
- name: upstream-ca
|
||||
secret:
|
||||
secretName: {{ .Values.server.caSecretStorage.secretName }}
|
||||
secretName: {{ include "spire.fullname" . }}-upstream-ca
|
||||
{{- end }}
|
||||
volumeClaimTemplates:
|
||||
{{- if eq (.Values.server.dataStorage.enabled | toString) "true" }}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- if eq (.Values.server.config.upstreamAuthority.disk.enabled | toString) "true"}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "spire.fullname" . }}-upstream-ca
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "spire.server.labels" . | nindent 4 }}
|
||||
data:
|
||||
tls.crt: {{ .Values.server.config.upstreamAuthority.disk.certificate | toYaml | indent 2 }}
|
||||
tls.key: {{ .Values.server.config.upstreamAuthority.disk.key | toYaml | indent 2 }}
|
||||
{{- if ne .Values.server.config.upstreamAuthority.disk.bundle ""}}
|
||||
bundle.crt: {{ .Values.server.config.upstreamAuthority.disk.bundle | toYaml | indent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user