Skip to content

Commit dba02f9

Browse files
committed
add permisions
1 parent a6c1afd commit dba02f9

File tree

3 files changed

+147
-9
lines changed

3 files changed

+147
-9
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ all: manager
4545
# Run tests
4646
ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
4747
test: generate fmt vet manifests
48-
mkdir -p ${ENVTEST_ASSETS_DIR}
48+
-mkdir -p ${ENVTEST_ASSETS_DIR}
4949
test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.7.0/hack/setup-envtest.sh
5050
source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out
5151

@@ -66,9 +66,12 @@ uninstall: manifests kustomize
6666
$(KUSTOMIZE) build config/crd | kubectl delete -f -
6767

6868
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
69+
DEPLOY_DIR=$(shell pwd)/deploy
6970
deploy: manifests kustomize
71+
-mkdir ${DEPLOY_DIR}
7072
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
71-
$(KUSTOMIZE) build config/default | kubectl apply -f -
73+
$(KUSTOMIZE) build config/default > ${DEPLOY_DIR}/kube-gateway-operator.yaml
74+
kubectl apply -f ${DEPLOY_DIR}/kube-gateway-operator.yaml
7275

7376
# UnDeploy controller from the configured Kubernetes cluster in ~/.kube/config
7477
undeploy:

config/rbac/role.yaml

Lines changed: 139 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ rules:
1111
resources:
1212
- secrets
1313
verbs:
14+
- create
15+
- delete
1416
- get
1517
- list
18+
- patch
19+
- update
1620
- watch
1721
- apiGroups:
18-
- kubegateway.kubevirt.io
22+
- ""
1923
resources:
20-
- gateservers
24+
- serviceaccounts
2125
verbs:
2226
- create
2327
- delete
@@ -27,19 +31,29 @@ rules:
2731
- update
2832
- watch
2933
- apiGroups:
30-
- kubegateway.kubevirt.io
34+
- ""
3135
resources:
32-
- gateservers/finalizers
36+
- services
3337
verbs:
38+
- create
39+
- delete
40+
- get
41+
- list
42+
- patch
3443
- update
44+
- watch
3545
- apiGroups:
36-
- kubegateway.kubevirt.io
46+
- apps
3747
resources:
38-
- gateservers/status
48+
- deployments
3949
verbs:
50+
- create
51+
- delete
4052
- get
53+
- list
4154
- patch
4255
- update
56+
- watch
4357
- apiGroups:
4458
- kubegateway.kubevirt.io
4559
resources:
@@ -64,6 +78,125 @@ rules:
6478
- get
6579
- patch
6680
- update
81+
- apiGroups:
82+
- networking.k8s.io
83+
resources:
84+
- ingresses
85+
verbs:
86+
- create
87+
- delete
88+
- get
89+
- list
90+
- patch
91+
- update
92+
- watch
93+
- apiGroups:
94+
- oauth.openshift.io
95+
resources:
96+
- oauthclients
97+
verbs:
98+
- create
99+
- delete
100+
- get
101+
- list
102+
- patch
103+
- update
104+
- watch
105+
- apiGroups:
106+
- ocgate.rh-fieldwork.com
107+
resources:
108+
- gateservers
109+
verbs:
110+
- create
111+
- delete
112+
- get
113+
- list
114+
- patch
115+
- update
116+
- watch
117+
- apiGroups:
118+
- ocgate.rh-fieldwork.com
119+
resources:
120+
- gateservers/finalizers
121+
verbs:
122+
- update
123+
- apiGroups:
124+
- ocgate.rh-fieldwork.com
125+
resources:
126+
- gateservers/status
127+
verbs:
128+
- get
129+
- patch
130+
- update
131+
- apiGroups:
132+
- rbac.authorization.k8s.io
133+
resources:
134+
- clusterrolebindings
135+
verbs:
136+
- create
137+
- delete
138+
- deletecollection
139+
- get
140+
- list
141+
- patch
142+
- update
143+
- watch
144+
- apiGroups:
145+
- rbac.authorization.k8s.io
146+
resources:
147+
- clusterroles
148+
verbs:
149+
- create
150+
- delete
151+
- deletecollection
152+
- get
153+
- list
154+
- patch
155+
- update
156+
- watch
157+
- apiGroups:
158+
- rbac.authorization.k8s.io
159+
resources:
160+
- rolebindings
161+
verbs:
162+
- create
163+
- delete
164+
- get
165+
- list
166+
- patch
167+
- update
168+
- watch
169+
- apiGroups:
170+
- rbac.authorization.k8s.io
171+
resources:
172+
- roles
173+
verbs:
174+
- create
175+
- delete
176+
- get
177+
- list
178+
- patch
179+
- update
180+
- watch
181+
- apiGroups:
182+
- route.openshift.io
183+
resources:
184+
- routes
185+
verbs:
186+
- create
187+
- delete
188+
- get
189+
- list
190+
- patch
191+
- update
192+
- watch
193+
- apiGroups:
194+
- route.openshift.io
195+
resources:
196+
- routes/custom-host
197+
verbs:
198+
- create
199+
- patch
67200
- apiGroups:
68201
- security.openshift.io
69202
resourceNames:

config/samples/kubegateway_v1beta1_gateserver.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ kind: GateServer
33
metadata:
44
name: gateserver-sample
55
namespace: kube-gateway
6-
spec: {}
6+
spec:
7+
admin-role: reader
8+
img: 'quay.io/kubevirt-ui/kube-gateway:latest'

0 commit comments

Comments
 (0)