Skip to content

Commit

Permalink
fix:set replicaset and deployment permission to add list and watch (#26)
Browse files Browse the repository at this point in the history
Co-authored-by: Sangeetha Madamanchi <[email protected]>
  • Loading branch information
sangdammad and Sangeetha Madamanchi authored Oct 6, 2022
1 parent f8c7cc1 commit 4c4a7b8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ vet: ## Run go vet against code.

.PHONY: test
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) --arch=amd64 use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out


.PHONY: pretest
Expand Down Expand Up @@ -276,7 +276,7 @@ run-delve: generate fmt vet manifests

.PHONY: kind-install-deps
kind-install-deps:
-curl -s https://fluxcd.io/install.sh | sudo bash
-curl -s https://fluxcd.io/install.sh | bash

.PHONY: kind-create-cluster
kind-create-cluster:
Expand Down
2 changes: 1 addition & 1 deletion charts/overwhelm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: overwhelm
version: 1.1.2
version: 1.1.3
maintainers:
- name: "Expedia Group"
url: "https://github.com/ExpediaGroup/overwhelm"
4 changes: 4 additions & 0 deletions charts/overwhelm/templates/overwhelm-manager-role-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ rules:
- deployments
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
4 changes: 4 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ rules:
- deployments
verbs:
- get
- list
- watch
- apiGroups:
- apps
resources:
- replicasets
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
4 changes: 2 additions & 2 deletions controllers/application_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ var log logr.Logger
//+kubebuilder:rbac:groups=helm.toolkit.fluxcd.io,resources=helmreleases/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch
//+kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;watch
//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get
//+kubebuilder:rbac:groups=apps,resources=replicasets,verbs=get
//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch
//+kubebuilder:rbac:groups=apps,resources=replicasets,verbs=get;list;watch

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
Expand Down

0 comments on commit 4c4a7b8

Please sign in to comment.