Skip to content

Commit 01afeac

Browse files
committed
organize kubernetes files into single dir, detach rbac from deployment
1 parent 1796e40 commit 01afeac

File tree

4 files changed

+40
-41
lines changed

4 files changed

+40
-41
lines changed
File renamed without changes.

samples/mysql-schema/k8s/deployment.yaml

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ spec:
2323
serviceAccount: mysql-schema-operator
2424
containers:
2525
- name: operator
26-
image: mysql-schema-operator
27-
imagePullPolicy: Never
26+
image: eu.gcr.io/adamsandor-test/mysql-schema-operator:1.2.3-SNAPSHOT
27+
imagePullPolicy: Always
2828
ports:
2929
- containerPort: 80
3030
env:
@@ -45,42 +45,4 @@ spec:
4545
path: /health
4646
port: 8080
4747
initialDelaySeconds: 30
48-
timeoutSeconds: 1
49-
---
50-
apiVersion: rbac.authorization.k8s.io/v1beta1
51-
kind: ClusterRole
52-
metadata:
53-
name: mysql-schema-operator
54-
rules:
55-
- apiGroups:
56-
- mysql.sample.javaoperatorsdk
57-
resources:
58-
- schemas
59-
verbs:
60-
- "*"
61-
- apiGroups:
62-
- apiextensions.k8s.io
63-
resources:
64-
- customresourcedefinitions
65-
verbs:
66-
- "get"
67-
- "list"
68-
---
69-
apiVersion: v1
70-
kind: ServiceAccount
71-
metadata:
72-
name: mysql-schema-operator
73-
namespace: mysql-schema-operator
74-
---
75-
apiVersion: rbac.authorization.k8s.io/v1
76-
kind: ClusterRoleBinding
77-
metadata:
78-
name: mysql-schema-operator
79-
subjects:
80-
- kind: ServiceAccount
81-
name: mysql-schema-operator
82-
namespace: mysql-schema-operator
83-
roleRef:
84-
kind: ClusterRole
85-
name: mysql-schema-operator
86-
apiGroup: ""
48+
timeoutSeconds: 1

samples/mysql-schema/k8s/rbac.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
apiVersion: rbac.authorization.k8s.io/v1beta1
2+
kind: ClusterRole
3+
metadata:
4+
name: mysql-schema-operator
5+
rules:
6+
- apiGroups:
7+
- mysql.sample.javaoperatorsdk
8+
resources:
9+
- schemas
10+
verbs:
11+
- "*"
12+
- apiGroups:
13+
- apiextensions.k8s.io
14+
resources:
15+
- customresourcedefinitions
16+
verbs:
17+
- "get"
18+
- "list"
19+
---
20+
apiVersion: v1
21+
kind: ServiceAccount
22+
metadata:
23+
name: mysql-schema-operator
24+
namespace: mysql-schema-operator
25+
---
26+
apiVersion: rbac.authorization.k8s.io/v1
27+
kind: ClusterRoleBinding
28+
metadata:
29+
name: mysql-schema-operator
30+
subjects:
31+
- kind: ServiceAccount
32+
name: mysql-schema-operator
33+
namespace: mysql-schema-operator
34+
roleRef:
35+
kind: ClusterRole
36+
name: mysql-schema-operator
37+
apiGroup: ""

0 commit comments

Comments
 (0)