Skip to content

Commit

Permalink
Add 'update' permission to operator
Browse files Browse the repository at this point in the history
Also making sure kubebuilder auto-generated manifest are aligned with
latest version of Helm charts.
  • Loading branch information
NetanelBollag committed May 14, 2023
1 parent d231b2f commit beab5e3
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helm-charts
Submodule helm-charts updated 25 files
+1 −1 credentials-operator/templates/credentials-operator-leader-election-role.yaml
+2 −2 credentials-operator/templates/credentials-operator-leader-election-rolebinding.yaml
+1 −1 credentials-operator/templates/credentials-operator-manager-clusterrole.yaml
+2 −2 credentials-operator/templates/credentials-operator-manager-clusterrolebinding.yaml
+1 −1 credentials-operator/templates/credentials-operator-metrics-reader-clusterrole.yaml
+1 −1 credentials-operator/templates/credentials-operator-proxy-clusterrole.yaml
+2 −2 credentials-operator/templates/credentials-operator-proxy-clusterrolebinding.yaml
+1 −1 intents-operator/Chart.yaml
+9 −8 intents-operator/README.md
+3 −0 intents-operator/templates/intents-operator-deployment.yaml
+1 −1 intents-operator/templates/intents-operator-leader-election-role.yaml
+1 −1 intents-operator/templates/intents-operator-leader-election-rolebinding.yaml
+13 −12 intents-operator/templates/intents-operator-manager-clusterrole.yaml
+2 −2 intents-operator/templates/intents-operator-manager-clusterrolebinding.yaml
+1 −1 intents-operator/templates/intents-operator-metrics-reader-clusterrole.yaml
+1 −1 intents-operator/templates/intents-operator-proxy-clusterrole.yaml
+2 −2 intents-operator/templates/intents-operator-proxy-clusterrolebinding.yaml
+2 −0 intents-operator/values.yaml
+1 −1 network-mapper/Chart.yaml
+4 −3 network-mapper/README.md
+6 −0 network-mapper/templates/mapper-clusterrole.yaml
+4 −0 network-mapper/templates/mapper-deployment.yaml
+3 −1 network-mapper/values.yaml
+9 −0 otterize-kubernetes/README.md
+5 −0 otterize-kubernetes/values.yaml
2 changes: 1 addition & 1 deletion src/operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ help: ## Display this help.

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=intents-operator-manager-role crd webhook paths="../..."
$(CONTROLLER_GEN) rbac:roleName=otterize-intents-operator-manager-role crd webhook paths="../..."


.PHONY: generate
Expand Down
17 changes: 16 additions & 1 deletion src/operator/config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: intents-operator-manager-role
name: otterize-intents-operator-manager-role
rules:
- apiGroups:
- ""
Expand All @@ -24,6 +24,12 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -51,6 +57,15 @@ rules:
- list
- patch
- update
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- update
- watch
- apiGroups:
- k8s.otterize.com
resources:
Expand Down
1 change: 1 addition & 0 deletions src/operator/controllers/intents_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func NewIntentsReconciler(
//+kubebuilder:rbac:groups="",resources=pods,verbs=get;update;patch;list;watch
//+kubebuilder:rbac:groups="networking.k8s.io",resources=networkpolicies,verbs=get;update;patch;list;watch;delete;create
//+kubebuilder:rbac:groups="admissionregistration.k8s.io",resources=validatingwebhookconfigurations,verbs=get;update;patch;list
//+kubebuilder:rbac:groups="apiextensions.k8s.io",resources=customresourcedefinitions,verbs=get;list;watch;update

// 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
2 changes: 2 additions & 0 deletions src/watcher/reconcilers/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"
)

//+kubebuilder:rbac:groups="",resources=namespaces,verbs=get

type NamespaceWatcher struct {
client.Client
}
Expand Down

0 comments on commit beab5e3

Please sign in to comment.