Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
option to set KeyManager memory in spire server (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
grameshtwilio committed Aug 12, 2023
1 parent a167ce6 commit e60f528
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/spire/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ Now you can interact with the Spire agent socket from your own application. The
| spire-server.ingress.tls | list | `[]` | |
| spire-server.initContainers | list | `[]` | |
| spire-server.jwtIssuer | string | `"https://oidc-discovery.example.org"` | The JWT issuer domain |
| spire-server.keyManager.disk.enabled | bool | `true` | |
| spire-server.keyManager.memory.enabled | bool | `false` | |
| spire-server.livenessProbe.failureThreshold | int | `2` | Failure threshold count for livenessProbe |
| spire-server.livenessProbe.initialDelaySeconds | int | `15` | Initial delay seconds for livenessProbe |
| spire-server.livenessProbe.periodSeconds | int | `60` | Period seconds for livenessProbe |
Expand Down
2 changes: 2 additions & 0 deletions charts/spire/charts/spire-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ In order to run Tornjak with simple HTTP Connection only, make sure you don't cr
| ingress.tls | list | `[]` | |
| initContainers | list | `[]` | |
| jwtIssuer | string | `"https://oidc-discovery.example.org"` | The JWT issuer domain |
| keyManager.disk.enabled | bool | `true` | |
| keyManager.memory.enabled | bool | `false` | |
| livenessProbe.failureThreshold | int | `2` | Failure threshold count for livenessProbe |
| livenessProbe.initialDelaySeconds | int | `15` | Initial delay seconds for livenessProbe |
| livenessProbe.periodSeconds | int | `60` | Period seconds for livenessProbe |
Expand Down
19 changes: 19 additions & 0 deletions charts/spire/charts/spire-server/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- define "spire-server.yaml-config" -}}
{{- $upstreamAuthorityUsed := 0 }}
{{- $keyManagerUsed := 0 }}
{{- $root := . }}
server:
bind_address: "0.0.0.0"
Expand Down Expand Up @@ -47,10 +48,28 @@ plugins:
{{- end }}
{{- end }}

{{- with .Values.keyManager.disk }}
{{- if eq (.enabled | toString) "true" }}
{{- $keyManagerUsed = add1 $keyManagerUsed }}
KeyManager:
- disk:
plugin_data:
keys_path: "/run/spire/data/keys.json"
{{- end }}
{{- end }}

{{- with .Values.keyManager.memory }}
{{- if eq (.enabled | toString) "true" }}
{{- $keyManagerUsed = add1 $keyManagerUsed }}
KeyManager:
- memory:
plugin_data:
{{- end }}
{{- end }}

{{- if gt $keyManagerUsed 1 }}
{{- fail "You can only enable a single KeyManager" }}
{{- end }}

Notifier:
- k8sbundle:
Expand Down
6 changes: 6 additions & 0 deletions charts/spire/charts/spire-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ ca_subject:
organization: Example
common_name: example.org

keyManager:
disk:
enabled: true
memory:
enabled: false

upstreamAuthority:
disk:
enabled: false
Expand Down

0 comments on commit e60f528

Please sign in to comment.