-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use Remote Secret for storing image repository push token #67
Conversation
Skipping CI for Draft Pull Request. |
7e3880a
to
cad9f8b
Compare
cad9f8b
to
e6117a8
Compare
e6117a8
to
2416003
Compare
Signed-off-by: Mykola Morhun <[email protected]>
2416003
to
5b7e35d
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.
LGTM
@@ -500,13 +491,16 @@ func (r *ImageRepositoryReconciler) EnsureRemotePullSecret(ctx context.Context, | |||
return err | |||
} | |||
|
|||
serviceAccountName := buildPipelineServiceAccountName | |||
if isPull { |
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.
why are you using default SA for pull 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.
Because there is no build pipeline SA in that namespaces and also no guarantee that any other SA exists.
It was discussed during pull secret implementation.
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
if isPull { |
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.
also don't understand why this differs for pull & push 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.
Because push token must be in current (build) namespace only (at least for current requirements), but pull token in all environments of the application.
This PRs makes push token stored in a RemoteSecret instead of just Secret. Such approach gives the following advantages: