Skip to content

Commit

Permalink
Adding permissions for controller packages helm upgrade (#8012)
Browse files Browse the repository at this point in the history
  • Loading branch information
pokearu committed Apr 22, 2024
1 parent cea3c2f commit 7ed6a68
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions config/manifest/eksa-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7134,6 +7134,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
1 change: 1 addition & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ rules:
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
Expand Down
2 changes: 1 addition & 1 deletion controllers/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager, log logr.Logger)
}

// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch;update
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;delete;update
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;delete;update;patch
// +kubebuilder:rbac:groups="",namespace=eksa-system,resources=secrets,verbs=patch;update
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=create;delete
// +kubebuilder:rbac:groups="",resources=nodes,verbs=list
Expand Down
8 changes: 5 additions & 3 deletions pkg/curatedpackages/packagecontrollerclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,11 @@ func (pc *PackageControllerClient) generateHelmOverrideValues() ([]byte, error)
endpoint, username, password, caCertContent, insecureSkipVerify := "", "", "", "", "false"
if pc.registryMirror != nil {
endpoint = pc.registryMirror.BaseRegistry
username, password, err = config.ReadCredentials()
if err != nil {
return []byte{}, err
if pc.registryMirror.Auth {
username, password, err = config.ReadCredentials()
if err != nil {
return []byte{}, err
}
}
caCertContent = pc.registryMirror.CACertContent
if pc.registryMirror.InsecureSkipVerify {
Expand Down

0 comments on commit 7ed6a68

Please sign in to comment.