Initial M-CORD services charts
Change-Id: I36bcfcb3f7800b95e54b5b8a375e113696f6d5b1
diff --git a/mcord/mcord-control-plane/templates/cassandra.yaml b/mcord/mcord-control-plane/templates/cassandra.yaml
new file mode 100644
index 0000000..56688f8
--- /dev/null
+++ b/mcord/mcord-control-plane/templates/cassandra.yaml
@@ -0,0 +1,88 @@
+---
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ namespace: {{ .Values.namespace }}
+ labels:
+ app: cassandra
+ name: cassandra
+spec:
+ clusterIP: None
+ ports:
+ - port: 9042
+ selector:
+ app: cassandra
+---
+apiVersion: "apps/v1"
+kind: StatefulSet
+metadata:
+ namespace: {{ .Values.namespace }}
+ name: cassandra
+ labels:
+ app: cassandra
+spec:
+ serviceName: cassandra
+ replicas: 1 # 3
+ selector:
+ matchLabels:
+ app: cassandra
+ template:
+ metadata:
+ namespace: {{ .Values.namespace }}
+ labels:
+ app: cassandra
+ spec:
+ terminationGracePeriodSeconds: 1
+ containers:
+ - name: cassandra
+ image: ngick8stesting/c3po-cassandra:5e2eaf6
+ imagePullPolicy: Always
+ resources:
+ limits:
+ cpu: "3"
+ memory: 4Gi
+ env:
+ - name: MAX_HEAP_SIZE
+ value: 512M
+ - name: HEAP_NEWSIZE
+ value: 100M
+ - name: CASSANDRA_SEEDS
+ value: "cassandra-0.cassandra.{{ .Values.namespace }}.svc.cluster.local"
+ - name: CASSANDRA_CLUSTER_NAME
+ value: "HSS Cluster"
+ - name: CASSANDRA_RPC_ADDRESS
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: CASSANDRA_ENDPOINT_SNITCH
+ value: "GossipingPropertyFileSnitch"
+ securityContext:
+ runAsUser: 1337
+ readinessProbe:
+ exec:
+ command: ["/bin/bash", "-c", "nodetool status -r | awk -v h=$(hostname) '$2==h {exit ($1==\"UN\" ? 0 : -1)}'"]
+ initialDelaySeconds: 15
+ timeoutSeconds: 5
+ volumeMounts:
+ - name: cassandra-config
+ mountPath: /etc/cassandra/cassandra-rackdc.properties
+ subPath: cassandra-rackdc.properties
+ volumes:
+ - name: cassandra-config
+ configMap:
+ name: cassandra