-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add support for --secret #60
Conversation
@bgroff @colesnodgrass does this support providing multiple secrets files? In our case we only need one (the external DB) but in some of the docs I saw other examples of secrets. Basic Auth password or S3 api key come to mind |
@killthekitten
|
Updated to use |
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 👍🏼
data := map[string][]byte{"auth": []byte(fmt.Sprintf("%s:%s", user, hashedPass))} | ||
if err := c.k8s.SecretCreateOrUpdate(ctx, corev1.SecretTypeOpaque, airbyteNamespace, "basic-auth", data); err != nil { | ||
pterm.Error.Println("Could not create Basic-Auth secret") | ||
secret := corev1.Secret{ |
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.
For a later refactor: we can add a util for instantiating a secret object as we continue to add more cases.
if env := os.Getenv(envDockerEmail); env != "" { | ||
opts.DockerEmail = env | ||
} | ||
envOverride(&opts.BasicAuthUser, envBasicAuthUser) |
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.
👍🏼 nice, much cleaner
--secret
flag--secret
flags can be provided