aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/collectd-operator/deploy
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2019-05-21 13:52:42 -0700
committerDileep Ranganathan <dileep.ranganathan@intel.com>2019-05-21 14:09:00 -0700
commit1edca413dfbc05e438541929579ed7ed6aed450e (patch)
treea0627e24c5d96e3a67e4d4c90c04a20443ed060e /vnfs/DAaaS/collectd-operator/deploy
parent117240ff3abb80c8e6e9b7aee04a204e969baff4 (diff)
CollectD Operator - Skeleton code
Skeleton code for CollectD Operator repo. Issue-ID: ONAPARC-461 Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com> Change-Id: I3894091cb6ec5ae11995e7914cf20e09b0def20a
Diffstat (limited to 'vnfs/DAaaS/collectd-operator/deploy')
-rw-r--r--vnfs/DAaaS/collectd-operator/deploy/operator.yaml33
-rw-r--r--vnfs/DAaaS/collectd-operator/deploy/role.yaml41
-rw-r--r--vnfs/DAaaS/collectd-operator/deploy/role_binding.yaml11
-rw-r--r--vnfs/DAaaS/collectd-operator/deploy/service_account.yaml4
4 files changed, 89 insertions, 0 deletions
diff --git a/vnfs/DAaaS/collectd-operator/deploy/operator.yaml b/vnfs/DAaaS/collectd-operator/deploy/operator.yaml
new file mode 100644
index 00000000..14f7d2aa
--- /dev/null
+++ b/vnfs/DAaaS/collectd-operator/deploy/operator.yaml
@@ -0,0 +1,33 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: collectd-operator
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ name: collectd-operator
+ template:
+ metadata:
+ labels:
+ name: collectd-operator
+ spec:
+ serviceAccountName: collectd-operator
+ containers:
+ - name: collectd-operator
+ # Replace this with the built image name
+ image: REPLACE_IMAGE
+ command:
+ - collectd-operator
+ imagePullPolicy: Always
+ env:
+ - name: WATCH_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: OPERATOR_NAME
+ value: "collectd-operator"
diff --git a/vnfs/DAaaS/collectd-operator/deploy/role.yaml b/vnfs/DAaaS/collectd-operator/deploy/role.yaml
new file mode 100644
index 00000000..c748132c
--- /dev/null
+++ b/vnfs/DAaaS/collectd-operator/deploy/role.yaml
@@ -0,0 +1,41 @@
+kind: Role
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: collectd-operator
+rules:
+- apiGroups:
+ - ""
+ resources:
+ - pods
+ - services
+ - endpoints
+ - persistentvolumeclaims
+ - events
+ - configmaps
+ - secrets
+ verbs:
+ - "*"
+- apiGroups:
+ - apps
+ resources:
+ - deployments
+ - daemonsets
+ - replicasets
+ - statefulsets
+ verbs:
+ - "*"
+- apiGroups:
+ - monitoring.coreos.com
+ resources:
+ - servicemonitors
+ verbs:
+ - "get"
+ - "create"
+- apiGroups:
+ - apps
+ resources:
+ - deployments/finalizers
+ resourceNames:
+ - collectd-operator
+ verbs:
+ - "update"
diff --git a/vnfs/DAaaS/collectd-operator/deploy/role_binding.yaml b/vnfs/DAaaS/collectd-operator/deploy/role_binding.yaml
new file mode 100644
index 00000000..e24a9511
--- /dev/null
+++ b/vnfs/DAaaS/collectd-operator/deploy/role_binding.yaml
@@ -0,0 +1,11 @@
+kind: RoleBinding
+apiVersion: rbac.authorization.k8s.io/v1
+metadata:
+ name: collectd-operator
+subjects:
+- kind: ServiceAccount
+ name: collectd-operator
+roleRef:
+ kind: Role
+ name: collectd-operator
+ apiGroup: rbac.authorization.k8s.io
diff --git a/vnfs/DAaaS/collectd-operator/deploy/service_account.yaml b/vnfs/DAaaS/collectd-operator/deploy/service_account.yaml
new file mode 100644
index 00000000..6e6700e4
--- /dev/null
+++ b/vnfs/DAaaS/collectd-operator/deploy/service_account.yaml
@@ -0,0 +1,4 @@
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: collectd-operator