forked from datastax/cass-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcass-operator-manifests-pre-1.15.yaml
More file actions
560 lines (560 loc) · 20 KB
/
cass-operator-manifests-pre-1.15.yaml
File metadata and controls
560 lines (560 loc) · 20 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
---
apiVersion: v1
kind: Namespace
metadata:
name: cass-operator
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cass-operator
namespace: cass-operator
---
apiVersion: v1
data:
tls.crt: ""
tls.key: ""
kind: Secret
metadata:
name: cass-operator-webhook-config
namespace: cass-operator
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cassandradatacenters.cassandra.datastax.com
spec:
group: cassandra.datastax.com
names:
kind: CassandraDatacenter
listKind: CassandraDatacenterList
plural: cassandradatacenters
shortNames:
- cassdc
- cassdcs
singular: cassandradatacenter
scope: Namespaced
subresources:
status: {}
validation:
openAPIV3Schema:
description: CassandraDatacenter is the Schema for the cassandradatacenters
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: CassandraDatacenterSpec defines the desired state of a CassandraDatacenter
properties:
allowMultipleNodesPerWorker:
description: Turning this option on allows multiple server pods to be
created on a k8s worker node. By default the operator creates just
one server pod per k8s worker node using k8s podAntiAffinity and requiredDuringSchedulingIgnoredDuringExecution.
type: boolean
canaryUpgrade:
description: Indicates that configuration and container image changes
should only be pushed to the first rack of the datacenter
type: boolean
clusterName:
description: The name by which CQL clients and instances will know the
cluster. If the same cluster name is shared by multiple Datacenters
in the same Kubernetes namespace, they will join together in a multi-datacenter
cluster.
minLength: 2
type: string
configBuilderImage:
description: Container image for the config builder init container.
type: string
managementApiAuth:
description: Config for the Management API certificates
properties:
insecure:
type: object
manual:
properties:
clientSecretName:
type: string
serverSecretName:
type: string
skipSecretValidation:
type: boolean
required:
- clientSecretName
- serverSecretName
type: object
type: object
nodeSelector:
additionalProperties:
type: string
description: 'A map of label keys and values to restrict Cassandra node
scheduling to k8s workers with matchiing labels. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector'
type: object
racks:
description: A list of the named racks in the datacenter, representing
independent failure domains. The number of racks should match the
replication factor in the keyspaces you plan to create, and the number
of racks cannot easily be changed once a datacenter is deployed.
items:
description: Rack ...
properties:
name:
description: The rack name
minLength: 2
type: string
zone:
description: Zone name to pin the rack, using node affinity
type: string
required:
- name
type: object
type: array
replaceNodes:
description: A list of pod names that need to be replaced.
items:
type: string
type: array
resources:
description: Kubernetes resource requests and limits, per pod
properties:
limits:
additionalProperties:
type: string
description: 'Limits describes the maximum amount of compute resources
allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
type: string
description: 'Requests describes the minimum amount of compute resources
required. If Requests is omitted for a container, it defaults
to Limits if that is explicitly specified, otherwise to an implementation-defined
value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
rollingRestartRequested:
description: Whether to do a rolling restart at the next opportunity.
The operator will set this back to false once the restart is in progress.
type: boolean
serverImage:
description: 'Cassandra server image name. More info: https://kubernetes.io/docs/concepts/containers/images'
type: string
serverType:
description: 'Server type: "cassandra" or "dse"'
enum:
- cassandra
- dse
type: string
serverVersion:
description: Version string for config builder, used to generate Cassandra
server configuration
enum:
- 6.8.0
- 3.11.6
- 4.0.0
type: string
serviceAccount:
description: The k8s service account to use for the server pods
type: string
size:
description: Desired number of Cassandra server nodes
format: int32
minimum: 1
type: integer
stopped:
description: A stopped CassandraDatacenter will have no running server
pods, like using "stop" with traditional System V init scripts. Other
Kubernetes resources will be left intact, and volumes will re-attach
when the CassandraDatacenter workload is resumed.
type: boolean
storageConfig:
description: Describes the persistent storage request of each server
node
properties:
cassandraDataVolumeClaimSpec:
description: PersistentVolumeClaimSpec describes the common attributes
of storage devices and allows a Source for provider-specific attributes
properties:
accessModes:
description: 'AccessModes contains the desired access modes
the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1'
items:
type: string
type: array
dataSource:
description: This field requires the VolumeSnapshotDataSource
alpha feature gate to be enabled and currently VolumeSnapshot
is the only supported data source. If the provisioner can
support VolumeSnapshot data source, it will create a new volume
and data will be restored to the volume at the same time.
If the provisioner does not support VolumeSnapshot data source,
volume will not be created and the failure will be reported
as an event. In the future, we plan to support more data source
types and the behavior of the provisioner may change.
properties:
apiGroup:
description: APIGroup is the group for the resource being
referenced. If APIGroup is not specified, the specified
Kind must be in the core API group. For any other third-party
types, APIGroup is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
required:
- kind
- name
type: object
resources:
description: 'Resources represents the minimum resources the
volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
properties:
limits:
additionalProperties:
type: string
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
requests:
additionalProperties:
type: string
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. More info:
https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: object
type: object
selector:
description: A label query over volumes to consider for binding.
properties:
matchExpressions:
description: matchExpressions is a list of label selector
requirements. The requirements are ANDed.
items:
description: A label selector requirement is a selector
that contains values, a key, and an operator that relates
the key and values.
properties:
key:
description: key is the label key that the selector
applies to.
type: string
operator:
description: operator represents a key's relationship
to a set of values. Valid operators are In, NotIn,
Exists and DoesNotExist.
type: string
values:
description: values is an array of string values.
If the operator is In or NotIn, the values array
must be non-empty. If the operator is Exists or
DoesNotExist, the values array must be empty. This
array is replaced during a strategic merge patch.
items:
type: string
type: array
required:
- key
- operator
type: object
type: array
matchLabels:
additionalProperties:
type: string
description: matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is
"key", the operator is "In", and the values array contains
only "value". The requirements are ANDed.
type: object
type: object
storageClassName:
description: 'Name of the StorageClass required by the claim.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1'
type: string
volumeMode:
description: volumeMode defines what type of volume is required
by the claim. Value of Filesystem is implied when not included
in claim spec. This is a beta feature.
type: string
volumeName:
description: VolumeName is the binding reference to the PersistentVolume
backing this claim.
type: string
type: object
type: object
superuserSecretName:
description: This secret defines the username and password for the Cassandra
server superuser. If it is omitted, we will generate a secret instead.
type: string
required:
- clusterName
- serverType
- serverVersion
- size
- storageConfig
type: object
status:
description: CassandraDatacenterStatus defines the observed state of CassandraDatacenter
properties:
cassandraOperatorProgress:
description: Last known progress state of the Cassandra Operator
type: string
lastRollingRestart:
format: date-time
type: string
lastServerNodeStarted:
description: The timestamp when the operator last started a Server node
with the management API
format: date-time
type: string
nodeReplacements:
items:
type: string
type: array
nodeStatuses:
additionalProperties:
properties:
hostID:
type: string
nodeIP:
type: string
type: object
type: object
superUserUpserted:
description: The timestamp at which CQL superuser credentials were last
upserted to the management API
format: date-time
type: string
type: object
type: object
version: v1beta1
versions:
- name: v1beta1
served: true
storage: true
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: cass-operator-cluster-role
rules:
- apiGroups:
- admissionregistration.k8s.io
resourceNames:
- cassandradatacenter-webhook-registration
resources:
- validatingwebhookconfigurations
verbs:
- create
- get
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cass-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cass-operator-cluster-role
subjects:
- kind: ServiceAccount
name: cass-operator
namespace: cass-operator
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: cass-operator
namespace: cass-operator
rules:
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- apps
resourceNames:
- cass-operator
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- datastax.com
resources:
- '*'
verbs:
- '*'
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- '*'
- apiGroups:
- cassandra.datastax.com
resources:
- '*'
verbs:
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: cass-operator
namespace: cass-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: cass-operator
subjects:
- kind: ServiceAccount
name: cass-operator
---
apiVersion: v1
kind: Service
metadata:
labels:
name: cass-operator-webhook
name: cassandradatacenter-webhook-service
namespace: cass-operator
spec:
ports:
- port: 443
targetPort: 443
selector:
name: cass-operator
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cass-operator
namespace: cass-operator
spec:
replicas: 1
selector:
matchLabels:
name: cass-operator
template:
metadata:
labels:
name: cass-operator
spec:
containers:
- env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: cass-operator
- name: SKIP_VALIDATING_WEBHOOK
value: "FALSE"
image: datastax/cass-operator:1.1.0
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
command:
- pgrep
- .*operator
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
name: cass-operator
readinessProbe:
exec:
command:
- stat
- /tmp/operator-sdk-ready
failureThreshold: 1
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cass-operator-certs-volume
readOnly: false
serviceAccountName: cass-operator
volumes:
- name: cass-operator-certs-volume
secret:
secretName: cass-operator-webhook-config
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: cassandradatacenter-webhook-registration
webhooks:
- admissionReviewVersions:
- v1beta1
clientConfig:
service:
name: cassandradatacenter-webhook-service
namespace: cass-operator
path: /validate-cassandra-datastax-com-v1beta1-cassandradatacenter
failurePolicy: Ignore
name: cassandradatacenter-webhook.cassandra.datastax.com
rules:
- apiGroups:
- cassandra.datastax.com
apiVersions:
- v1beta1
operations:
- CREATE
- UPDATE
resources:
- cassandradatacenters
scope: '*'
sideEffects: None
timeoutSeconds: 10