Magnum: remove oslo-genconfig
This PS removes the modified oslo-genconfig from magnum. Partially implements: blueprint remove-pregenerated-config-templates Change-Id: Idbe946d431854adf83e689594d4d64dc602f8323
This commit is contained in:
parent
9e117ce95b
commit
f6d3d0fdbb
@ -17,51 +17,48 @@ limitations under the License.
|
||||
{{- if .Values.manifests.configmap_etc }}
|
||||
{{- $envAll := . }}
|
||||
|
||||
{{- include "magnum.conf.magnum_values_skeleton" .Values.conf.magnum | trunc 0 -}}
|
||||
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.auth_uri -}}
|
||||
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "auth_uri" | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.auth_uri -}}
|
||||
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.magnum.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.magnum.keystone_authtoken.keystonemiddleware.auth_token.auth_url -}}
|
||||
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "auth_url" | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.auth_url -}}
|
||||
{{- tuple "identity" "internal" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup"| set .Values.conf.magnum.keystone_authtoken "auth_url" | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
# Set a random string as secret key.
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.memcache_secret_key -}}
|
||||
{{- randAlphaNum 64 | set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "memcache_secret_key" | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.memcache_secret_key -}}
|
||||
{{- randAlphaNum 64 | set .Values.conf.magnum.keystone_authtoken "memcache_secret_key" | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.region_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.region_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken "region_name" .Values.endpoints.identity.auth.user.region_name | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.project_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.project_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken "project_name" .Values.endpoints.identity.auth.user.project_name | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.project_domain_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.project_domain_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken "project_domain_name" .Values.endpoints.identity.auth.user.project_domain_name | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.user_domain_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.user_domain_name -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken "user_domain_name" .Values.endpoints.identity.auth.user.user_domain_name | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.username -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.username -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken "username" .Values.endpoints.identity.auth.user.username | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token.password -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken.keystonemiddleware.auth_token "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.password -}}
|
||||
{{- set .Values.conf.magnum.keystone_authtoken "password" .Values.endpoints.identity.auth.user.password | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if empty .Values.conf.magnum.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.magnum.keystone_authtoken.keystonemiddleware.auth_token "memcached_servers" | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.keystone_authtoken.memcached_servers -}}
|
||||
{{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.endpoints.host_and_port_endpoint_uri_lookup" | set .Values.conf.magnum.keystone_authtoken "memcached_servers" | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if empty .Values.conf.magnum.database.oslo.db.connection -}}
|
||||
{{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.magnum.database.oslo.db "connection" | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.database.connection -}}
|
||||
{{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup"| set .Values.conf.magnum.database "connection" | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if empty .Values.conf.magnum.default.oslo.messaging.transport_url -}}
|
||||
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.magnum.default.oslo.messaging "transport_url" | quote | trunc 0 -}}
|
||||
{{- if empty .Values.conf.magnum.DEFAULT.transport_url -}}
|
||||
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | set .Values.conf.magnum.DEFAULT "transport_url" | quote | trunc 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
---
|
||||
@ -71,9 +68,9 @@ metadata:
|
||||
name: magnum-etc
|
||||
data:
|
||||
magnum.conf: |+
|
||||
{{- tuple .Values.conf.magnum "etc/_magnum.conf.tpl" . | include "helm-toolkit.utils.configmap_templater" }}
|
||||
{{ include "helm-toolkit.utils.to_oslo_conf" .Values.conf.magnum | 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 }}
|
||||
{{ toJson .Values.conf.policy | indent 4 }}
|
||||
{{- end }}
|
||||
|
@ -59,10 +59,10 @@ spec:
|
||||
- /tmp/magnum-api.sh
|
||||
- stop
|
||||
ports:
|
||||
- containerPort: {{ .Values.conf.magnum.api.magnum.port }}
|
||||
- containerPort: {{ .Values.conf.magnum.api.port }}
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: {{ .Values.conf.magnum.api.magnum.port }}
|
||||
port: {{ .Values.conf.magnum.api.port }}
|
||||
volumeMounts:
|
||||
- name: magnum-bin
|
||||
mountPath: /tmp/magnum-api.sh
|
||||
|
@ -1,21 +0,0 @@
|
||||
[pipeline:main]
|
||||
pipeline = cors healthcheck request_id authtoken api_v1
|
||||
|
||||
[app:api_v1]
|
||||
paste.app_factory = magnum.api.app:app_factory
|
||||
|
||||
[filter:authtoken]
|
||||
acl_public_routes = /, /v1
|
||||
paste.filter_factory = magnum.api.middleware.auth_token:AuthTokenMiddleware.factory
|
||||
|
||||
[filter:request_id]
|
||||
paste.filter_factory = oslo_middleware:RequestId.factory
|
||||
|
||||
[filter:cors]
|
||||
paste.filter_factory = oslo_middleware.cors:filter_factory
|
||||
oslo_config_project = magnum
|
||||
|
||||
[filter:healthcheck]
|
||||
paste.filter_factory = oslo_middleware:Healthcheck.factory
|
||||
backends = disable_by_file
|
||||
disable_by_file_path = /etc/magnum/healthcheck_disable
|
File diff suppressed because it is too large
Load Diff
@ -24,7 +24,7 @@ metadata:
|
||||
spec:
|
||||
ports:
|
||||
- name: m-api
|
||||
port: {{ .Values.conf.magnum.api.magnum.port }}
|
||||
port: {{ .Values.conf.magnum.api.port }}
|
||||
{{ if .Values.network.api.node_port.enabled }}
|
||||
nodePort: {{ .Values.network.api.node_port.port }}
|
||||
{{ end }}
|
||||
|
@ -37,8 +37,22 @@ images:
|
||||
|
||||
conf:
|
||||
paste:
|
||||
override:
|
||||
append:
|
||||
pipeline:main:
|
||||
pipeline: cors healthcheck request_id authtoken api_v1
|
||||
app:api_v1:
|
||||
paste.app_factory: magnum.api.app:app_factory
|
||||
filter:authtoken:
|
||||
acl_public_routes: /, /v1
|
||||
paste.filter_factory: magnum.api.middleware.auth_token:AuthTokenMiddleware.factory
|
||||
filter:request_id:
|
||||
paste.filter_factory: oslo_middleware:RequestId.factory
|
||||
filter:cors:
|
||||
paste.filter_factory: oslo_middleware.cors:filter_factory
|
||||
oslo_config_project: magnum
|
||||
filter:healthcheck:
|
||||
paste.filter_factory: oslo_middleware:Healthcheck.factory
|
||||
backends: disable_by_file
|
||||
disable_by_file_path: /etc/magnum/healthcheck_disable
|
||||
policy:
|
||||
context_is_admin: role:admin
|
||||
admin_or_owner: is_admin:True or project_id:%(project_id)s
|
||||
@ -83,18 +97,17 @@ conf:
|
||||
certificate:get: rule:admin_or_user or rule:cluster_user
|
||||
magnum-service:get_all: rule:admin_api
|
||||
magnum:
|
||||
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
|
||||
api:
|
||||
magnum:
|
||||
port: 9511
|
||||
host: 0.0.0.0
|
||||
port: 9511
|
||||
host: 0.0.0.0
|
||||
|
||||
network:
|
||||
api:
|
||||
|
Loading…
Reference in New Issue
Block a user