Skip to content

Commit

Permalink
patch(perms): had to give all previllages to install ksctl/ka
Browse files Browse the repository at this point in the history
Signed-off-by: Dipankar Das <[email protected]>
  • Loading branch information
dipankardas011 committed Jan 27, 2025
1 parent b92d72c commit 46249ad
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 105 deletions.
96 changes: 0 additions & 96 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,93 +8,12 @@ rules:
- /metrics
verbs:
- get
- apiGroups:
- ""
resources:
- configmaps
- events
- namespaces
- pods
- secrets
- serviceaccounts
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- '*'
resources:
- '*'
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- app.ksctl.com
resources:
- stacks
verbs:
- '*'
- apiGroups:
- apps
resources:
- daemonsets
- deployments
- statefulsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- coordination.k8s.io
resources:
- leases
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- manage.ksctl.com
resources:
Expand All @@ -121,18 +40,3 @@ rules:
- get
- patch
- update
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
- clusterroles
- rolebindings
- roles
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.23.4

require (
github.com/gookit/goutil v0.6.18
github.com/ksctl/ksctl/v2 v2.0.0-rc.2
github.com/ksctl/ksctl/v2 v2.0.0-rc.3
github.com/onsi/ginkgo/v2 v2.21.0
github.com/onsi/gomega v1.35.1
k8s.io/api v0.32.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/ksctl/ksctl/v2 v2.0.0-rc.2 h1:/8t1QBV0IXZ7aUbE6daBtnwiMkPkn6IZxBXu3LRFf+8=
github.com/ksctl/ksctl/v2 v2.0.0-rc.2/go.mod h1:24QA7D2r/7YMVMFlKgpn8xHsIHPmPxaCtjAvJYynLps=
github.com/ksctl/ksctl/v2 v2.0.0-rc.3 h1:+s3C+rjhoa4pFG+xr2KxPoeLl+4+i/osLAOaLqyHkWQ=
github.com/ksctl/ksctl/v2 v2.0.0-rc.3/go.mod h1:SicEdTFawWT4hGTnKsPBrDu673XDm7CHDzKpcujuib4=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
Expand Down
9 changes: 1 addition & 8 deletions internal/controller/clusteraddon_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,8 @@ const managerFinalizer string = "finalizer.manage.ksctl.com"
// +kubebuilder:rbac:groups=manage.ksctl.com,resources=clusteraddons,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=manage.ksctl.com,resources=clusteraddons/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=manage.ksctl.com,resources=clusteraddons/finalizers,verbs=update
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=clusterroles;clusterrolebindings;roles;rolebindings,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=admissionregistration.k8s.io,resources=validatingwebhookconfigurations;mutatingwebhookconfigurations,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=apps,resources=deployments;daemonsets;statefulsets,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups="",resources=namespaces;serviceaccounts;services;configmaps;secrets;pods;events,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:urls=/metrics,verbs=get
// +kubebuilder:rbac:groups=*,resources=*,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=app.ksctl.com,resources=stacks,verbs=*
// +kubebuilder:rbac:groups=*,resources=*,verbs=*

func (r *ClusterAddonReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
l := log.FromContext(ctx)
Expand Down

0 comments on commit 46249ad

Please sign in to comment.