-
Notifications
You must be signed in to change notification settings - Fork 107
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
Take ownership of an existing destination secret #545
Take ownership of an existing destination secret #545
Conversation
09b7d9e
to
8dc7c1c
Compare
Adds a new configuration option spec.destination.overwrite that when set to true VSO will replace an existing destination secret that it does not currently own. VSO will then take ownership of the destination secret's life-cycle.
8dc7c1c
to
ca485aa
Compare
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.
Left a couple thoughts, but it looks great!
wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { | ||
return assert.ErrorContains(t, err, | ||
"not the owner of the destination Secret foo/baz") | ||
}, |
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.
Does the operator check the type of object that owns a Secret? Just thinking it might be good to allow overwriting ownership if the owner is a non-VSO object, to help when migrating to VSO. Or I suppose it could allow multiple owner references, as long as only one is the VSO object being reconciled.
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 believe with this change VSO will only take ownership of the destination secret if it does not have the generic VSO owner labels.
Allowing other Kinds to own the secret is an interesting idea, but I am not sure how that would work in the case where the "other" Kind is deleted - VSO would probably resolve that on the next reconciliation.
Adds a new configuration option spec.destination.overwrite that when set to true VSO will replace an existing destination secret that it does not currently own. VSO will then take ownership of the destination secret's life-cycle.
Adds a new configuration option
spec.destination.overwrite
that when set to true VSO will replace an existing destination secret that it does not currently own. VSO will then take ownership of the destination secret's life-cycle.Closes #337