Browse Source

Ceilometer chart: Add polling process with ipmi functionality

This commit adds the ability to deploy a polling process with ipmi
functionality to pull ipmi samples.
Story: 2005019
Task: 29819
Signed-off-by: Angie Wang <angie.wang@windriver.com>

Change-Id: Ib61d65f9ab815faa0d750422ffb0e36406dd3ccd
Angie Wang 1 month ago
parent
commit
ac9c7e1d24

+ 22
- 0
ceilometer/templates/bin/_ceilometer-ipmi.sh.tpl View File

@@ -0,0 +1,22 @@
1
+#!/bin/bash
2
+
3
+{{/*
4
+Copyright 2019 The Openstack-Helm Authors.
5
+Licensed under the Apache License, Version 2.0 (the "License");
6
+you may not use this file except in compliance with the License.
7
+You may obtain a copy of the License at
8
+
9
+   http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+Unless required by applicable law or agreed to in writing, software
12
+distributed under the License is distributed on an "AS IS" BASIS,
13
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+See the License for the specific language governing permissions and
15
+limitations under the License.
16
+*/}}
17
+
18
+set -ex
19
+
20
+exec ceilometer-polling \
21
+  --polling-namespaces ipmi \
22
+  --config-file /etc/ceilometer/ceilometer.conf

+ 123
- 0
ceilometer/templates/daemonset-ipmi.yaml View File

@@ -0,0 +1,123 @@
1
+{{/*
2
+Copyright 2019 The Openstack-Helm Authors.
3
+Licensed under the Apache License, Version 2.0 (the "License");
4
+you may not use this file except in compliance with the License.
5
+You may obtain a copy of the License at
6
+
7
+   http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+Unless required by applicable law or agreed to in writing, software
10
+distributed under the License is distributed on an "AS IS" BASIS,
11
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+See the License for the specific language governing permissions and
13
+limitations under the License.
14
+*/}}
15
+
16
+{{- if .Values.manifests.daemonset_ipmi }}
17
+{{- $envAll := . }}
18
+
19
+{{- $mounts_ceilometer_ipmi := .Values.pod.mounts.ceilometer_ipmi.ceilometer_ipmi }}
20
+{{- $mounts_ceilometer_ipmi_init := .Values.pod.mounts.ceilometer_ipmi.init_container }}
21
+
22
+{{- $serviceAccountName := "ceilometer-ipmi" }}
23
+{{ tuple $envAll "ipmi" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
24
+---
25
+apiVersion: apps/v1
26
+kind: DaemonSet
27
+metadata:
28
+  name: ceilometer-ipmi
29
+  annotations:
30
+    {{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" }}
31
+  labels:
32
+{{ tuple $envAll "ceilometer" "ipmi" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
33
+spec:
34
+  selector:
35
+    matchLabels:
36
+{{ tuple $envAll "ceilometer" "ipmi" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
37
+{{ tuple $envAll "ipmi" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
38
+  template:
39
+    metadata:
40
+      labels:
41
+{{ tuple $envAll "ceilometer" "ipmi" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
42
+      annotations:
43
+{{ tuple $envAll | include "helm-toolkit.snippets.release_uuid" | indent 8 }}
44
+        configmap-bin-hash: {{ tuple "configmap-bin.yaml" . | include "helm-toolkit.utils.hash" }}
45
+        configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }}
46
+    spec:
47
+      serviceAccountName: {{ $serviceAccountName }}
48
+      affinity:
49
+{{ tuple $envAll "ceilometer" "ipmi" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
50
+      hostNetwork: true
51
+      hostPID: true
52
+      dnsPolicy: ClusterFirstWithHostNet
53
+      nodeSelector:
54
+        {{ .Values.labels.ipmi.node_selector_key }}: {{ .Values.labels.ipmi.node_selector_value }}
55
+      initContainers:
56
+{{ tuple $envAll "ipmi" $mounts_ceilometer_ipmi_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
57
+      containers:
58
+        - name: ceilometer-ipmi
59
+{{ tuple $envAll "ceilometer_ipmi" | include "helm-toolkit.snippets.image" | indent 10 }}
60
+{{ tuple $envAll $envAll.Values.pod.resources.ipmi | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
61
+          securityContext:
62
+            privileged: true
63
+          command:
64
+            - /tmp/ceilometer-ipmi.sh
65
+          volumeMounts:
66
+            - name: pod-etc-ceilometer
67
+              mountPath: /etc/ceilometer
68
+            - name: ceilometer-etc
69
+              mountPath: /etc/ceilometer/ceilometer.conf
70
+              subPath: ceilometer.conf
71
+              readOnly: true
72
+            - name: ceilometer-etc
73
+              mountPath: /etc/ceilometer/api_paste.ini
74
+              subPath: api_paste.ini
75
+              readOnly: true
76
+            - name: ceilometer-etc
77
+              mountPath: /etc/ceilometer/policy.json
78
+              subPath: policy.json
79
+              readOnly: true
80
+            - name: ceilometer-etc
81
+              mountPath: /etc/ceilometer/event_definitions.yaml
82
+              subPath: event_definitions.yaml
83
+              readOnly: true
84
+            - name: ceilometer-etc
85
+              mountPath: /etc/ceilometer/event_pipeline.yaml
86
+              subPath: event_pipeline.yaml
87
+              readOnly: true
88
+            - name: ceilometer-etc
89
+              mountPath: /etc/ceilometer/pipeline.yaml
90
+              subPath: pipeline.yaml
91
+              readOnly: true
92
+            - name: ceilometer-etc
93
+              mountPath: /etc/ceilometer/gnocchi_resources.yaml
94
+              subPath: gnocchi_resources.yaml
95
+              readOnly: true
96
+            - name: ceilometer-etc
97
+              mountPath: /etc/ceilometer/polling.yaml
98
+              subPath: polling.yaml
99
+              readOnly: true
100
+            - name: ceilometer-bin
101
+              mountPath: /tmp/ceilometer-ipmi.sh
102
+              subPath: ceilometer-ipmi.sh
103
+              readOnly: true
104
+            - name: ipmi-device
105
+              mountPath: {{ .Values.ipmi_device }}
106
+              readOnly: true
107
+{{ if $mounts_ceilometer_ipmi.volumeMounts }}{{ toYaml $mounts_ceilometer_ipmi.volumeMounts | indent 12 }}{{ end }}
108
+      volumes:
109
+        - name: pod-etc-ceilometer
110
+          emptyDir: {}
111
+        - name: ceilometer-etc
112
+          secret:
113
+            secretName: ceilometer-etc
114
+            defaultMode: 0444
115
+        - name: ceilometer-bin
116
+          configMap:
117
+            name: ceilometer-bin
118
+            defaultMode: 0555
119
+        - name: ipmi-device
120
+          hostPath:
121
+            path: {{ .Values.ipmi_device }}
122
+{{ if $mounts_ceilometer_ipmi.volumes }}{{ toYaml $mounts_ceilometer_ipmi.volumes | indent 8 }}{{ end }}
123
+{{- end }}

+ 33
- 0
ceilometer/values.yaml View File

@@ -29,6 +29,9 @@ labels:
29 29
   central:
30 30
     node_selector_key: openstack-control-plane
31 31
     node_selector_value: enabled
32
+  ipmi:
33
+    node_selector_key: openstack-node
34
+    node_selector_value: enabled
32 35
   collector:
33 36
     node_selector_key: openstack-control-plane
34 37
     node_selector_value: enabled
@@ -56,6 +59,7 @@ images:
56 59
     ceilometer_central: docker.io/kolla/ubuntu-source-ceilometer-central:ocata
57 60
     ceilometer_collector: docker.io/kolla/ubuntu-source-ceilometer-collector:ocata
58 61
     ceilometer_compute: docker.io/kolla/ubuntu-source-ceilometer-compute:ocata
62
+    ceilometer_ipmi: docker.io/kolla/ubuntu-source-ceilometer-base:ocata
59 63
     ceilometer_notification: docker.io/kolla/ubuntu-source-ceilometer-notification:ocata
60 64
     dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
61 65
     image_repo_sync: docker.io/docker:17.07.0
@@ -80,6 +84,8 @@ network:
80 84
       enabled: false
81 85
       port: 38777
82 86
 
87
+ipmi_device: /dev/ipmi0
88
+
83 89
 conf:
84 90
   ceilometer:
85 91
     DEFAULT:
@@ -1500,6 +1506,22 @@ dependencies:
1500 1506
           service: mongodb
1501 1507
         - endpoint: internal
1502 1508
           service: metric
1509
+    ipmi:
1510
+      jobs:
1511
+        - ceilometer-db-init-mongodb
1512
+        - ceilometer-db-sync
1513
+        - ceilometer-rabbit-init
1514
+        - ceilometer-ks-user
1515
+        - ceilometer-ks-endpoints
1516
+      services:
1517
+        - endpoint: internal
1518
+          service: identity
1519
+        - endpoint: internal
1520
+          service: oslo_db
1521
+        - endpoint: internal
1522
+          service: mongodb
1523
+        - endpoint: internal
1524
+          service: metric
1503 1525
     collector:
1504 1526
       jobs:
1505 1527
         - ceilometer-db-init-mongodb
@@ -1808,6 +1830,9 @@ pod:
1808 1830
     ceilometer_central:
1809 1831
       init_container: null
1810 1832
       ceilometer_central:
1833
+    ceilometer_ipmi:
1834
+      init_container: null
1835
+      ceilometer_ipmi:
1811 1836
     ceilometer_collector:
1812 1837
       init_container: null
1813 1838
       ceilometer_collector:
@@ -1876,6 +1901,13 @@ pod:
1876 1901
       limits:
1877 1902
         memory: "1024Mi"
1878 1903
         cpu: "2000m"
1904
+    ipmi:
1905
+      requests:
1906
+        memory: "124Mi"
1907
+        cpu: "100m"
1908
+      limits:
1909
+        memory: "1024Mi"
1910
+        cpu: "2000m"
1879 1911
     jobs:
1880 1912
       db_init:
1881 1913
         requests:
@@ -1953,6 +1985,7 @@ manifests:
1953 1985
   deployment_central: true
1954 1986
   deployment_collector: true
1955 1987
   daemonset_compute: true
1988
+  daemonset_ipmi: false
1956 1989
   deployment_notification: true
1957 1990
   ingress_api: true
1958 1991
   job_bootstrap: true

Loading…
Cancel
Save