This PS adds a Senlin Chart

Change-Id: Ibc831098a36861141a30bf2c9c03877ba32c6626
This commit is contained in:
Pete Birley 2017-04-20 20:57:24 -05:00
parent ffc9e6617f
commit b69e36e706
23 changed files with 2834 additions and 3 deletions

View File

@ -12,15 +12,15 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
.PHONY: ceph bootstrap mariadb etcd keystone memcached rabbitmq helm-toolkit mistral neutron nova cinder heat ingress all clean .PHONY: ceph bootstrap mariadb etcd keystone memcached rabbitmq helm-toolkit mistral neutron nova cinder heat senlin ingress all clean
B64_DIRS := helm-toolkit/secrets B64_DIRS := helm-toolkit/secrets
B64_EXCLUDE := $(wildcard helm-toolkit/secrets/*.b64) B64_EXCLUDE := $(wildcard helm-toolkit/secrets/*.b64)
CHARTS := ceph mariadb etcd rabbitmq memcached keystone glance horizon mistral neutron nova cinder heat ingress CHARTS := ceph mariadb etcd rabbitmq memcached keystone glance horizon mistral neutron nova cinder heat senlin ingress
TOOLKIT_TPL := helm-toolkit/templates/_globals.tpl TOOLKIT_TPL := helm-toolkit/templates/_globals.tpl
all: helm-toolkit ceph bootstrap mariadb etcd rabbitmq memcached keystone glance horizon mistral neutron nova cinder heat ingress all: helm-toolkit ceph bootstrap mariadb etcd rabbitmq memcached keystone glance horizon mistral neutron nova cinder heat senlin ingress
helm-toolkit: build-helm-toolkit helm-toolkit: build-helm-toolkit
@ -51,6 +51,8 @@ nova: build-nova
heat: build-heat heat: build-heat
senlin: build-senlin
memcached: build-memcached memcached: build-memcached
ingress: build-ingress ingress: build-ingress

24
senlin/Chart.yaml Normal file
View File

@ -0,0 +1,24 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
description: OpenStack-Helm Senlin
name: senlin
version: 0.1.0
home: https://docs.openstack.org/developer/senlin
sources:
- https://git.openstack.org/cgit/openstack/senlin
- https://git.openstack.org/cgit/openstack/openstack-helm
maintainers:
- name: OpenStack-Helm Authors

18
senlin/requirements.yaml Normal file
View File

@ -0,0 +1,18 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
dependencies:
- name: helm-toolkit
repository: http://localhost:8879/charts
version: 0.1.0

View File

@ -0,0 +1,19 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex
senlin-manage db_sync

View File

@ -0,0 +1,19 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -x
exec senlin-api \
--config-file /etc/senlin/senlin.conf

View File

@ -0,0 +1,19 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -x
exec senlin-engine \
--config-file /etc/senlin/senlin.conf

View File

@ -0,0 +1,35 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: ConfigMap
metadata:
name: senlin-bin
data:
db-init.py: |
{{- include "helm-toolkit.db_init" . | indent 4 }}
db-sync.sh: |
{{ tuple "bin/_db-sync.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}
ks-service.sh: |+
{{- include "helm-toolkit.keystone_service" . | indent 4 }}
ks-endpoints.sh: |+
{{- include "helm-toolkit.keystone_endpoints" . | indent 4 }}
ks-user.sh: |+
{{- include "helm-toolkit.keystone_user" . | indent 4 }}
ks-domain-user.sh: |+
{{- include "helm-toolkit.keystone_domain_user" . | indent 4 }}
senlin-api.sh: |
{{ tuple "bin/_senlin-api.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}
senlin-engine.sh: |
{{ tuple "bin/_senlin-engine.sh.tpl" . | include "helm-toolkit.template" | indent 4 }}

View File

@ -0,0 +1,72 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- 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.keystone_endpoint_uri_lookup"| set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "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.keystone_endpoint_uri_lookup"| set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "auth_url" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.memcached_servers -}}
{{- tuple "oslo_cache" "internal" "memcache" . | include "helm-toolkit.hostname_endpoint_uri_lookup" | set .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token "memcached_servers" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.database.oslo.db.connection -}}
{{- tuple "oslo_db" "internal" "user" "mysql" . | include "helm-toolkit.authenticated_endpoint_uri_lookup"| set .Values.conf.senlin.database.oslo.db "connection" | quote | trunc 0 -}}
{{- end -}}
{{- if empty .Values.conf.senlin.default.oslo.messaging.transport_url -}}
{{- tuple "oslo_messaging" "internal" "user" "amqp" . | include "helm-toolkit.authenticated_endpoint_uri_lookup" | set .Values.conf.senlin.default.oslo.messaging "transport_url" | quote | trunc 0 -}}
{{- end -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: senlin-etc
data:
senlin.conf: |+
{{ if .Values.conf.senlin.override -}}
{{ .Values.conf.senlin.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.senlin.prefix -}}
{{ .Values.conf.senlin.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_senlin.conf.tpl" . | include "helm-toolkit.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.senlin.append -}}
{{ .Values.conf.senlin.append | indent 4 }}
{{- end }}
api-paste.ini: |+
{{ if .Values.conf.paste.override -}}
{{ .Values.conf.paste.override | indent 4 }}
{{- else -}}
{{- if .Values.conf.paste.prefix -}}
{{ .Values.conf.paste.prefix | indent 4 }}
{{- end }}
{{ tuple "etc/_api-paste.ini.tpl" . | include "helm-toolkit.template" | indent 4 }}
{{- end }}
{{- if .Values.conf.paste.append -}}
{{ .Values.conf.paste.append | indent 4 }}
{{- end }}
policy.json: |+
{{ if .Values.conf.policy.override -}}
{{ .Values.conf.policy.override | indent 4 }}
{{- else -}}
{{ tuple "etc/_policy.json.tpl" . | include "helm-toolkit.template" | indent 4 }}
{{- end }}

View File

@ -0,0 +1,98 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.api }}
{{- $mounts_senlin_api := .Values.mounts.senlin_api.senlin_api }}
{{- $mounts_senlin_api_init := .Values.mounts.senlin_api.init_container }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: senlin-api
spec:
replicas: {{ .Values.replicas.api }}
revisionHistoryLimit: {{ .Values.upgrades.revision_history }}
strategy:
type: {{ .Values.upgrades.pod_replacement_strategy }}
{{ if eq .Values.upgrades.pod_replacement_strategy "RollingUpdate" }}
rollingUpdate:
maxUnavailable: {{ .Values.upgrades.rolling_update.max_unavailable }}
maxSurge: {{ .Values.upgrades.rolling_update.max_surge }}
{{ end }}
template:
metadata:
labels:
app: senlin-api
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies $mounts_senlin_api_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: senlin-api
image: {{ .Values.images.api }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
requests:
memory: {{ .Values.resources.senlin_api.requests.memory | quote }}
cpu: {{ .Values.resources.senlin_api.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.senlin_api.limits.memory | quote }}
cpu: {{ .Values.resources.senlin_api.limits.cpu | quote }}
{{- end }}
ports:
- containerPort: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }}
readinessProbe:
tcpSocket:
port: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }}
command:
- bash
- /tmp/senlin-api.sh
volumeMounts:
- name: senlin-bin
mountPath: /tmp/senlin-api.sh
subPath: senlin-api.sh
readOnly: true
- name: pod-etc-senlin
mountPath: /etc/senlin
- name: pod-var-cache-senlin
mountPath: /var/cache/senlin
- name: senlin-etc
mountPath: /etc/senlin/senlin.conf
subPath: senlin.conf
readOnly: true
- name: senlin-etc
mountPath: /etc/senlin/api-paste.ini
subPath: api-paste.ini
readOnly: true
- name: senlin-etc
mountPath: /etc/senlin/policy.json
subPath: policy.json
readOnly: true
{{ if $mounts_senlin_api.volumeMounts }}{{ toYaml $mounts_senlin_api.volumeMounts | indent 12 }}{{ end }}
volumes:
- name: pod-etc-senlin
emptyDir: {}
- name: pod-var-cache-senlin
emptyDir: {}
- name: senlin-bin
configMap:
name: senlin-bin
- name: senlin-etc
configMap:
name: senlin-etc
{{ if $mounts_senlin_api.volumes }}{{ toYaml $mounts_senlin_api.volumes | indent 8 }}{{ end }}

View File

@ -0,0 +1,38 @@
# 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

View File

@ -0,0 +1,49 @@
{
"context_is_admin": "role:admin",
"deny_everybody": "!",
"build_info:build_info": "",
"profile_types:index": "",
"profile_types:get": "",
"policy_types:index": "",
"policy_types:get": "",
"clusters:index": "",
"clusters:create": "",
"clusters:delete": "",
"clusters:get": "",
"clusters:action": "",
"clusters:update": "",
"clusters:collect": "",
"profiles:index": "",
"profiles:create": "",
"profiles:get": "",
"profiles:delete": "",
"profiles:update": "",
"profiles:validate": "",
"nodes:index": "",
"nodes:create": "",
"nodes:get": "",
"nodes:action": "",
"nodes:update": "",
"nodes:delete": "",
"policies:index": "",
"policies:create": "",
"policies:get": "",
"policies:update": "",
"policies:delete": "",
"policies:validate": "",
"cluster_policies:index": "",
"cluster_policies:attach": "",
"cluster_policies:detach": "",
"cluster_policies:update": "",
"cluster_policies:get": "",
"receivers:index": "",
"receivers:create": "",
"receivers:get": "",
"receivers:delete": "",
"actions:index": "",
"actions:get": "",
"events:index": "",
"events:get": "",
"webhooks:trigger": ""
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,79 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.init }}
apiVersion: batch/v1
kind: Job
metadata:
name: senlin-db-init
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: senlin-db-init
image: {{ .Values.images.db_init | quote }}
imagePullPolicy: {{ .Values.images.pull_policy | quote }}
{{- if .Values.resources.enabled }}
resources:
requests:
memory: {{ .Values.resources.senlin_db_init.requests.memory | quote }}
cpu: {{ .Values.resources.senlin_db_init.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.senlin_db_init.limits.memory | quote }}
cpu: {{ .Values.resources.senlin_db_init.limits.cpu | quote }}
{{- end }}
env:
- name: ROOT_DB_CONNECTION
valueFrom:
secretKeyRef:
name: senlin-db-root
key: DB_CONNECTION
- name: OPENSTACK_CONFIG_FILE
value: /etc/senlin/senlin.conf
- name: OPENSTACK_CONFIG_DB_SECTION
value: database
- name: OPENSTACK_CONFIG_DB_KEY
value: connection
command:
- python
- /tmp/db-init.py
volumeMounts:
- name: senlin-bin
mountPath: /tmp/db-init.py
subPath: db-init.py
readOnly: true
- name: etcsenlin
mountPath: /etc/senlin
- name: senlin-etc
mountPath: /etc/senlin/senlin.conf
subPath: senlin.conf
readOnly: true
volumes:
- name: etcsenlin
emptyDir: {}
- name: senlin-etc
configMap:
name: senlin-etc
- name: senlin-bin
configMap:
name: senlin-bin

View File

@ -0,0 +1,67 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.db_sync }}
apiVersion: batch/v1
kind: Job
metadata:
name: senlin-db-sync
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: senlin-db-sync
image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
requests:
memory: {{ .Values.resources.senlin_db_sync.requests.memory | quote }}
cpu: {{ .Values.resources.senlin_db_sync.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.senlin_db_sync.limits.memory | quote }}
cpu: {{ .Values.resources.senlin_db_sync.limits.cpu | quote }}
{{- end }}
command:
- bash
- /tmp/db-sync.sh
volumeMounts:
- name: senlin-bin
mountPath: /tmp/db-sync.sh
subPath: db-sync.sh
readOnly: true
- name: etcsenlin
mountPath: /etc/senlin
- name: senlin-etc
mountPath: /etc/senlin/senlin.conf
subPath: senlin.conf
readOnly: true
volumes:
- name: etcsenlin
emptyDir: {}
- name: senlin-etc
configMap:
name: senlin-etc
- name: senlin-bin
configMap:
name: senlin-bin

View File

@ -0,0 +1,73 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $ksAdminSecret := .Values.keystone_secrets.admin }}
{{- $dependencies := .Values.dependencies.ks_endpoints }}
apiVersion: batch/v1
kind: Job
metadata:
name: senlin-ks-endpoints
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
{{- range $key1, $osServiceType := tuple "clustering" }}
{{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }}
- name: {{ $osServiceType }}-ks-endpoints-{{ $osServiceEndPoint }}
image: {{ $envAll.Values.images.ks_endpoints }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }}
resources:
requests:
memory: {{ $envAll.Values.resources.senlin_ks_endpoints.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.senlin_ks_endpoints.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.senlin_ks_endpoints.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.senlin_ks_endpoints.limits.cpu | quote }}
{{- end }}
command:
- bash
- /tmp/ks-endpoints.sh
volumeMounts:
- name: ks-endpoints-sh
mountPath: /tmp/ks-endpoints.sh
subPath: ks-endpoints.sh
readOnly: true
env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
- name: OS_SVC_ENDPOINT
value: {{ $osServiceEndPoint }}
- name: OS_SERVICE_NAME
value: {{ tuple $osServiceType $envAll | include "helm-toolkit.keystone_endpoint_name_lookup" }}
- name: OS_SERVICE_TYPE
value: {{ $osServiceType }}
- name: OS_SERVICE_ENDPOINT
value: {{ tuple $osServiceType $osServiceEndPoint "api" $envAll | include "helm-toolkit.keystone_endpoint_uri_lookup" }}
{{- end }}
{{- end }}
volumes:
- name: ks-endpoints-sh
configMap:
name: senlin-bin

View File

@ -0,0 +1,67 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $ksAdminSecret := .Values.keystone_secrets.admin }}
{{- $dependencies := .Values.dependencies.ks_service }}
apiVersion: batch/v1
kind: Job
metadata:
name: senlin-ks-service
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
{{- range $key1, $osServiceType := tuple "clustering" }}
- name: {{ $osServiceType }}-ks-service-registration
image: {{ $envAll.Values.images.ks_service }}
imagePullPolicy: {{ $envAll.Values.images.pull_policy }}
{{- if $envAll.Values.resources.enabled }}
resources:
requests:
memory: {{ $envAll.Values.resources.senlin_ks_service.requests.memory | quote }}
cpu: {{ $envAll.Values.resources.senlin_ks_service.requests.cpu | quote }}
limits:
memory: {{ $envAll.Values.resources.senlin_ks_service.limits.memory | quote }}
cpu: {{ $envAll.Values.resources.senlin_ks_service.limits.cpu | quote }}
{{- end }}
command:
- bash
- /tmp/ks-service.sh
volumeMounts:
- name: ks-service-sh
mountPath: /tmp/ks-service.sh
subPath: ks-service.sh
readOnly: true
env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
- name: OS_SERVICE_NAME
value: {{ tuple $osServiceType $envAll | include "helm-toolkit.keystone_endpoint_name_lookup" }}
- name: OS_SERVICE_TYPE
value: {{ $osServiceType }}
{{- end }}
volumes:
- name: ks-service-sh
configMap:
name: senlin-bin

View File

@ -0,0 +1,69 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $ksAdminSecret := .Values.keystone.admin_secret | default "senlin-env-keystone-admin" }}
{{- $ksUserSecret := .Values.keystone.user_secret | default "senlin-env-keystone-user" }}
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.ks_user }}
apiVersion: batch/v1
kind: Job
metadata:
name: senlin-ks-user
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies "[]" | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: senlin-ks-user
image: {{ .Values.images.ks_user }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
requests:
memory: {{ .Values.resources.senlin_ks_user.requests.memory | quote }}
cpu: {{ .Values.resources.senlin_ks_user.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.senlin_ks_user.limits.memory | quote }}
cpu: {{ .Values.resources.senlin_ks_user.limits.cpu | quote }}
{{- end }}
command:
- bash
- /tmp/ks-user.sh
volumeMounts:
- name: ks-user-sh
mountPath: /tmp/ks-user.sh
subPath: ks-user.sh
readOnly: true
env:
{{- with $env := dict "ksUserSecret" $ksAdminSecret }}
{{- include "helm-toolkit.keystone_openrc_env_vars" $env | indent 12 }}
{{- end }}
- name: SERVICE_OS_SERVICE_NAME
value: "senlin"
{{- with $env := dict "ksUserSecret" $ksUserSecret }}
{{- include "helm-toolkit.keystone_user_create_env_vars" $env | indent 12 }}
{{- end }}
- name: SERVICE_OS_ROLE
value: {{ .Values.keystone.senlin_user_role | quote }}
volumes:
- name: ks-user-sh
configMap:
name: senlin-bin

View File

@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: senlin-db-root
type: Opaque
data:
DB_CONNECTION: {{ tuple "oslo_db" "internal" "admin" "mysql" . | include "helm-toolkit.authenticated_endpoint_uri_lookup" | b64enc }}

View File

@ -0,0 +1,34 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.keystone_secrets.admin }}
type: Opaque
data:
OS_AUTH_URL: |
{{ tuple "identity" "admin" "admin" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }}
OS_REGION_NAME: |
{{ .Values.keystone.admin_region_name | b64enc | indent 4 }}
OS_PROJECT_DOMAIN_NAME: |
{{ .Values.keystone.admin_project_domain | b64enc | indent 4 }}
OS_PROJECT_NAME: |
{{ .Values.keystone.admin_project_name | b64enc | indent 4 }}
OS_USER_DOMAIN_NAME: |
{{ .Values.keystone.admin_user_domain | b64enc | indent 4 }}
OS_USERNAME: |
{{ .Values.keystone.admin_user | b64enc | indent 4 }}
OS_PASSWORD: |
{{ .Values.keystone.admin_password | b64enc | indent 4 }}

View File

@ -0,0 +1,34 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.keystone_secrets.user }}
type: Opaque
data:
OS_AUTH_URL: |
{{ tuple "identity" "internal" "api" . | include "helm-toolkit.keystone_endpoint_uri_lookup" | b64enc | indent 4 }}
OS_REGION_NAME: |
{{ .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.region_name | b64enc | indent 4 }}
OS_PROJECT_DOMAIN_NAME: |
{{ .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.project_domain_name | b64enc | indent 4 }}
OS_PROJECT_NAME: |
{{ .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.project_name | b64enc | indent 4 }}
OS_USER_DOMAIN_NAME: |
{{ .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.user_domain_name | b64enc | indent 4 }}
OS_USERNAME: |
{{ .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.username | b64enc | indent 4 }}
OS_PASSWORD: |
{{ .Values.conf.senlin.keystone_authtoken.keystonemiddleware.auth_token.password | b64enc | indent 4 }}

View File

@ -0,0 +1,29 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: senlin-api
spec:
ports:
- port: {{ .Values.conf.senlin.senlin_api.senlin.config.bind_port }}
{{ if .Values.network.api.node_port.enabled }}
nodePort: {{ .Values.network.api.node_port.port }}
{{ end }}
selector:
app: senlin-api
{{ if .Values.network.api.node_port.enabled }}
type: NodePort
{{ end }}

View File

@ -0,0 +1,82 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.engine }}
{{- $mounts_senlin_engine := .Values.mounts.senlin_engine.senlin_engine }}
{{- $mounts_senlin_engine_init := .Values.mounts.senlin_engine.init_container }}
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: senlin-engine
spec:
serviceName: senlin-engine
replicas: {{ .Values.replicas.engine }}
template:
metadata:
labels:
app: senlin-engine
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies $mounts_senlin_engine_init | include "helm-toolkit.kubernetes_entrypoint_init_container" | indent 10 }}
]'
spec:
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
containers:
- name: senlin-engine
image: {{ .Values.images.engine }}
imagePullPolicy: {{ .Values.images.pull_policy }}
{{- if .Values.resources.enabled }}
resources:
requests:
memory: {{ .Values.resources.senlin_engine.requests.memory | quote }}
cpu: {{ .Values.resources.senlin_engine.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.senlin_engine.limits.memory | quote }}
cpu: {{ .Values.resources.senlin_engine.limits.cpu | quote }}
{{- end }}
command:
- bash
- /tmp/senlin-engine.sh
volumeMounts:
- name: senlin-bin
mountPath: /tmp/senlin-engine.sh
subPath: senlin-engine.sh
readOnly: true
- name: pod-etc-senlin
mountPath: /etc/senlin
- name: pod-var-cache-senlin
mountPath: /var/cache/senlin
- name: senlin-etc
mountPath: /etc/senlin/senlin.conf
subPath: senlin.conf
readOnly: true
- name: senlin-etc
mountPath: /etc/senlin/policy.json
subPath: policy.json
readOnly: true
{{ if $mounts_senlin_engine.volumeMounts }}{{ toYaml $mounts_senlin_engine.volumeMounts | indent 12 }}{{ end }}
volumes:
- name: pod-etc-senlin
emptyDir: {}
- name: pod-var-cache-senlin
emptyDir: {}
- name: senlin-bin
configMap:
name: senlin-bin
- name: senlin-etc
configMap:
name: senlin-etc
{{ if $mounts_senlin_engine.volumes }}{{ toYaml $mounts_senlin_engine.volumes | indent 8 }}{{ end }}

248
senlin/values.yaml Normal file
View File

@ -0,0 +1,248 @@
# Copyright 2017 The Openstack-Helm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Default values for keystone.
# This is a YAML-formatted file.
# Declare name/value pairs to be passed into your templates.
# name: value
replicas:
api: 1
engine: 1
labels:
node_selector_key: openstack-control-plane
node_selector_value: enabled
images:
db_init: docker.io/kolla/ubuntu-source-senlin-api:3.0.3
db_sync: docker.io/kolla/ubuntu-source-senlin-api:3.0.3
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
ks_service: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
ks_endpoints: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
api: docker.io/kolla/ubuntu-source-senlin-api:3.0.3
engine: docker.io/kolla/ubuntu-source-senlin-engine:3.0.3
dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0
pull_policy: "IfNotPresent"
upgrades:
revision_history: 3
pod_replacement_strategy: RollingUpdate
rolling_update:
max_unavailable: 1
max_surge: 3
keystone_secrets:
admin: "senlin-env-keystone-admin"
user: "senlin-env-keystone-user"
keystone:
admin_user: "admin"
admin_user_domain: "default"
admin_password: "password"
admin_project_name: "admin"
admin_project_domain: "default"
admin_region_name: "RegionOne"
senlin_user_role: "admin"
conf:
paste:
override:
append:
policy:
override:
append:
senlin:
override:
append:
keystone_authtoken:
keystonemiddleware:
auth_token:
auth_type: password
auth_version: v3
region_name: RegionOne
project_domain_name: default
project_name: service
user_domain_name: default
username: senlin
password: password
senlin_api:
senlin:
config:
bind_port: 8778
network:
api:
name: "senlin-api"
proto: "http"
node_port:
enabled: false
port: 30778
dependencies:
db_init:
jobs:
- mariadb-seed
service:
- mariadb
db_sync:
jobs:
- senlin-db-init
service:
- mariadb
ks_user:
service:
- keystone-api
ks_service:
service:
- keystone-api
ks_endpoints:
jobs:
- senlin-ks-service
service:
- keystone-api
api:
jobs:
- senlin-db-sync
- senlin-ks-user
- senlin-ks-endpoints
service:
- keystone-api
- mariadb
engine:
jobs:
- senlin-db-sync
- senlin-ks-user
- senlin-ks-endpoints
service:
- keystone-api
- mariadb
# typically overriden by environmental
# values, but should include all endpoints
# required by this chart
endpoints:
identity:
name: keystone
hosts:
default: keystone-api
path: /v3
scheme: 'http'
port:
admin: 35357
api: 5000
clustering:
name: senlin
hosts:
default: senlin-api
path: null
scheme: 'http'
port:
api: 8778
oslo_db:
auth:
admin:
username: root
password: password
user:
username: senlin
password: password
hosts:
default: mariadb
path: /senlin
scheme: mysql+pymysql
port:
mysql: 3306
oslo_cache:
hosts:
default: memcache
port:
memcache: 11211
oslo_messaging:
auth:
admin:
username: admin
password: password
user:
username: rabbitmq
password: password
hosts:
default: rabbitmq
path: /
scheme: rabbit
port:
amqp: 5672
resources:
enabled: false
senlin_api:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
senlin_db_init:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
senlin_db_sync:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
senlin_ks_endpoints:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
senlin_ks_service:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
senlin_ks_user:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
senlin_engine:
requests:
memory: "124Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
mounts:
senlin_api:
init_container: null
senlin_api:
senlin_engine:
init_container: null
senlin_engine: