Skip to content

Commit

Permalink
Fix restore job RBAC (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
Md. Emruz Hossain authored and tamalsaha committed Jul 4, 2019
1 parent f96852f commit bb675f6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/rbac/restore_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
rbac_util "kmodules.xyz/client-go/rbac/v1"
api_v1alpha1 "stash.appscode.dev/stash/apis/stash/v1alpha1"
api_v1beta1 "stash.appscode.dev/stash/apis/stash/v1beta1"
appCatalog "kmodules.xyz/custom-resources/apis/appcatalog/v1alpha1"
)

const (
Expand Down Expand Up @@ -55,6 +56,16 @@ func ensureRestoreJobClusterRole(kubeClient kubernetes.Interface, psps []string,
Resources: []string{api_v1alpha1.ResourcePluralRepository},
Verbs: []string{"*"},
},
{
APIGroups: []string{appCatalog.SchemeGroupVersion.Group},
Resources: []string{appCatalog.ResourceApps},
Verbs: []string{"get"},
},
{
APIGroups: []string{core.SchemeGroupVersion.Group},
Resources: []string{"secrets"},
Verbs: []string{"get"},
},
{
APIGroups: []string{core.GroupName},
Resources: []string{"events"},
Expand Down

0 comments on commit bb675f6

Please sign in to comment.