aboutsummaryrefslogtreecommitdiffstats
path: root/kud/deployment_infra/images
diff options
context:
space:
mode:
authorLiang Ding <liang.ding@intel.com>2019-10-30 23:47:35 -0700
committerLiang Ding <liang.ding@intel.com>2020-05-05 15:41:48 +0000
commitcc10b9aff3fd16df62c0655ec1626624ad2e2fc0 (patch)
tree506a942430b6eca7058b5549e445125b98f1e5ab /kud/deployment_infra/images
parent501d62d194a42c5c85f22d8208a4e1dd6d985492 (diff)
add cmk in KuD
- deploy cmk related pods - untaint compute nodes if necessary - run cmk unit tests: allocate CPUs from exclusive and shared pools - deploy a testing nginx pod along with cmk testing pods - preset 1/2 CPUs for shared/exlusive pools to fit CI server machines users can adjust the parameters to meet their own requirements Test Results: - many rounds of vagrant/5 VMs(controller01/02/03 and compute01/02) based test are all OK - 14 rounds tests on my local server (S2600WFQ (36C/72T) )and PC(HP Z228 (4C/4T)) with all-in-one bare metal deployment are all OK - CI(a 4C/4T machine) results of latest patch set also show that the test of bare metal deployment is OK - NOTE: both my local test and CI use the same testing method of calling aio.sh after applying the latest patch set. Change-Id: I046a4a63b94f92f23347ab76c21a661521e01119 Issue-ID: MULTICLOUD-879 Signed-off-by: Liang Ding <liang.ding@intel.com>
Diffstat (limited to 'kud/deployment_infra/images')
-rw-r--r--kud/deployment_infra/images/cmk.yaml294
1 files changed, 294 insertions, 0 deletions
diff --git a/kud/deployment_infra/images/cmk.yaml b/kud/deployment_infra/images/cmk.yaml
new file mode 100644
index 00000000..4c048a42
--- /dev/null
+++ b/kud/deployment_infra/images/cmk.yaml
@@ -0,0 +1,294 @@
+---
+# Source: cmk/templates/serviceaccount.yml
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: cmk
+ namespace: kube-system
+---
+# Source: cmk/templates/rbac.yml
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ name: cmk-custom-resource-definition-controller
+ namespace: kube-system
+rules:
+- apiGroups: ["intel.com"]
+ resources: ["*"]
+ verbs: ["*"]
+- apiGroups: ["apiextensions.k8s.io"]
+ resources: ["customresourcedefinitions", "customresourcedefinitions.extensions"]
+ verbs: ["*"]
+---
+# Source: cmk/templates/rbac.yml
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ name: cmk-daemonset-controller
+ namespace: kube-system
+rules:
+- apiGroups: ["extensions"]
+ resources: ["daemonsets", "daemonsets.extensions"]
+ verbs: ["*"]
+---
+# Source: cmk/templates/rbac.yml
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ name: cmk-third-party-resource-controller
+ namespace: kube-system
+rules:
+- apiGroups: ["cmk.intel.com"]
+ resources: ["*"]
+ verbs: ["*"]
+- apiGroups: ["extensions"]
+ resources: ["thirdpartyresources", "thirdpartyresources.extensions"]
+ verbs: ["*"]
+---
+# Source: cmk/templates/rbac.yml
+kind: ClusterRole
+apiVersion: rbac.authorization.k8s.io/v1beta1
+metadata:
+ name: cmk-version-controller
+ namespace: kube-system
+rules:
+ - nonResourceURLs: ["*"]
+ verbs:
+ - get
+---
+# Source: cmk/templates/rbac.yml
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: cmk-role-binding-version
+ namespace: kube-system
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cmk-version-controller
+subjects:
+- kind: ServiceAccount
+ name: cmk
+ namespace: kube-system
+---
+# Source: cmk/templates/rbac.yml
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: cmk-role-binding-daemonset
+ namespace: kube-system
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cmk-daemonset-controller
+subjects:
+- kind: ServiceAccount
+ name: cmk
+ namespace: kube-system
+---
+# Source: cmk/templates/rbac.yml
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: cmk-role-binding-node
+ namespace: kube-system
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: system:node
+subjects:
+- kind: ServiceAccount
+ name: cmk
+ namespace: kube-system
+---
+# Source: cmk/templates/rbac.yml
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: cmk-role-binding-tpr
+ namespace: kube-system
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cmk-third-party-resource-controller
+subjects:
+- kind: ServiceAccount
+ name: cmk
+ namespace: kube-system
+---
+# Source: cmk/templates/rbac.yml
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: cmk-role-binding-crd
+ namespace: kube-system
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cmk-custom-resource-definition-controller
+subjects:
+- kind: ServiceAccount
+ name: cmk
+ namespace: kube-system
+---
+# Source: cmk/templates/daemonset.yml
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: cmk
+ labels:
+ app: cmk
+ namespace: kube-system
+spec:
+ selector:
+ matchLabels:
+ name: cmk
+ template:
+ metadata:
+ labels:
+ name: cmk
+ spec:
+ affinity:
+ nodeAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ nodeSelectorTerms:
+ serviceAccountName: cmk
+ tolerations:
+ - key: cmk
+ operator: Exists
+ containers:
+ - name: reconcile
+ image: localhost:5000/cmk:v1.4.1
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: CMK_RECONCILE_SLEEP_TIME
+ value: '60'
+ - name: CMK_PROC_FS
+ value: /proc
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: spec.nodeName
+ command: ["/bin/bash", "-c"]
+ args:
+ - "/cmk/cmk.py isolate --pool=infra /cmk/cmk.py -- reconcile --interval=$CMK_RECONCILE_SLEEP_TIME --publish"
+ volumeMounts:
+ - mountPath: /proc
+ name: host-proc
+ readOnly: false
+ - mountPath: /etc/cmk
+ name: cmk-conf-dir
+ - mountPath: /opt/bin
+ name: cmk-install-dir
+ - name: nodereport
+ image: localhost:5000/cmk:v1.4.1
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: CMK_NODE_REPORT_SLEEP_TIME
+ value: '60'
+ - name: CMK_PROC_FS
+ value: /proc
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: spec.nodeName
+ command: ["/bin/bash", "-c"]
+ args:
+ - "/cmk/cmk.py isolate --pool=infra /cmk/cmk.py -- node-report --interval=$CMK_NODE_REPORT_SLEEP_TIME --publish"
+ volumeMounts:
+ - mountPath: /proc
+ name: host-proc
+ readOnly: false
+ - mountPath: /etc/cmk
+ name: cmk-conf-dir
+ - mountPath: /opt/bin
+ name: cmk-install-dir
+ initContainers:
+ - name: init
+ image: localhost:5000/cmk:v1.4.1
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: CMK_PROC_FS
+ value: "/proc"
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: spec.nodeName
+ command: ["/bin/bash", "-c"]
+ args:
+ - "/cmk/cmk.py init --conf-dir=/etc/cmk --exclusive-mode=packed --num-exclusive-cores=0 --shared-mode=packed --num-shared-cores=0"
+ volumeMounts:
+ - mountPath: /proc
+ name: host-proc
+ readOnly: false
+ - mountPath: /etc/cmk
+ name: cmk-conf-dir
+ readOnly: false
+ - mountPath: /opt/bin
+ name: cmk-install-dir
+ readOnly: false
+ - name: discover
+ image: localhost:5000/cmk:v1.4.1
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: CMK_PROC_FS
+ value: /proc
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: spec.nodeName
+ command: ["/bin/bash", "-c"]
+ args:
+# - "echo -en '\n'; ls -a /etc/cmk; sleep 10;"
+ - "until [ -d /etc/cmk ]; do sleep 1; done; /cmk/cmk.py discover"
+ volumeMounts:
+ - mountPath: /proc
+ name: host-proc
+ readOnly: false
+ - mountPath: /etc/cmk
+ name: cmk-conf-dir
+ readOnly: false
+ - mountPath: /opt/bin
+ name: cmk-install-dir
+ readOnly: false
+ - name: install
+ image: localhost:5000/cmk:v1.4.1
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: CMK_PROC_FS
+ value: /proc
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: spec.nodeName
+ command: ["/bin/bash", "-c"]
+ args:
+ - "/cmk/cmk.py install"
+ volumeMounts:
+ - mountPath: /proc
+ name: host-proc
+ readOnly: false
+ - mountPath: /etc/cmk
+ name: cmk-conf-dir
+ - mountPath: /opt/bin
+ name: cmk-install-dir
+# restartPolicy: Never
+ volumes:
+ - hostPath:
+ path: /proc
+# type: ""
+ name: host-proc
+ - hostPath:
+ path: /etc/cmk
+# type: ""
+ name: cmk-conf-dir
+ - hostPath:
+ path: /opt/bin
+# type: ""
+ name: cmk-install-dir
+