Skip to content

Commit 6a0d9c8

Browse files
synaretephlogistonjohn
authored andcommitted
main: enable api-groups 'core' and 'rbac' via client-go
When running on OpenShift, samba-operator needs to inspect its Pod and configure ServiceAccount, Role and RoleBinding. Enable such operations via client-go. Signed-off-by: Shachar Sharon <[email protected]>
1 parent fd675f0 commit 6a0d9c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import (
2121
goruntime "runtime"
2222

2323
flag "github.com/spf13/pflag"
24+
corev1 "k8s.io/api/core/v1"
25+
rbacv1 "k8s.io/api/rbac/v1"
2426
"k8s.io/apimachinery/pkg/runtime"
2527
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
2628
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
@@ -46,6 +48,8 @@ var (
4648

4749
func init() {
4850
utilruntime.Must(clientgoscheme.AddToScheme(scheme))
51+
utilruntime.Must(corev1.AddToScheme(scheme))
52+
utilruntime.Must(rbacv1.AddToScheme(scheme))
4953

5054
utilruntime.Must(sambaoperatorv1alpha1.AddToScheme(scheme))
5155
// +kubebuilder:scaffold:scheme

0 commit comments

Comments
 (0)