Skip to content

Commit

Permalink
convert configs to json form (#1041)
Browse files Browse the repository at this point in the history
Signed-off-by: Volkan Özçelik <[email protected]>
  • Loading branch information
v0lkan authored Jul 5, 2024
1 parent bfbc68f commit e417df2
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,48 @@ metadata:
namespace: {{ .Values.global.spire.namespace }}
data:
agent.conf: |
agent {
data_dir = "/run/spire"
log_level = {{ .Values.global.spire.logLevel | quote }}
server_address = {{ .Values.global.spire.serverAddress | quote }}
server_port = {{ .Values.global.spire.serverPort | quote }}
socket_path = "/run/spire/sockets/agent.sock"
trust_bundle_path = "/run/spire/bundle/bundle.crt"
trust_domain = {{ .Values.global.spire.trustDomain | quote }}
}
health_checks {
bind_address = "0.0.0.0"
bind_port = "9982"
listener_enabled = true
live_path = "/live"
ready_path = "/ready"
}
plugins {
NodeAttestor "k8s_psat" {
plugin_data {
cluster = "vsecm-cluster"
}
}
KeyManager "memory" {
plugin_data {
}
}
WorkloadAttestor "k8s" {
plugin_data {
skip_kubelet_verification = true
}
{
"agent": {
"data_dir": "/run/spire",
"log_level": {{ .Values.global.spire.logLevel | quote }},
"server_address": {{ .Values.global.spire.serverAddress | quote }},
"server_port": {{ .Values.global.spire.serverPort | quote }},
"socket_path": "/run/spire/sockets/agent.sock",
"trust_bundle_path": "/run/spire/bundle/bundle.crt",
"trust_domain": {{ .Values.global.spire.trustDomain | quote }}
},
"health_checks": {
"bind_address": "0.0.0.0",
"bind_port": "9982",
"listener_enabled": true,
"live_path": "/live",
"ready_path": "/ready"
},
"plugins": {
"NodeAttestor": [
{
"k8s_psat": {
"plugin_data": {
"cluster": "vsecm-cluster"
}
}
}
],
"KeyManager": [
{
"memory": {
"plugin_data": null
}
}
],
"WorkloadAttestor": [
{
"k8s": {
"plugin_data": {
"skip_kubelet_verification": true
}
}
}
]
}
}
129 changes: 67 additions & 62 deletions helm-charts/0.26.1/charts/spire/templates/spire-server-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,71 +16,76 @@ metadata:
namespace: {{ .Values.global.spire.serverNamespace }}
data:
server.conf: |
server {
bind_address = "0.0.0.0"
bind_port = "8081"
trust_domain = {{ .Values.global.spire.trustDomain | quote }}
data_dir = "/run/spire/server/data"
log_level = "DEBUG"
federation {
bundle_endpoint {
address = "0.0.0.0"
port = 8443
}
}
{
"server": {
"bind_address": "0.0.0.0",
"bind_port": "8081",
"trust_domain": {{ .Values.global.spire.trustDomain | quote }},
"data_dir": "/run/spire/server/data",
"log_level": "DEBUG",
"federation": {
"bundle_endpoint": {
"address": "0.0.0.0",
"port": 8443
}
{{- if .Values.experimental.eventsBasedCache }}
experimental {
events_based_cache = true
}
{{- end }}

}

health_checks {
bind_address = "0.0.0.0"
bind_port = "8080"
listener_enabled = true
live_path = "/live"
ready_path = "/ready"
}

plugins {
DataStore "sql" {
plugin_data {
database_type = "sqlite3"
connection_string = "/run/spire/server/data/datastore.sqlite3"
},
"experimental": {
"events_based_cache": true
}
}

NodeAttestor "k8s_psat" {
plugin_data {
clusters = {
"vsecm-cluster" = {
service_account_allow_list = ["{{ .Values.global.spire.namespace }}:spire-agent"]
{{- else }}
}
{{- end }}
},
"health_checks": {
"bind_address": "0.0.0.0",
"bind_port": "8080",
"listener_enabled": true,
"live_path": "/live",
"ready_path": "/ready"
},
"plugins": {
"DataStore": [
{
"sql": {
"plugin_data": {
"database_type": "sqlite3",
"connection_string": "/run/spire/server/data/datastore.sqlite3"
}
}
}
}
}

KeyManager "disk" {
plugin_data {
keys_path = "/run/spire/server/data/keys.json"
}
}

Notifier "k8sbundle" {
plugin_data {
config_map = "spire-bundle"
namespace = "{{ .Values.global.spire.namespace }}"
}
],
"NodeAttestor": [
{
"k8s_psat": {
"plugin_data": {
"clusters": {
"vsecm-cluster": {
"service_account_allow_list": ["{{ .Values.global.spire.namespace }}:spire-agent"]
}
}
}
}
}
],
"KeyManager": [
{
"disk": {
"plugin_data": {
"keys_path": "/run/spire/server/data/keys.json"
}
}
}
],
"Notifier": [
{
"k8sbundle": {
"plugin_data": {
"config_map": "spire-bundle",
"namespace": "{{ .Values.global.spire.namespace }}"
}
}
}
]
}
}

health_checks {
listener_enabled = true
bind_address = "0.0.0.0"
bind_port = "8080"
live_path = "/live"
ready_path = "/ready"
}
Loading

0 comments on commit e417df2

Please sign in to comment.