Skip to content

Commit

Permalink
Register PodDisruptionBudget and add rbac rule (#358)
Browse files Browse the repository at this point in the history
* Register PodDisruptionBudget and add rbac rule
  • Loading branch information
regadas authored Apr 5, 2022
1 parent 7052c67 commit 3d4d4b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ rules:
- patch
- update
- watch
- apiGroups:
- "policy"
resources:
- poddisruptionbudgets
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
policyv1 "k8s.io/api/policy/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
Expand Down Expand Up @@ -54,6 +55,7 @@ func init() {
corev1.AddToScheme(scheme)
v1beta1.AddToScheme(scheme)
networkingv1.AddToScheme(scheme)
policyv1.AddToScheme(scheme)
// +kubebuilder:scaffold:scheme
}

Expand Down

0 comments on commit 3d4d4b0

Please sign in to comment.