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

[Do not Merge] Testing things with Dockerfile secrets #261

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ddl-ignacio-rossi
Copy link

No description provided.

@@ -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",
Copy link
Contributor

@ddl-ebrown ddl-ebrown Jan 16, 2025

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}, "/")
Copy link
Contributor

@ddl-ebrown ddl-ebrown Jan 17, 2025

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?

Copy link
Author

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.

Copy link
Contributor

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!

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

Successfully merging this pull request may close these issues.

2 participants