aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/operator/charts/m3db-operator/templates
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2019-03-11 11:42:11 -0700
committerDileep Ranganathan <dileep.ranganathan@intel.com>2019-03-11 11:42:11 -0700
commit481ddd352817a45f29bbfaad898c7815c1f6e9a0 (patch)
tree62e5ad7cdce58a08a25ccc255eaf6d10d7eaaef0 /vnfs/DAaaS/operator/charts/m3db-operator/templates
parent6d7c9539bb348af48f6c3d109c46f6f22d927be0 (diff)
Operator pacakge for Distributed Analytics
Created the operator helm charts in separate package which consists of multiple kubernetes operators. Change-Id: I38e3fafae65b655de1accec05082d0afaed1d688 Issue-ID: ONAPARC-366 Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Diffstat (limited to 'vnfs/DAaaS/operator/charts/m3db-operator/templates')
-rw-r--r--vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role.yaml35
-rw-r--r--vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role_binding.yaml12
-rw-r--r--vnfs/DAaaS/operator/charts/m3db-operator/templates/service_account.yaml5
-rw-r--r--vnfs/DAaaS/operator/charts/m3db-operator/templates/stateful_set.yaml26
4 files changed, 78 insertions, 0 deletions
diff --git a/vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role.yaml b/vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role.yaml
new file mode 100644
index 00000000..7bf41739
--- /dev/null
+++ b/vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role.yaml
@@ -0,0 +1,35 @@
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRole
+metadata:
+ name: {{ .Values.operator.name }}
+rules:
+- apiGroups: ["extensions"]
+ resources: ["deployments", "replicasets", "daemonsets"]
+ verbs: ["create", "get", "update", "delete", "list"]
+- apiGroups: ["apiextensions.k8s.io"]
+ resources: ["customresourcedefinitions"]
+ verbs: ["create", "get", "update", "delete", "list"]
+- apiGroups: ["storage.k8s.io"]
+ resources: ["storageclasses"]
+ verbs: ["get", "list", "create", "delete", "deletecollection"]
+- apiGroups: [""]
+ resources: ["persistentvolumes", "persistentvolumeclaims", "services", "secrets", "configmaps"]
+ verbs: ["create", "get", "update", "delete", "list"]
+- apiGroups: ["batch"]
+ resources: ["cronjobs", "jobs"]
+ verbs: ["create", "get", "deletecollection", "delete"]
+- apiGroups: [""]
+ resources: ["pods"]
+ verbs: ["list", "get", "watch", "update"]
+- apiGroups: ["apps"]
+ resources: ["statefulsets", "deployments"]
+ verbs: ["*"]
+- apiGroups: ["operator.m3db.io"]
+ resources: ["*"]
+ verbs: ["*"]
+- apiGroups: [""]
+ resources: ["events"]
+ verbs: ["create", "patch"]
+- apiGroups: [""]
+ resources: ["nodes"]
+ verbs: ["get", "list", "watch"]
diff --git a/vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role_binding.yaml b/vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role_binding.yaml
new file mode 100644
index 00000000..876a6705
--- /dev/null
+++ b/vnfs/DAaaS/operator/charts/m3db-operator/templates/cluster_role_binding.yaml
@@ -0,0 +1,12 @@
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: {{ .Values.operator.name }}
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: {{ .Values.operator.name }}
+subjects:
+- kind: ServiceAccount
+ name: {{ .Values.operator.name }}
+ namespace: {{ .Release.Namespace }}
diff --git a/vnfs/DAaaS/operator/charts/m3db-operator/templates/service_account.yaml b/vnfs/DAaaS/operator/charts/m3db-operator/templates/service_account.yaml
new file mode 100644
index 00000000..a65e90bc
--- /dev/null
+++ b/vnfs/DAaaS/operator/charts/m3db-operator/templates/service_account.yaml
@@ -0,0 +1,5 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ .Values.operator.name }}
+ namespace: {{ .Release.Namespace }}
diff --git a/vnfs/DAaaS/operator/charts/m3db-operator/templates/stateful_set.yaml b/vnfs/DAaaS/operator/charts/m3db-operator/templates/stateful_set.yaml
new file mode 100644
index 00000000..d1002378
--- /dev/null
+++ b/vnfs/DAaaS/operator/charts/m3db-operator/templates/stateful_set.yaml
@@ -0,0 +1,26 @@
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: {{ .Values.operator.name }}
+ namespace: {{ .Release.Namespace }}
+spec:
+ serviceName: {{ .Values.operator.name }}
+ replicas: 1
+ selector:
+ matchLabels:
+ name: {{ .Values.operator.name }}
+ template:
+ metadata:
+ labels:
+ name: {{ .Values.operator.name }}
+ spec:
+ containers:
+ - name: {{ .Values.operator.name }}
+ image: {{ .Values.image.repository}}:{{ .Values.image.tag }}
+ command:
+ - m3db-operator
+ imagePullPolicy: Always
+ env:
+ - name: ENVIRONMENT
+ value: {{ .Values.environment }}
+ serviceAccount: {{ .Values.operator.name }}