Files
helm-charts-hardened/charts/spire/charts/spire-server/templates/configmap.yaml
T
Faisal Memonandkfox1111 b315324244 Allow for ConfigMaps to be annotated (#272)
Without an annotation, spinnaker will rename the configmap.

---------

Signed-off-by: Faisal Memon <[email protected]>
Co-authored-by: kfox1111 <[email protected]>
2023-05-11 10:49:06 -07:00

114 lines
3.3 KiB
YAML

{{- define "spire-server.yaml-config" -}}
{{- $root := . }}
server:
bind_address: "0.0.0.0"
bind_port: "8081"
trust_domain: {{ include "spire-lib.trust-domain" . | quote }}
data_dir: "/run/spire/data"
log_level: {{ .Values.logLevel | quote }}
jwt_issuer: {{ .Values.jwtIssuer | quote }}
ca_key_type: {{ .Values.caKeyType | quote }}
ca_ttl: {{ .Values.caTTL | quote }}
default_x509_svid_ttl: {{ .Values.defaultX509SvidTTL | quote }}
default_jwt_svid_ttl: {{ .Values.defaultJwtSvidTTL | quote }}
ca_subject:
{{- with .Values.ca_subject }}
- country: [{{ .country | quote }}]
organization: [{{ .organization | quote }}]
common_name: {{ .common_name | quote }}
{{- end }}
{{- with .Values.federation }}
{{- if eq (.enabled | toString) "true" }}
federation:
bundle_endpoint:
- {{ .bundleEndpoint | toYaml | nindent 8 }}
{{- end }}
{{- end }}
plugins:
DataStore:
- sql:
plugin_data:
{{ include "spire-server.datastore-config" . | nindent 10 }}
{{- with .Values.nodeAttestor.k8sPsat }}
{{- if eq (.enabled | toString) "true" }}
NodeAttestor:
- k8s_psat:
plugin_data:
clusters:
{{ include "spire-lib.cluster-name" $root }}:
service_account_allow_list: {{ include "spire-server.serviceAccountAllowedList" $root | trim }}
{{- end }}
{{- end }}
KeyManager:
- disk:
plugin_data:
keys_path: "/run/spire/data/keys.json"
Notifier:
- k8sbundle:
plugin_data:
namespace: {{ .Values.notifier.k8sbundle.namespace | default (include "spire-server.namespace" .) | quote }}
config_map: {{ include "spire-lib.bundle-configmap" . | quote }}
{{- with .Values.upstreamAuthority.disk }}
{{- if eq (.enabled | toString) "true" }}
UpstreamAuthority:
- disk:
plugin_data:
cert_file_path: "/run/spire/upstream_ca/tls.crt"
key_file_path: "/run/spire/upstream_ca/tls.key"
{{- if ne .secret.data.bundle "" }}
bundle_file_path: "/run/spire/upstream_ca/bundle.crt"
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.upstreamAuthority.certManager }}
{{- if eq (.enabled | toString) "true" }}
UpstreamAuthority:
- cert-manager:
plugin_data:
issuer_name: {{ .issuer_name | quote }}
issuer_kind: {{ .issuer_kind | quote }}
issuer_group: {{ .issuer_group | quote }}
namespace: {{ default $root.Release.Namespace .namespace | quote }}
{{- if ne .kube_config_file "" }}
kube_config_file: {{ .kube_config_file | quote }}
{{- end }}
{{- end }}
{{- end }}
health_checks:
listener_enabled: true
bind_address: "0.0.0.0"
bind_port: "8080"
live_path: "/live"
ready_path: "/ready"
{{- if (dig "telemetry" "prometheus" "enabled" .Values.telemetry.prometheus.enabled .Values.global) }}
telemetry:
- Prometheus:
- host: "0.0.0.0"
port: 9988
{{- end }}
{{- end }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "spire-server.fullname" . }}
namespace: {{ include "spire-server.namespace" . }}
{{- with .Values.configMap.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
server.conf: |
{{- include "spire-server.yaml-config" . | fromYaml | toPrettyJson | nindent 4 }}