-
-
Notifications
You must be signed in to change notification settings - Fork 934
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
Implement SecretExists in AWS ParameterStore #4377
Implement SecretExists in AWS ParameterStore #4377
Conversation
Signed-off-by: Ami Rahav <amirahav@users.noreply.github.com>
0907db8
to
8625084
Compare
func (pm *ParameterStore) SecretExists(_ context.Context, _ esv1beta1.PushSecretRemoteRef) (bool, error) { | ||
return false, errors.New("not implemented") | ||
func (pm *ParameterStore) SecretExists(ctx context.Context, pushSecretRef esv1beta1.PushSecretRemoteRef) (bool, error) { | ||
secretName := pushSecretRef.GetRemoteKey() |
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 think this should be secretName := pm.prefix + data.GetRemoteKey()
since that's what PushSecret is pushing as a secret name.
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 be fixed in the latest commit
Signed-off-by: Ami Rahav <amirahav@users.noreply.github.com>
267f063
to
1c1e1b0
Compare
/ok-to-test sha=1c1e1b09ccfc8be0ca646b997c06f4a2c29631d3 provider=aws |
|
Problem Statement
PushSecret
with AWS parameter store doesn't supportupdatePolicy: IfNotExists
Related Issue
Fixes #...
Proposed Changes
This PR implements the
SecretExists
function withinParameterStore
to ensure that external secrets will only create the parameter if it doesn't exist in AWS.Checklist
git commit --signoff
make test
make reviewable