-
Notifications
You must be signed in to change notification settings - Fork 204
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
Refactor Custom Secrets and AzureSQLUser #1153
Conversation
if strings.Contains(err.Error(), "FlattenedSecretsNotSupported") { // kube client does not support Flatten | ||
err = secretClient.Upsert(ctx, | ||
types.NamespacedName{Namespace: userSecretNamespacedName.Namespace, Name: instance.Name}, | ||
formattedSecrets) | ||
if err != nil { | ||
return fmt.Errorf("Upsert into KubeClient without flatten failed") | ||
} | ||
instance.Status.FlattenedSecrets = false | ||
} | ||
} |
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.
@jananivMS I followed your lead on this
Waiting for this to pass and then Ill pull the WIP off |
Will make sure to rebase and merge when ready so that Denis gets credit for his contributions |
keyVaultEnabled := reflect.TypeOf(secretClient).Elem().Name() == "KeyvaultSecretClient" | ||
if !keyVaultEnabled { | ||
return nil | ||
} |
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 I remove this @jananivMS
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.
A couple of minor documentation nits.
suggestion 1 Co-authored-by: Bevan Arps <bevan.arps@microsoft.com>
suggestion #1 Co-authored-by: Bevan Arps <bevan.arps@microsoft.com>
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Closing this given its age and the fact that an alternative approach is about to merge here #1358 |
What this PR does / why we need it:
Secrets Pkg:
AzureSqlUser:
The flatten option has been kept in the implementation because we need to have a way to ask the secrets package to create individual secrets rather than the default behavior of working with a map/json array. The kube client now returns an error when asked to flatten because that doesn't make sense in-context (Kube only works with map objects for secrets).
Closes #887
Special notes for your reviewer:
How does this PR make you feel:
If applicable: