Skip to content

Commit

Permalink
RSA keys from existing secret (#1014)
Browse files Browse the repository at this point in the history
* feat(helm): add the ability to retrieve the Robusta RSA keys from an existing secret.

* doc(setup-robusta): add the part mentionning the ability to retrieve the Robusta RSA keys from an existing secret
  • Loading branch information
drustan authored Oct 30, 2023
1 parent 406d9c6 commit 6ee8d1f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/setup-robusta/configuration-secrets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Robusta can pull values from Kubernetes secrets for:
* Sink Configuration
* Global Config
* Action Parameters
* Robusta RSA keys

To do so, first define an environment variable based on a Kubernetes secret. Add to Robusta's Helm values:

Expand All @@ -40,3 +41,5 @@ Then reference that environment variable in other Helm values using the special
Finally, make sure the Kubernetes secret actually exists. In this example, create a Secret named ``my-robusta-secrets``
with a ``secret_grafana_key`` value inside.

For Robusta RSA keys, you can define the ``existingSecret`` parameter. The secret must have the `pub` and `prv` keys.
2 changes: 1 addition & 1 deletion helm/robusta/templates/auth-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.rsa }}
{{- if and .Values.rsa (not .Values.rsa.existingSecret) }}
apiVersion: v1
kind: Secret
metadata:
Expand Down
2 changes: 1 addition & 1 deletion helm/robusta/templates/runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ spec:
optional: true
- name: auth-config-secret
secret:
secretName: robusta-auth-config-secret
secretName: {{ default "robusta-auth-config-secret" .Values.rsa.existingSecret }}
optional: true
{{- if .Values.playbooksPersistentVolume }}
- name: persistent-playbooks-storage
Expand Down
3 changes: 3 additions & 0 deletions helm/robusta/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,9 @@ kube-prometheus-stack:
cpu: 10m

rsa: ~
# @param existingSecret Name of existing secret containing the rsa keys
# NOTE: Must contain the keys `pub` and `prv`
# existingSecret: my-robusta-rsa-keys

# custom parameters for OpenShift clusters
openshift:
Expand Down

0 comments on commit 6ee8d1f

Please sign in to comment.