Senlin: remove oslo-genconfig

This PS removes the modified oslo-genconfig from senlin.

Partially implements: blueprint remove-pregenerated-config-templates

Change-Id: Icda8d14d648ab438e76ce5cb0b530c603b199713
This commit is contained in:
Pete Birley 2017-09-22 14:47:10 -05:00
parent f3e16dae18
commit 088cd9b9a6
6 changed files with 63 additions and 1734 deletions

View File

@ -17,51 +17,49 @@ limitations under the License.
{{- if .Values.manifests.configmap_etc }} {{- if .Values.manifests.configmap_etc }}
{{- $envAll := . }} {{- $envAll := . }}
{{- include "senlin.conf.senlin_values_skeleton" .Values.conf.senlin | trunc 0 -}} {{- if empty .Values.conf.senlin.keystone_authtoken.auth_uri -}}
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.senlin.keystone_authtoken "auth_uri" | quote | trunc 0 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}}
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "auth_uri" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
# FIXME(alanmeadows) fix for broken keystonemiddleware oslo config gen in newton - will remove in future # FIXME(alanmeadows) fix for broken keystonemiddleware oslo config gen in newton - will remove in future
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.auth_url -}} {{- if empty .Values.conf.senlin.keystone_authtoken.auth_url -}}
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "auth_url" | quote | trunc 0 -}} {{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.senlin.keystone_authtoken "auth_url" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
# Set a random string as secret key. # Set a random string as secret key.
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.memcache_secret_key -}} {{- if empty .Values.conf.senlin.keystone_authtoken.memcache_secret_key -}}
{{- randAlphaNum 64 | set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "memcache_secret_key" | quote | trunc 0 -}} {{- randAlphaNum 64 | set .Values.conf.senlin.keystone_authtoken "memcache_secret_key" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.region_name -}} {{- if empty .Values.conf.senlin.keystone_authtoken.region_name -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}} {{- set .Values.conf.senlin.keystone_authtoken "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.project_name -}} {{- if empty .Values.conf.senlin.keystone_authtoken.project_name -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}} {{- set .Values.conf.senlin.keystone_authtoken "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.project_domain_name -}} {{- if empty .Values.conf.senlin.keystone_authtoken.project_domain_name -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}} {{- set .Values.conf.senlin.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.user_domain_name -}} {{- if empty .Values.conf.senlin.keystone_authtoken.user_domain_name -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}} {{- set .Values.conf.senlin.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.username -}} {{- if empty .Values.conf.senlin.keystone_authtoken.username -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}} {{- set .Values.conf.senlin.keystone_authtoken "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.password -}} {{- if empty .Values.conf.senlin.keystone_authtoken.password -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}} {{- set .Values.conf.senlin.keystone_authtoken "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.memcached_servers -}} {{- if empty .Values.conf.senlin.keystone_authtoken.memcached_servers -}}
{{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "memcached_servers" | quote | trunc 0 -}} {{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.senlin.keystone_authtoken "memcached_servers" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.database.oslo.db.connection -}} {{- if empty .Values.conf.senlin.database.connection -}}
{{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.senlin.database.oslo.db "connection" | quote | trunc 0 -}} {{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.senlin.database "connection" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
{{- if empty .Values.conf.senlin.default.oslo.messaging.transport_url -}} {{- if empty .Values.conf.senlin.DEFAULT.transport_url -}}
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.senlin.default.oslo.messaging "transport_url" | quote | trunc 0 -}} {{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.senlin.DEFAULT "transport_url" | quote | trunc 0 -}}
{{- end -}} {{- end -}}
--- ---
@ -71,9 +69,9 @@ metadata:
name: senlin-etc name: senlin-etc
data: data:
senlin.conf: |+ senlin.conf: |+
{{- tuple .Values.conf.senlin "etc/_senlin.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }} {{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.senlin | indent 4 }}
api-paste.ini: |+ api-paste.ini: |+
{{- tuple .Values.conf.paste "etc/_api-paste.ini.tpl" . | include "helm-toolkit.utils.configmap_templater" }} {{ include "helm-toolkit.utils.to_ini" .Values.conf.paste | indent 4 }}
policy.json: |+ policy.json: |+
{{ toJson .Values.conf.policy | indent 4 }} {{ toJson .Values.conf.policy | indent 4 }}
{{- end }} {{- end }}

View File

@ -59,10 +59,10 @@ spec:
- /tmp/senlin-api.sh - /tmp/senlin-api.sh
- stop - stop
ports: ports:
- containerPort: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }} - containerPort: {{ .Values.conf.senlin.senlin_api.bind_port }}
readinessProbe: readinessProbe:
tcpSocket: tcpSocket:
port: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }} port: {{ .Values.conf.senlin.senlin_api.bind_port }}
volumeMounts: volumeMounts:
- name: senlin-bin - name: senlin-bin
mountPath: /tmp/senlin-api.sh mountPath: /tmp/senlin-api.sh

View File

@ -1,38 +0,0 @@
# senlin-api pipeline
[pipeline:senlin-api]
pipeline = request_id faultwrap ssl versionnegotiation webhook authtoken context trust apiv1app
[app:apiv1app]
paste.app_factory = senlin.api.common.wsgi:app_factory
senlin.app_factory = senlin.api.openstack.v1.router:API
# Middleware to set x-openstack-request-id in http response header
[filter:request_id]
paste.filter_factory = oslo_middleware.request_id:RequestId.factory
[filter:faultwrap]
paste.filter_factory = senlin.api.common.wsgi:filter_factory
senlin.filter_factory = senlin.api.middleware:fault_filter
[filter:context]
paste.filter_factory = senlin.api.common.wsgi:filter_factory
senlin.filter_factory = senlin.api.middleware:context_filter
[filter:ssl]
paste.filter_factory = oslo_middleware.ssl:SSLMiddleware.factory
[filter:versionnegotiation]
paste.filter_factory = senlin.api.common.wsgi:filter_factory
senlin.filter_factory = senlin.api.middleware:version_filter
[filter:trust]
paste.filter_factory = senlin.api.common.wsgi:filter_factory
senlin.filter_factory = senlin.api.middleware:trust_filter
[filter:webhook]
paste.filter_factory = senlin.api.common.wsgi:filter_factory
senlin.filter_factory = senlin.api.middleware:webhook_filter
# Auth middleware that validates token against keystone
[filter:authtoken]
paste.filter_factory = keystonemiddleware.auth_token:filter_factory

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,7 @@ metadata:
spec: spec:
ports: ports:
- name: s-api - name: s-api
port: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }} port: {{ .Values.conf.senlin.senlin_api.bind_port }}
{{ 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 }}

View File

@ -37,8 +37,32 @@ images:
conf: conf:
paste: paste:
override: pipeline:senlin-api:
append: pipeline: request_id faultwrap ssl versionnegotiation webhook authtoken context trust apiv1app
app:apiv1app:
paste.app_factory: senlin.api.common.wsgi:app_factory
senlin.app_factory: senlin.api.openstack.v1.router:API
filter:request_id:
paste.filter_factory: oslo_middleware.request_id:RequestId.factory
filter:faultwrap:
paste.filter_factory: senlin.api.common.wsgi:filter_factory
senlin.filter_factory: senlin.api.middleware:fault_filter
filter:context:
paste.filter_factory: senlin.api.common.wsgi:filter_factory
senlin.filter_factory: senlin.api.middleware:context_filter
filter:ssl:
paste.filter_factory: oslo_middleware.ssl:SSLMiddleware.factory
filter:versionnegotiation:
paste.filter_factory: senlin.api.common.wsgi:filter_factory
senlin.filter_factory: senlin.api.middleware:version_filter
filter:trust:
paste.filter_factory: senlin.api.common.wsgi:filter_factory
senlin.filter_factory: senlin.api.middleware:trust_filter
filter:webhook:
paste.filter_factory: senlin.api.common.wsgi:filter_factory
senlin.filter_factory: senlin.api.middleware:webhook_filter
filter:authtoken:
paste.filter_factory: keystonemiddleware.auth_token:filter_factory
policy: policy:
context_is_admin: role:admin context_is_admin: role:admin
deny_everybody: "!" deny_everybody: "!"
@ -87,18 +111,16 @@ conf:
events:get: '' events:get: ''
webhooks:trigger: '' webhooks:trigger: ''
senlin: senlin:
override: DEFAULT:
append: transport_url: null
database:
max_retries: -1
keystone_authtoken: keystone_authtoken:
keystonemiddleware: auth_type: password
auth_token: auth_version: v3
auth_type: password memcache_security_strategy: ENCRYPT
auth_version: v3
memcache_security_strategy: ENCRYPT
senlin_api: senlin_api:
senlin: bind_port: 8778
config:
bind_port: 8778
network: network:
api: api: