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
This commit is contained in:
Pete Birley 2018-03-03 16:16:52 +00:00
parent 16c6d31155
commit ff0372be4f
4 changed files with 11 additions and 13 deletions

View File

@ -62,15 +62,15 @@ spec:
- /tmp/keystone-api.sh - /tmp/keystone-api.sh
- stop - stop
ports: ports:
- name: api-public - name: ks-pub
containerPort: {{ .Values.network.api.port }} containerPort: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
- name: api-admin - name: ks-adm
containerPort: {{ .Values.network.admin.port }} containerPort: {{ tuple "identity" "internal" "admin" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
readinessProbe: readinessProbe:
httpGet: httpGet:
scheme: HTTP scheme: HTTP
path: / path: /
port: {{ .Values.network.api.port }} port: {{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
initialDelaySeconds: 15 initialDelaySeconds: 15
periodSeconds: 10 periodSeconds: 10
volumeMounts: volumeMounts:

View File

@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
Listen 0.0.0.0:{{ .Values.network.api.port }} Listen 0.0.0.0:{{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
Listen 0.0.0.0:{{ .Values.network.admin.port }} 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 "%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 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 combined env=!forwarded
CustomLog /dev/stdout proxy env=forwarded CustomLog /dev/stdout proxy env=forwarded
<VirtualHost *:{{ .Values.network.api.port }}> <VirtualHost *:{{ tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
WSGIDaemonProcess keystone-public processes=1 threads=4 user=keystone group=keystone display-name=%{GROUP} WSGIDaemonProcess keystone-public processes=1 threads=4 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-public WSGIProcessGroup keystone-public
WSGIScriptAlias / /var/www/cgi-bin/keystone/keystone-wsgi-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 CustomLog /dev/stdout proxy env=forwarded
</VirtualHost> </VirtualHost>
<VirtualHost *:{{ .Values.network.admin.port }}> <VirtualHost *:{{ tuple "identity" "internal" "admin" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
WSGIDaemonProcess keystone-admin processes=1 threads=4 user=keystone group=keystone display-name=%{GROUP} WSGIDaemonProcess keystone-admin processes=1 threads=4 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-admin WSGIProcessGroup keystone-admin
WSGIScriptAlias / /var/www/cgi-bin/keystone/keystone-wsgi-admin WSGIScriptAlias / /var/www/cgi-bin/keystone/keystone-wsgi-admin

View File

@ -24,12 +24,12 @@ metadata:
spec: spec:
ports: ports:
- name: ks-pub - 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 }} {{ if .Values.network.api.node_port.enabled }}
nodePort: {{ .Values.network.api.node_port.port }} nodePort: {{ .Values.network.api.node_port.port }}
{{ end }} {{ end }}
- name: ks-adm - 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 }} {{ if .Values.network.admin.node_port.enabled }}
nodePort: {{ .Values.network.admin.node_port.port }} nodePort: {{ .Values.network.admin.node_port.port }}
{{ end }} {{ end }}

View File

@ -58,7 +58,6 @@ bootstrap:
network: network:
api: api:
port: 80
ingress: ingress:
public: true public: true
annotations: annotations:
@ -69,7 +68,6 @@ network:
enabled: false enabled: false
port: 30500 port: 30500
admin: admin:
port: 35357
node_port: node_port:
enabled: false enabled: false
port: 30357 port: 30357