Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WORKBENCH] Determine how to reliably test using sealedSecrets in GHA #578

Open
jforest opened this issue Oct 10, 2024 · 0 comments
Open

Comments

@jforest
Copy link
Contributor

jforest commented Oct 10, 2024

As it stands right now, we have no good way to test the sealedSecrets.

There is an issue with what we're passing in, and what sealedSecrets expects as output.

{{- include "rstudio-library.config.ini" .Values.config.sessionSecret | nindent 6 }}
uses
{{- define "rstudio-library.config.ini" -}}
{{- range $file, $keys := . -}}
{{- printf "%s: |" $file | nindent 0 }}
{{- if kindIs "string" $keys }}
{{- $keys | nindent 2 }}
{{- else }}
{{- range $parent, $child := $keys -}}
{{/* ini files may have multiple sections with the same name */}}
{{- $sections := ( (kindIs "slice" $child) | ternary $child ( list $child ))}}
{{- range $i, $section := $sections -}}
{{- if kindIs "map" $section }}
{{- if not ( kindIs "slice" $keys ) -}}
{{- printf "[%s]" (toString $parent) | nindent 2 }}
{{- end }}
{{- range $key, $val := $section }}
{{- printf "%s=%s" (toString $key) (toString $val) | nindent 2 }}
{{- end }}
{{- printf "" | nindent 0 }}
{{- else }}
{{- printf "%s=%s" (toString $parent) (toString $section) | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
which outputs an object, but sealedSecrets expects an encrypted string.

The problem is that we install a new cluster every time for testing, which creates a new pem file to encrypt secrets and convert them to sealedSecrets which you are then supposed to apply to the cluster. Doing that in an automated, repeatable, and reliable way is going to take some work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant