From ff0372be4f323b779b0fea00623bbed4df0b3f41 Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Sat, 3 Mar 2018 16:16:52 +0000 Subject: [PATCH] Keystone: use endpoints section and lookups to set port This PS moves keystone to use the endpoints section and lookups to set the port it serves on. Change-Id: I52c130ded9e76f9e74fce6e5b33d3950262dd7ad --- keystone/templates/deployment-api.yaml | 10 +++++----- keystone/templates/etc/_wsgi-keystone.conf.tpl | 8 ++++---- keystone/templates/service-api.yaml | 4 ++-- keystone/values.yaml | 2 -- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/keystone/templates/deployment-api.yaml b/keystone/templates/deployment-api.yaml index 91003b5532..072fd1aaa1 100644 --- a/keystone/templates/deployment-api.yaml +++ b/keystone/templates/deployment-api.yaml @@ -62,15 +62,15 @@ spec: - /tmp/keystone-api.sh - stop ports: - - name: api-public - containerPort: {{ .Values.network.api.port }} - - name: api-admin - containerPort: {{ .Values.network.admin.port }} + - name: ks-pub + containerPort: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} + - name: ks-adm + containerPort: {{ tuple "identity" "internal" "admin" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} readinessProbe: httpGet: scheme: HTTP path: / - port: {{ .Values.network.api.port }} + port: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} initialDelaySeconds: 15 periodSeconds: 10 volumeMounts: diff --git a/keystone/templates/etc/_wsgi-keystone.conf.tpl b/keystone/templates/etc/_wsgi-keystone.conf.tpl index 242b80b497..6e126e1ef2 100644 --- a/keystone/templates/etc/_wsgi-keystone.conf.tpl +++ b/keystone/templates/etc/_wsgi-keystone.conf.tpl @@ -14,8 +14,8 @@ 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:{{ .Values.network.admin.port }} +Listen 0.0.0.0:{{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} +Listen 0.0.0.0:{{ tuple "identity" "internal" "admin" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy @@ -24,7 +24,7 @@ SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded CustomLog /dev/stdout combined env=!forwarded CustomLog /dev/stdout proxy env=forwarded - + WSGIDaemonProcess keystone-public processes=1 threads=4 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-public WSGIScriptAlias / /var/www/cgi-bin/keystone/keystone-wsgi-public @@ -40,7 +40,7 @@ CustomLog /dev/stdout proxy env=forwarded CustomLog /dev/stdout proxy env=forwarded - + WSGIDaemonProcess keystone-admin processes=1 threads=4 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-admin WSGIScriptAlias / /var/www/cgi-bin/keystone/keystone-wsgi-admin diff --git a/keystone/templates/service-api.yaml b/keystone/templates/service-api.yaml index f66e3f03f0..4cc3a7e0fb 100644 --- a/keystone/templates/service-api.yaml +++ b/keystone/templates/service-api.yaml @@ -24,12 +24,12 @@ metadata: spec: ports: - name: ks-pub - port: {{ .Values.network.api.port }} + port: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.api.node_port.enabled }} nodePort: {{ .Values.network.api.node_port.port }} {{ end }} - name: ks-adm - port: {{ .Values.network.admin.port }} + port: {{ tuple "identity" "internal" "admin" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} {{ if .Values.network.admin.node_port.enabled }} nodePort: {{ .Values.network.admin.node_port.port }} {{ end }} diff --git a/keystone/values.yaml b/keystone/values.yaml index d2abe1d364..1912ce0232 100644 --- a/keystone/values.yaml +++ b/keystone/values.yaml @@ -58,7 +58,6 @@ bootstrap: network: api: - port: 80 ingress: public: true annotations: @@ -69,7 +68,6 @@ network: enabled: false port: 30500 admin: - port: 35357 node_port: enabled: false port: 30357