-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Do not Merge] Testing things with Dockerfile secrets #261
base: main
Are you sure you want to change the base?
Conversation
@@ -38,6 +39,12 @@ func ReadSecrets( | |||
// Extracts secrets into data to pass to buildkit | |||
secretsData := make(map[string][]byte) | |||
for _, secretRef := range obj.Spec.Secrets { | |||
line := fmt.Sprintf("Processing secret reference %s %s %s\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.XXX
apis should work. You just need to make sure the loglevel is configured properly on the hephaestus operator.
Or you can just use things like log.Error
if secretRef.MountPath != "" { | ||
path = secretRef.MountPath | ||
} | ||
|
||
// builds a path for the secret like {namespace}/{name}/{key} to avoid hash key collisions | ||
for filename, data := range secret.Data { | ||
name := strings.Join([]string{path, filename}, "/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still do {path}/{filename}
here or is MountPath
expected to be the complete path to the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mount path affects all the values inside the k8s secret.
From the perspective of nucleus you can set a different mount path for every Vault secret and the dispatcher maps the Vault values into the k8s secret.
We only need one secret for the purposes of the environment build secrets, but I'm leaving room to have multiple secrets if someone needs it in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yup, makes sense. Let me know when you have a demo environment rigged up where I can play around with the experience a bit.
Thanks!
d422c3a
to
58157a0
Compare
No description provided.