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 }}
{{- $envAll := . }}
{{- include "senlin.conf.senlin_values_skeleton" .Values.conf.senlin | 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 -}}
{{- 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 -}}
{{- end -}}
# 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 -}}
{{- 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 -}}
{{- 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 "auth_url" | quote | trunc 0 -}}
{{- end -}}
# Set a random string as secret key.
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.memcache_secret_key -}}
{{- randAlphaNum 64 | set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "memcache_secret_key" | quote | trunc 0 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.memcache_secret_key -}}
{{- randAlphaNum 64 | set .Values.conf.senlin.keystone_authtoken "memcache_secret_key" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.region_name -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.region_name -}}
{{- set .Values.conf.senlin.keystone_authtoken "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.project_name -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.project_name -}}
{{- set .Values.conf.senlin.keystone_authtoken "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.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 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.project_domain_name -}}
{{- set .Values.conf.senlin.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.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 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.user_domain_name -}}
{{- set .Values.conf.senlin.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.username -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.username -}}
{{- set .Values.conf.senlin.keystone_authtoken "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.password -}}
{{- set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.password -}}
{{- set .Values.conf.senlin.keystone_authtoken "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.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 -}}
{{- 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 "memcached_servers" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.database.oslo.db.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 -}}
{{- 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 "connection" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.default.oslo.messaging.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 -}}
{{- 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 "transport_url" | quote | trunc 0 -}}
{{- end -}}
---
@ -71,9 +69,9 @@ metadata:
name: senlin-etc
data:
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: |+
{{- 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: |+
{{ toJson .Values.conf.policy | indent 4 }}
{{- end }}

View File

@ -59,10 +59,10 @@ spec:
- /tmp/senlin-api.sh
- stop
ports:
- containerPort: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }}
- containerPort: {{ .Values.conf.senlin.senlin_api.bind_port }}
readinessProbe:
tcpSocket:
port: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }}
port: {{ .Values.conf.senlin.senlin_api.bind_port }}
volumeMounts:
- name: senlin-bin
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:
ports:
- 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 }}
nodePort: {{ .Values.network.api.node_port.port }}
{{ end }}

View File

@ -37,8 +37,32 @@ images:
conf:
paste:
override:
append:
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
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:
context_is_admin: role:admin
deny_everybody: "!"
@ -87,18 +111,16 @@ conf:
events:get: ''
webhooks:trigger: ''
senlin:
override:
append:
DEFAULT:
transport_url: null
database:
max_retries: -1
keystone_authtoken:
keystonemiddleware:
auth_token:
auth_type: password
auth_version: v3
memcache_security_strategy: ENCRYPT
auth_type: password
auth_version: v3
memcache_security_strategy: ENCRYPT
senlin_api:
senlin:
config:
bind_port: 8778
bind_port: 8778
network:
api: