Skip to content

Commit 982c9f4

Browse files
committed
Removing Service from Citrix Node controller yaml and re arranging RBAC
1 parent c9e9b35 commit 982c9f4

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

build/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ FROM quay.io/chorus/chorus-kube-router:1.8.0
99
COPY --from=builder /go/bin/citrix-node-controller /go/bin/citrix-node-controller
1010
COPY build/start.sh /go/bin/start.sh
1111
RUN ["chmod", "+x", "/go/bin/start.sh"]
12-
ENTRYPOINT ["sh", "/go/bin/start.sh"]
1312

13+
#Starting CNC as nobody
14+
USER nobody
15+
16+
ENTRYPOINT ["sh", "/go/bin/start.sh"]

deploy/citrix-k8s-node-controller.yaml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
44
metadata:
55
name: citrix-node-controller
66
rules:
7-
- apiGroups: ["*"]
8-
resources: ["nodes", "configmaps", "pods", "namespaces", "serviceaccounts", "clusterroles", "clusterrolebindings"]
9-
verbs: ["get", "list", "watch", "create", "patch", "delete", "update"]
10-
117
- apiGroups: [""]
12-
resources: ["nodes", "configmaps", "pods", "namespaces", "serviceaccounts", "clusterroles", "clusterrolebindings"]
8+
resources: ["configmaps", "pods"]
139
verbs: ["get", "list", "watch", "create", "patch", "delete", "update"]
10+
- apiGroups: [""]
11+
resources: ["nodes"]
12+
verbs: ["get", "list", "watch", "patch"]
13+
- apiGroups: [""]
14+
resources: ["serviceaccounts", "clusterroles", "clusterrolebindings", "namespaces"]
15+
verbs: ["get", "list", "create", "delete"]
1416
---
1517
kind: ClusterRoleBinding
1618
apiVersion: rbac.authorization.k8s.io/v1beta1
@@ -32,19 +34,6 @@ metadata:
3234
name: citrix-node-controller
3335
namespace: default
3436
---
35-
apiVersion: v1
36-
kind: Service
37-
metadata:
38-
name: citrix-node-controller
39-
labels:
40-
app: citrix-node-controller
41-
spec:
42-
type: NodePort
43-
ports:
44-
- port: 8080
45-
selector:
46-
app: citrix-node-controller
47-
---
4837
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
4938
kind: Deployment
5039
metadata:

0 commit comments

Comments
 (0)