Change spire-agent configmap to yaml format
Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
@@ -1,3 +1,50 @@
|
|||||||
|
{{- define "spire-agent.yaml-config" -}}
|
||||||
|
agent:
|
||||||
|
data_dir: "/run/spire"
|
||||||
|
log_level: {{ .Values.logLevel | quote }}
|
||||||
|
server_address: {{ include "spire-agent.server-address" . | trim | quote }}
|
||||||
|
server_port: {{ .Values.server.port | quote }}
|
||||||
|
socket_path: {{ include "spire-agent.socket-path" . | quote }}
|
||||||
|
trust_bundle_path: "/run/spire/bundle/bundle.crt"
|
||||||
|
trust_domain: {{ include "spire-agent.trust-domain" . | quote }}
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
NodeAttestor:
|
||||||
|
- k8s_psat:
|
||||||
|
plugin_data:
|
||||||
|
cluster: {{ include "spire-agent.cluster-name" . | quote }}
|
||||||
|
|
||||||
|
KeyManager:
|
||||||
|
- memory:
|
||||||
|
plugin_data:
|
||||||
|
|
||||||
|
WorkloadAttestor:
|
||||||
|
- k8s:
|
||||||
|
plugin_data:
|
||||||
|
# Defaults to the secure kubelet port by default.
|
||||||
|
# Minikube does not have a cert in the cluster CA bundle that
|
||||||
|
# can authenticate the kubelet cert, so skip validation.
|
||||||
|
skip_kubelet_verification: true
|
||||||
|
|
||||||
|
{{- if .Values.workloadAttestors.unix.enabled }}
|
||||||
|
- unix:
|
||||||
|
plugin_data:
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
health_checks:
|
||||||
|
listener_enabled: true
|
||||||
|
bind_address: "0.0.0.0"
|
||||||
|
bind_port: {{ .Values.healthChecks.port | quote }}
|
||||||
|
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: {{ .Values.telemetry.prometheus.port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
@@ -5,58 +52,4 @@ metadata:
|
|||||||
namespace: {{ include "spire-agent.namespace" . }}
|
namespace: {{ include "spire-agent.namespace" . }}
|
||||||
data:
|
data:
|
||||||
agent.conf: |
|
agent.conf: |
|
||||||
agent {
|
{{- include "spire-agent.yaml-config" . | fromYaml | toPrettyJson | nindent 4 }}
|
||||||
data_dir = "/run/spire"
|
|
||||||
log_level = {{ .Values.logLevel | quote }}
|
|
||||||
server_address = {{ include "spire-agent.server-address" . | trim | quote }}
|
|
||||||
server_port = {{ .Values.server.port | quote }}
|
|
||||||
socket_path = {{ include "spire-agent.socket-path" . | quote }}
|
|
||||||
trust_bundle_path = "/run/spire/bundle/bundle.crt"
|
|
||||||
trust_domain = {{ include "spire-agent.trust-domain" . | quote }}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
NodeAttestor "k8s_psat" {
|
|
||||||
plugin_data {
|
|
||||||
cluster = {{ include "spire-agent.cluster-name" . | quote }}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
KeyManager "memory" {
|
|
||||||
plugin_data {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
WorkloadAttestor "k8s" {
|
|
||||||
plugin_data {
|
|
||||||
# Defaults to the secure kubelet port by default.
|
|
||||||
# Minikube does not have a cert in the cluster CA bundle that
|
|
||||||
# can authenticate the kubelet cert, so skip validation.
|
|
||||||
skip_kubelet_verification = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{{- if .Values.workloadAttestors.unix.enabled }}
|
|
||||||
WorkloadAttestor "unix" {
|
|
||||||
plugin_data {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{{- end }}
|
|
||||||
}
|
|
||||||
|
|
||||||
health_checks {
|
|
||||||
listener_enabled = true
|
|
||||||
bind_address = "0.0.0.0"
|
|
||||||
bind_port = {{ .Values.healthChecks.port | quote }}
|
|
||||||
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 = {{ .Values.telemetry.prometheus.port }}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{{- end }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user