3232 plural : journals
3333 singular : journal
3434 kind : Journal
35- shortNames :
36- - esj
3735 subresources :
3836 status : {}
3937 additionalPrinterColumns :
@@ -48,29 +46,38 @@ spec:
4846 - name : Age
4947 type : date
5048 JSONPath : .metadata.creationTimestamp
51- validation :
52- openAPIV3Schema :
53- properties :
54- spec :
55- type : object
56- properties :
5749
58- type :
59- type : string
60- enum :
61- - Cassandra
6250
63- deployment :
64- type : string
65- enum :
66- - Unmanaged
51+ ---
52+ apiVersion : v1
53+ kind : ServiceAccount
54+ metadata :
55+ name : cloudstate-operator
56+ ---
57+ apiVersion : v1
58+ kind : ConfigMap
59+ metadata :
60+ name : cloudstate-operator-config
61+ data :
62+ config : |
63+ cloudstate.operator {
64+ # Watch configuration
65+ watch {
6766
68- config :
69- type : object
67+ # This should be a list of namespaces to watch. Either should contain a single "*" to watch all namespaces
68+ # (this is configured in more detail below), or should be a list of namespaces.
69+ namespaces = ["*"]
70+ }
7071
71- required :
72- - type
73- - deployment
72+ # Proxy configuration
73+ proxy {
74+ image {
75+ cassandra = "cloudstateio/cloudstate-proxy-cassandra:latest"
76+ no-journal = "cloudstateio/cloudstate-proxy-no-journal:latest"
77+ in-memory = "cloudstateio/cloudstate-proxy-in-memory:latest"
78+ }
79+ }
80+ }
7481
7582
7683 ---
@@ -79,46 +86,42 @@ kind: ClusterRole
7986metadata :
8087 name : cloudstate-operator-role
8188rules :
82- - apiGroups :
83- - rbac.authorization.k8s.io
84- resources :
85- - rolebindings
86- verbs :
87- - get
88- - create
89- - delete
90- - patch
91- - update
92- - apiGroups :
93- - rbac.authorization.k8s.io
94- resources :
95- - roles
96- verbs :
97- - get
98- - create
99- - delete
100- - patch
101- - update
102- - apiGroups :
103- - cloudstate.io
104- resources :
105- - eventsourcedjournals
106- verbs :
107- - get
108- - list
109- - watch
110- - apiGroups :
111- - cloudstate.io
112- resources :
113- - eventsourcedjournals/status
114- verbs :
115- - get
116- - list
117- - watch
118- - create
119- - delete
120- - patch
121- - update
89+
90+ - apiGroups : [""]
91+ resources : ["namespaces"]
92+ verbs : ["get", "list", "watch"]
93+
94+ - apiGroups : [""]
95+ resources : ["services"]
96+ verbs : ["get", "create", "delete", "patch", "update"]
97+
98+ - apiGroups : ["apps"]
99+ resources : ["deployments", "deployments/scale"]
100+ verbs : ["get", "create", "delete", "patch", "update", "watch"]
101+
102+ - apiGroups : ["rbac.authorization.k8s.io"]
103+ resources : ["rolebindings", "roles"]
104+ verbs : ["get", "create", "delete", "patch", "update"]
105+
106+ - apiGroups : ["cloudstate.io"]
107+ resources : ["journals", "statefulservices"]
108+ verbs : ["get", "list", "watch"]
109+
110+ - apiGroups : ["cloudstate.io"]
111+ resources : ["journals/status", "statefulservices/status"]
112+ verbs : ["update", "patch"]
113+
114+ ---
115+
116+ apiVersion : rbac.authorization.k8s.io/v1beta1
117+ kind : Role
118+ metadata :
119+ name : cloudstate-operator-role
120+ rules :
121+ - apiGroups : [""]
122+ resources : ["configmaps"]
123+ verbs : ["get", "watch"]
124+ resourceNames : ["cloudstate-operator-config"]
122125
123126---
124127apiVersion : rbac.authorization.k8s.io/v1beta1
@@ -127,11 +130,27 @@ metadata:
127130 name : cloudstate-operator
128131subjects :
129132- kind : ServiceAccount
130- name : controller
133+ name : cloudstate-operator
134+ namespace : cloudstate
131135roleRef :
132136 kind : ClusterRole
133137 name : cloudstate-operator-role
134138 apiGroup : rbac.authorization.k8s.io
139+
140+ ---
141+
142+ apiVersion : rbac.authorization.k8s.io/v1beta1
143+ kind : RoleBinding
144+ metadata :
145+ name : cloudstate-operator
146+ subjects :
147+ - kind : ServiceAccount
148+ name : cloudstate-operator
149+ roleRef :
150+ kind : Role
151+ name : cloudstate-operator-role
152+ apiGroup : rbac.authorization.k8s.io
153+
135154---
136155apiVersion : apps/v1
137156kind : Deployment
@@ -151,27 +170,24 @@ spec:
151170 annotations :
152171 sidecar.istio.io/inject : " false"
153172 spec :
154- serviceAccountName : controller
173+ serviceAccountName : cloudstate-operator
155174 containers :
156175 - name : operator
157176 image : cloudstateio/cloudstate-operator:latest
158177
159178 env :
160- - name : NAMESPACES
161- # Update to comma separated list of namespaces to watch
162- value : default
163- - name : CASSANDRA_JOURNAL_IMAGE
164- value : cloudstateio/cloudstate-proxy-cassandra:latest
165- - name : IN_MEMORY_JOURNAL_IMAGE
166- value : cloudstateio/cloudstate-proxy-in-memory:latest
167- - name : NO_JOURNAL_IMAGE
168- value : cloudstateio/cloudstate-proxy-no-journal:latest
169179 - name : JAVA_OPTS
170180 value : " -Xms128m -Xmx128m"
181+ - name : NAMESPACE
182+ valueFrom :
183+ fieldRef :
184+ fieldPath : " metadata.namespace"
185+ - name : CONFIG_MAP
186+ value : cloudstate-operator-config
171187
172188 resources :
173189 limits :
174190 memory : 256Mi
175191 requests :
176- cpu : 0.25
192+ cpu : 0.1
177193 memory : 256Mi
0 commit comments