-
Notifications
You must be signed in to change notification settings - Fork 69
feat (backup) : add option to conditionally copy registry auth secret from operator namespace to workspace namespace for backup/restore #1618
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -80,13 +80,31 @@ type RegistryConfig struct { | |||||
| // AuthSecret is the name of a Kubernetes secret of | ||||||
| // type kubernetes.io/dockerconfigjson. | ||||||
| // The secret is expected to be in the same namespace the workspace is running in. | ||||||
| // If secret is not found in the workspace namespace, the operator will look for the secret | ||||||
| // in the namespace where the operator is running in. | ||||||
| // as the DevWorkspaceOperatorCongfig. | ||||||
| // If secret is not found in the workspace namespace and copyOperatorAuthSecret is true, | ||||||
| // the operator will copy the secret from the operator namespace to the workspace namespace. | ||||||
| // The secret must contain "controller.devfile.io/watch-secret=true" label so that it can be | ||||||
| // recognized by the operator. | ||||||
| // +kubebuilder:validation:Optional | ||||||
| AuthSecret string `json:"authSecret,omitempty"` | ||||||
| // CopyOperatorAuthSecret controls whether the operator should copy the authentication | ||||||
| // secret from the operator namespace to the workspace namespace when it's not found | ||||||
| // in the workspace namespace. | ||||||
| // | ||||||
| // If true: The operator will copy the secret from the operator namespace | ||||||
| // if it's not found in the workspace namespace. This provides automatic configuration | ||||||
| // but exposes operator-level credentials to workspace users. | ||||||
| // | ||||||
| // If false (default): The operator will not copy the secret. Users must manually create a secret | ||||||
| // with the configured name in their workspace namespace. This is more secure as it allows | ||||||
| // users to provide scoped credentials with minimal privileges. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's a bit verbose, Can we update the |
||||||
| // | ||||||
| // Note: Regardless of this setting, if a secret already exists in the workspace namespace, | ||||||
| // it will never be overwritten. User-provided secrets are always respected. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| // | ||||||
| // Defaults to false. | ||||||
| // +kubebuilder:validation:Optional | ||||||
| // +kubebuilder:default=false | ||||||
| CopyOperatorAuthSecret *bool `json:"copyOperatorAuthSecret,omitempty"` | ||||||
| } | ||||||
|
|
||||||
| type OrasConfig struct { | ||||||
|
|
||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 it's a bit verbose,
Can we update thee
If true...section to: