-
Notifications
You must be signed in to change notification settings - Fork 25
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
Allow NMA certs to be read from GSM #618
Conversation
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.
Looks good!
} | ||
tlsCerts := &corev1.Secret{} | ||
err := v.Client.Get(ctx, nm, tlsCerts) | ||
tlsCerts, err := fetcher.Fetch(ctx, names.GenNamespacedName(v.VDB, v.VDB.Spec.NMATLSSecret)) |
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.
Should we refactor this into a generic function that gets a secret and retrieve https certs?
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.
Where would you think we would use this generic function?
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.
I meant to rename retrieveHTTPSCerts
to retrieveNMACerts
and have a function called retrieveHTTPSCerts
that gets the secret name. But we don't need it for now as nma certs are the only one we retrieve.
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.
I can rename to retriveNMACerts
though. That's probably a better name.
The key change here is to allow the NMA certs to be read in from Google Secret Manager (GSM). This is triggered based on a secret path reference given for the
spec.nmaTLSSecret
secret. The secret path reference for GSM isgsm://
. So, the secret name has to be filled in likegsm://projects/1680942424/secrets/mspilchen/versions/6
.Some other changes that were made:
MultiSourceSecretFetcher
in thecloud
package.