Skip to content

Commit

Permalink
Add cass-operator v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bradfordcp committed Jul 16, 2020
1 parent d02c253 commit 32c203d
Show file tree
Hide file tree
Showing 12 changed files with 549 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/cass-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v2
name: cass-operator
version: 1.1.0
description: Helm chart for Cass Operator.
16 changes: 16 additions & 0 deletions charts/cass-operator/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: {{ .Values.clusterRoleName }}
rules:
- apiGroups:
- admissionregistration.k8s.io
resources:
- validatingwebhookconfigurations
verbs:
- create
- get
- update
resourceNames:
- "cassandradatacenter-webhook-registration"
12 changes: 12 additions & 0 deletions charts/cass-operator/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.clusterRoleBindingName }}
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccountName }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ .Values.clusterRoleName }}
apiGroup: rbac.authorization.k8s.io
328 changes: 328 additions & 0 deletions charts/cass-operator/templates/customresourcedefinition.yaml

Large diffs are not rendered by default.

58 changes: 58 additions & 0 deletions charts/cass-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.deploymentName }}
spec:
replicas: {{ .Values.deploymentReplicas }}
selector:
matchLabels:
name: cass-operator
template:
metadata:
labels:
name: cass-operator
spec:
serviceAccountName: {{ .Values.serviceAccountName }}
volumes:
- name: cass-operator-certs-volume
secret:
secretName: cass-operator-webhook-config
containers:
- name: cass-operator
image: {{ .Values.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
volumeMounts:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cass-operator-certs-volume
readOnly: false
livenessProbe:
exec:
command:
- pgrep
- ".*operator"
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
exec:
command:
- stat
- "/tmp/operator-sdk-ready"
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 1
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"
65 changes: 65 additions & 0 deletions charts/cass-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Values.roleName }}
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:
- '*'
11 changes: 11 additions & 0 deletions charts/cass-operator/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.roleBindingName }}
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccountName }}
roleRef:
kind: Role
name: {{ .Values.roleName }}
apiGroup: rbac.authorization.k8s.io
7 changes: 7 additions & 0 deletions charts/cass-operator/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: cass-operator-webhook-config
data:
tls.crt: ""
tls.key: ""
12 changes: 12 additions & 0 deletions charts/cass-operator/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: cassandradatacenter-webhook-service
labels:
name: cass-operator-webhook
spec:
ports:
- port: 443
targetPort: 443
selector:
name: cass-operator
4 changes: 4 additions & 0 deletions charts/cass-operator/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccountName }}
22 changes: 22 additions & 0 deletions charts/cass-operator/templates/validatingwebhookconfiguration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
name: "cassandradatacenter-webhook-registration"
webhooks:
- name: "cassandradatacenter-webhook.cassandra.datastax.com"
rules:
- apiGroups: ["cassandra.datastax.com"]
apiVersions: ["v1beta1"]
operations: ["CREATE", "UPDATE", "DELETE"]
resources: ["cassandradatacenters"]
scope: "*"
clientConfig:
service:
name: "cassandradatacenter-webhook-service"
namespace: {{ .Release.Namespace }}
path: /validate-cassandra-datastax-com-v1beta1-cassandradatacenter
admissionReviewVersions: ["v1beta1"]
failurePolicy: "Ignore"
matchPolicy: "Equivalent"
sideEffects: None
timeoutSeconds: 10
10 changes: 10 additions & 0 deletions charts/cass-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Default values
serviceAccountName: cass-operator
clusterRoleName: cass-operator-cluster-role
clusterRoleBindingName: cass-operator
roleName: cass-operator
roleBindingName: cass-operator
deploymentName: cass-operator
deploymentReplicas: 1
image: "datastax/cass-operator:1.1.0"
imagePullPolicy: IfNotPresent

0 comments on commit 32c203d

Please sign in to comment.