KS endpoint type lookup for Heat

This commit is contained in:
Pete Birley 2017-03-07 00:23:35 +00:00
parent 97fd35009a
commit 9638fdccbf
14 changed files with 48 additions and 46 deletions

View File

@ -49,10 +49,10 @@ spec:
- --config-dir - --config-dir
- /etc/heat/conf - /etc/heat/conf
ports: ports:
- containerPort: {{ .Values.service.api.port }} - containerPort: {{ .Values.network.api.port }}
readinessProbe: readinessProbe:
tcpSocket: tcpSocket:
port: {{ .Values.service.api.port }} port: {{ .Values.network.api.port }}
volumeMounts: volumeMounts:
- name: pod-etc-heat - name: pod-etc-heat
mountPath: /etc/heat mountPath: /etc/heat

View File

@ -49,10 +49,10 @@ spec:
- --config-dir - --config-dir
- /etc/heat/conf - /etc/heat/conf
ports: ports:
- containerPort: {{ .Values.service.cfn.port }} - containerPort: {{ .Values.network.cfn.port }}
readinessProbe: readinessProbe:
tcpSocket: tcpSocket:
port: {{ .Values.service.cfn.port }} port: {{ .Values.network.cfn.port }}
volumeMounts: volumeMounts:
- name: pod-etc-heat - name: pod-etc-heat
mountPath: /etc/heat mountPath: /etc/heat

View File

@ -49,10 +49,10 @@ spec:
- --config-dir - --config-dir
- /etc/heat/conf - /etc/heat/conf
ports: ports:
- containerPort: {{ .Values.service.cloudwatch.port }} - containerPort: {{ .Values.network.cloudwatch.port }}
readinessProbe: readinessProbe:
tcpSocket: tcpSocket:
port: {{ .Values.service.cloudwatch.port }} port: {{ .Values.network.cloudwatch.port }}
volumeMounts: volumeMounts:
- name: pod-etc-heat - name: pod-etc-heat
mountPath: /etc/heat mountPath: /etc/heat

View File

@ -22,9 +22,9 @@ deferred_auth_method = "trusts"
enable_stack_adopt = "True" enable_stack_adopt = "True"
enable_stack_abandon = "True" enable_stack_abandon = "True"
heat_metadata_server_url = {{ .Values.service.cfn.proto }}://{{ .Values.service.cfn.name }}:{{ .Values.service.cfn.port }} heat_metadata_server_url = {{ tuple "cloudformation" "public" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | trimSuffix .Values.endpoints.cloudformation.path }}
heat_waitcondition_server_url = {{ .Values.service.cfn.proto }}://{{ .Values.service.cfn.name }}:{{ .Values.service.cfn.port }}/v1/waitcondition heat_waitcondition_server_url = {{ tuple "cloudformation" "public" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }}/waitcondition
heat_watch_server_url = {{ .Values.service.cloudwatch.proto }}://{{ .Values.service.cloudwatch.name }}:{{ .Values.service.cloudwatch.port }} heat_watch_server_url = {{ tuple "cloudwatch" "public" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | trimSuffix "/" }}
num_engine_workers = {{ .Values.resources.engine.workers }} num_engine_workers = {{ .Values.resources.engine.workers }}
@ -47,7 +47,7 @@ max_retries = -1
signing_dir = "/var/cache/heat" signing_dir = "/var/cache/heat"
memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}"
auth_version = v3 auth_version = v3
auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_url = {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }}
auth_type = password auth_type = password
region_name = {{ .Values.keystone.heat_region_name }} region_name = {{ .Values.keystone.heat_region_name }}
project_domain_name = {{ .Values.keystone.heat_project_domain }} project_domain_name = {{ .Values.keystone.heat_project_domain }}
@ -57,17 +57,17 @@ username = {{ .Values.keystone.heat_user }}
password = {{ .Values.keystone.heat_password }} password = {{ .Values.keystone.heat_password }}
[heat_api] [heat_api]
bind_port = {{ .Values.service.api.port }} bind_port = {{ .Values.network.api.port }}
bind_host = 0.0.0.0 bind_host = 0.0.0.0
workers = {{ .Values.resources.api.workers }} workers = {{ .Values.resources.api.workers }}
[heat_api_cloudwatch] [heat_api_cloudwatch]
bind_port = {{ .Values.service.cloudwatch.port }} bind_port = {{ .Values.network.cloudwatch.port }}
bind_host = 0.0.0.0 bind_host = 0.0.0.0
workers = {{ .Values.resources.cloudwatch.workers }} workers = {{ .Values.resources.cloudwatch.workers }}
[heat_api_cfn] [heat_api_cfn]
bind_port = {{ .Values.service.cfn.port }} bind_port = {{ .Values.network.cfn.port }}
bind_host = 0.0.0.0 bind_host = 0.0.0.0
workers = {{ .Values.resources.cfn.workers }} workers = {{ .Values.resources.cfn.workers }}
@ -88,9 +88,11 @@ auth_section = "trustee_keystone"
signing_dir = "/var/cache/heat" signing_dir = "/var/cache/heat"
memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}" memcached_servers = "{{ .Values.memcached.host }}:{{ .Values.memcached.port }}"
auth_version = v3 auth_version = v3
auth_url = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_url = {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" }}
auth_type = password auth_type = password
region_name = {{ .Values.keystone.heat_trustee_region_name }} region_name = {{ .Values.keystone.heat_trustee_region_name }}
project_domain_name = {{ .Values.keystone.heat_trustee_project_domain }}
project_name = {{ .Values.keystone.heat_trustee_project_name }}
user_domain_name = {{ .Values.keystone.heat_trustee_user_domain }} user_domain_name = {{ .Values.keystone.heat_trustee_user_domain }}
username = {{ .Values.keystone.heat_trustee_user }} username = {{ .Values.keystone.heat_trustee_user }}
password = {{ .Values.keystone.heat_trustee_password }} password = {{ .Values.keystone.heat_trustee_password }}
@ -101,4 +103,4 @@ endpoint_type = internalURL
[clients_keystone] [clients_keystone]
endpoint_type = internalURL endpoint_type = internalURL
auth_uri = {{ include "helm-toolkit.endpoint_keystone_internal" . }} auth_uri = {{ tuple "identity" "internal" "api" . | include "endpoint_type_lookup_addr" }}

View File

@ -31,9 +31,9 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers: containers:
{{- range $key1, $osServiceName := tuple "heat" "heat-cfn" }} {{- range $key1, $osServiceType := tuple "orchestration" "cloudformation" }}
{{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }} {{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }}
- name: {{ $osServiceName }}-ks-endpoints-{{ $osServiceEndPoint }} - name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
image: {{ $envAll.Values.images.ks_endpoints }} image: {{ $envAll.Values.images.ks_endpoints }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{- if $envAll.Values.resources.enabled }}
@ -60,11 +60,11 @@ spec:
- name: OS_SVC_ENDPOINT - name: OS_SVC_ENDPOINT
value: {{ $osServiceEndPoint }} value: {{ $osServiceEndPoint }}
- name: OS_SERVICE_NAME - name: OS_SERVICE_NAME
value: {{ $osServiceName }} value: {{ tuple $osServiceType $envAll | include "helm-toolkit.keystone_endpoint_name_lookup" }}
- name: OS_SERVICE_TYPE - name: OS_SERVICE_TYPE
value: {{ tuple $osServiceName $envAll | include "helm-toolkit.endpoint_type_lookup" }} value: {{ $osServiceType }}
- name: OS_SERVICE_ENDPOINT - name: OS_SERVICE_ENDPOINT
value: {{ tuple $osServiceName $osServiceEndPoint "api" $envAll | include "helm-toolkit.endpoint_uri_lookup" }} value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.keystone_endpoint_uri_lookup" }}
{{- end }} {{- end }}
{{- end }} {{- end }}
volumes: volumes:

View File

@ -31,8 +31,8 @@ spec:
nodeSelector: nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers: containers:
{{- range $key1, $osServiceName := tuple "heat" "heat-cfn" }} {{- range $key1, $osServiceType := tuple "orchestration" "cloudformation" }}
- name: {{ $osServiceName }}-ks-service-registration - name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }} image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }} imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }} {{- if $envAll.Values.resources.enabled }}
@ -57,11 +57,10 @@ spec:
{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }} {{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }} {{- end }}
- name: OS_SERVICE_NAME - name: OS_SERVICE_NAME
value: {{ $osServiceName }} value: {{ tuple $osServiceType $envAll | include "helm-toolkit.keystone_endpoint_name_lookup" }}
- name: OS_SERVICE_TYPE - name: OS_SERVICE_TYPE
value: {{ tuple $osServiceName $envAll | include "helm-toolkit.endpoint_type_lookup" }} value: {{ $osServiceType }}
{{- end }} {{- end }}
volumes: volumes:
- name: ks-service-sh - name: ks-service-sh
configMap: configMap:

View File

@ -19,7 +19,7 @@ metadata:
type: Opaque type: Opaque
data: data:
OS_AUTH_URL: | OS_AUTH_URL: |
{{ .Values.keystone.auth_url | b64enc | indent 4 }} {{ tuple "identity" "admin" "admin" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }}
OS_REGION_NAME: | OS_REGION_NAME: |
{{ .Values.keystone.admin_region_name | b64enc | indent 4 }} {{ .Values.keystone.admin_region_name | b64enc | indent 4 }}
OS_PROJECT_DOMAIN_NAME: | OS_PROJECT_DOMAIN_NAME: |

View File

@ -18,6 +18,8 @@ metadata:
name: {{ .Values.keystone_secrets.stack }} name: {{ .Values.keystone_secrets.stack }}
type: Opaque type: Opaque
data: data:
OS_AUTH_URL: |
{{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }}
OS_REGION_NAME: | OS_REGION_NAME: |
{{ .Values.keystone.heat_stack_region_name | b64enc | indent 4 }} {{ .Values.keystone.heat_stack_region_name | b64enc | indent 4 }}
OS_DOMAIN_NAME: | OS_DOMAIN_NAME: |

View File

@ -19,7 +19,7 @@ metadata:
type: Opaque type: Opaque
data: data:
OS_AUTH_URL: | OS_AUTH_URL: |
{{ .Values.keystone.auth_url | b64enc | indent 4 }} {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }}
OS_REGION_NAME: | OS_REGION_NAME: |
{{ .Values.keystone.heat_trustee_region_name | b64enc | indent 4 }} {{ .Values.keystone.heat_trustee_region_name | b64enc | indent 4 }}
OS_PROJECT_DOMAIN_NAME: | OS_PROJECT_DOMAIN_NAME: |

View File

@ -19,7 +19,7 @@ metadata:
type: Opaque type: Opaque
data: data:
OS_AUTH_URL: | OS_AUTH_URL: |
{{ .Values.keystone.auth_url | b64enc | indent 4 }} {{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }}
OS_REGION_NAME: | OS_REGION_NAME: |
{{ .Values.keystone.heat_region_name | b64enc | indent 4 }} {{ .Values.keystone.heat_region_name | b64enc | indent 4 }}
OS_PROJECT_DOMAIN_NAME: | OS_PROJECT_DOMAIN_NAME: |

View File

@ -15,9 +15,9 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ .Values.service.api.name }} name: heat-api
spec: spec:
ports: ports:
- port: {{ .Values.service.api.port }} - port: {{ .Values.network.api.port }}
selector: selector:
app: heat-api app: heat-api

View File

@ -15,9 +15,9 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ .Values.service.cfn.name }} name: heat-cfn
spec: spec:
ports: ports:
- port: {{ .Values.service.cfn.port }} - port: {{ .Values.network.cfn.port }}
selector: selector:
app: heat-cfn app: heat-cfn

View File

@ -15,9 +15,9 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ .Values.service.cloudwatch.name }} name: heat-cloudwatch
spec: spec:
ports: ports:
- port: {{ .Values.service.cloudwatch.port }} - port: {{ .Values.network.cloudwatch.port }}
selector: selector:
app: heat-cloudwatch app: heat-cloudwatch

View File

@ -48,8 +48,6 @@ keystone_secrets:
stack: "heat-env-keystone-stack-user" stack: "heat-env-keystone-stack-user"
keystone: keystone:
auth_uri: "http://keystone-api:5000"
auth_url: "http://keystone-api:35357"
admin_user: "admin" admin_user: "admin"
admin_user_domain: "default" admin_user_domain: "default"
admin_password: "password" admin_password: "password"
@ -79,7 +77,7 @@ keystone:
heat_stack_password: "password" heat_stack_password: "password"
heat_stack_region_name: "RegionOne" heat_stack_region_name: "RegionOne"
service: network:
api: api:
name: "heat-api" name: "heat-api"
port: 8004 port: 8004
@ -176,33 +174,34 @@ dependencies:
# values, but should include all endpoints # values, but should include all endpoints
# required by this chart # required by this chart
endpoints: endpoints:
keystone: identity:
name: keystone
hosts: hosts:
default: keystone-api default: keystone-api
path: /v3 path: /v3
type: identity
scheme: 'http' scheme: 'http'
port: port:
admin: 35357 admin: 35357
public: 5000 api: 5000
heat: orchestration:
name: heat
hosts: hosts:
default: heat-api default: heat-api
path: '/v1/%(project_id)s' path: '/v1/%(project_id)s'
type: orchestration
scheme: 'http' scheme: 'http'
port: port:
api: 8004 api: 8004
heat_cfn: cloudformation:
name: heat-cfn
hosts: hosts:
default: heat-cfn default: heat-cfn
path: /v1 path: /v1
type: cloudformation
scheme: 'http' scheme: 'http'
port: port:
api: 8000 api: 8000
# Cloudwatch does not get an entry in the keystone service catalog # Cloudwatch does not get an entry in the keystone service catalog
heat_cloudwatch: cloudwatch:
name: heat-cloudwatch
hosts: hosts:
default: heat-cloudwatch default: heat-cloudwatch
path: null path: null