Skip to content
This repository was archived by the owner on Mar 16, 2021. It is now read-only.

Commit 239e674

Browse files
committed
Added Kustomize for controller manager
Signed-off-by: Tejas Parikh <[email protected]>
1 parent c95073c commit 239e674

File tree

5 files changed

+112
-0
lines changed

5 files changed

+112
-0
lines changed

Diff for: kustomization.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
namespace: cosi-controller-manager
5+
6+
images:
7+
- name: controller-manager
8+
newName: controller-manager
9+
newTag: latest
10+
11+
resources:
12+
- manifests/ns.yaml
13+
- manifests/sa.yaml
14+
- manifests/rbac.yaml
15+
- manifests/deployment.yaml
16+
17+
patches:
18+
- target:
19+
kind: Deployment
20+
patch: |-
21+
- op: replace
22+
path: /spec/template/spec/containers/0/imagePullPolicy
23+
value: IfNotPresent

Diff for: manifests/deployment.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
kind: Deployment
3+
apiVersion: apps/v1
4+
metadata:
5+
name: cosi-controller-manager
6+
namespace: cosi-controller-manager
7+
spec:
8+
replicas: 3
9+
strategy:
10+
rollingUpdate:
11+
maxUnavailable: 0
12+
selector:
13+
matchLabels:
14+
app: cosi-controller-manager
15+
template:
16+
metadata:
17+
labels:
18+
app: cosi-controller-manager
19+
spec:
20+
serviceAccountName: cosi-controller-sa
21+
containers:
22+
- name: cosi-controller-manager
23+
image: controller-manager:latest

Diff for: manifests/ns.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: cosi-controller-manager

Diff for: manifests/rbac.yaml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
kind: ClusterRole
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
metadata:
5+
name: cosi-controller-role
6+
rules:
7+
- apiGroups: ["objectstorage.k8s.io"]
8+
resources: ["bucketrequests", "bucketaccessrequests"]
9+
verbs: ["get", "list", "watch"]
10+
- apiGroups: ["objectstorage.k8s.io"]
11+
resources: ["buckets", "bucketaccess"]
12+
verbs: ["get", "list", "watch", "update", "create", "delete"]
13+
- apiGroups: ["objectstorage.k8s.io"]
14+
resources: ["bucketclass","bucketaccessclass"]
15+
verbs: ["get", "list"]
16+
- apiGroups: [""]
17+
resources: ["events"]
18+
verbs: ["list", "watch", "create", "update", "patch"]
19+
---
20+
kind: ClusterRoleBinding
21+
apiVersion: rbac.authorization.k8s.io/v1
22+
metadata:
23+
name: cosi:system
24+
subjects:
25+
- kind: ServiceAccount
26+
name: cosi-controller-sa
27+
namespace: cosi-controller-manager
28+
roleRef:
29+
kind: ClusterRole
30+
name: cosi-controller-role
31+
apiGroup: rbac.authorization.k8s.io
32+
---
33+
kind: Role
34+
apiVersion: rbac.authorization.k8s.io/v1
35+
metadata:
36+
name: cosi-controller
37+
namespace: cosi-controller-manager
38+
rules:
39+
- apiGroups: ["coordination.k8s.io"]
40+
resources: ["leases"]
41+
verbs: ["get", "watch", "list", "delete", "update", "create"]
42+
---
43+
kind: RoleBinding
44+
apiVersion: rbac.authorization.k8s.io/v1
45+
metadata:
46+
name: cosi-controller
47+
namespace: cosi-controller-manager
48+
subjects:
49+
- kind: ServiceAccount
50+
name: cosi-controller-sa
51+
namespace: cosi-controller-manager
52+
roleRef:
53+
kind: Role
54+
name: cosi-controller
55+
apiGroup: rbac.authorization.k8s.io

Diff for: manifests/sa.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
apiVersion: v1
3+
kind: ServiceAccount
4+
metadata:
5+
name: cosi-controller-sa
6+
namespace: cosi-controller-manager

0 commit comments

Comments
 (0)