-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d02c253
commit 32c203d
Showing
12 changed files
with
549 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
328
charts/cass-operator/templates/customresourcedefinition.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
22
charts/cass-operator/templates/validatingwebhookconfiguration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |