From 20c40c3f9b78ba571fe8e2b5be1912ab72a1f295 Mon Sep 17 00:00:00 2001 From: portdirect Date: Sun, 4 Mar 2018 07:26:52 -0500 Subject: [PATCH] Ceilometer: use endpoints section and lookups to set port This PS moves ceilometer to use the endpoints section and lookups to set the port it serves on. Change-Id: I7f80dfd51394230883321fbfef5adcbc14da3626 --- ceilometer/templates/deployment-api.yaml | 4 ++-- .../templates/etc/_wsgi-ceilometer.conf.tpl | 4 ++-- ceilometer/templates/service-api.yaml | 2 +- ceilometer/values.yaml | 15 --------------- 4 files changed, 5 insertions(+), 20 deletions(-) diff --git a/ceilometer/templates/deployment-api.yaml b/ceilometer/templates/deployment-api.yaml index eab9621d66..81b2390302 100644 --- a/ceilometer/templates/deployment-api.yaml +++ b/ceilometer/templates/deployment-api.yaml @@ -63,10 +63,10 @@ spec: - stop ports: - name: ce-api - containerPort: {{ .Values.network.api.port }} + containerPort: {{ tuple "metering" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: tcpSocket: - port: {{ .Values.network.api.port }} + port: {{ tuple "metering" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} volumeMounts: - name: pod-etc-ceilometer mountPath: /etc/ceilometer diff --git a/ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl b/ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl index 3f42035b8d..200f244e7a 100644 --- a/ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl +++ b/ceilometer/templates/etc/_wsgi-ceilometer.conf.tpl @@ -14,11 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */}} -Listen 0.0.0.0:{{ .Values.network.api.port }} +Listen 0.0.0.0:{{ tuple "metering" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined - + LogLevel info WSGIDaemonProcess ceilometer-api processes=2 threads=1 user=ceilometer group=ceilometer display-name=%{GROUP} python-path=/var/lib/kolla/venv/lib/python2.7/site-packages WSGIProcessGroup ceilometer-api diff --git a/ceilometer/templates/service-api.yaml b/ceilometer/templates/service-api.yaml index 47737e4af3..2ac03f33a2 100644 --- a/ceilometer/templates/service-api.yaml +++ b/ceilometer/templates/service-api.yaml @@ -24,7 +24,7 @@ metadata: spec: ports: - name: ce-api - port: {{ .Values.network.api.port }} + port: {{ tuple "metering" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.api.node_port.enabled }} nodePort: {{ .Values.network.api.node_port.port }} {{ end }} diff --git a/ceilometer/values.yaml b/ceilometer/values.yaml index ea05c9f5ea..099ea7a123 100644 --- a/ceilometer/values.yaml +++ b/ceilometer/values.yaml @@ -1717,21 +1717,6 @@ endpoints: api: default: 8042 public: 80 - event: - name: panko - hosts: - default: panko-api - public: panko - host_fqdn_override: - default: null - path: - default: null - scheme: - default: 'http' - port: - api: - default: 8777 - public: 80 oslo_db: auth: admin: