MariaDB chart cleanup

This ps brings mariadb inline with the other charts in openstack
helm. It organizes the values trees, removes an unused duplicate
resource tree, and adds the keys for enabling specific manifests

Change-Id: I6f331d51802968620da18b687dc2f9dfa58cdd79
This commit is contained in:
Steve Wilkerson 2018-01-06 13:48:42 -06:00
parent c9dbf745d4
commit 4a0380ae84
9 changed files with 42 additions and 26 deletions

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- if .Values.manifests.configmap_bin }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
@ -25,3 +26,4 @@ data:
{{ tuple "bin/_readiness.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_readiness.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
start.sh: | start.sh: |
{{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "bin/_start.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- if .Values.manifests.configmap_etc }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
@ -29,3 +30,4 @@ data:
{{ tuple "etc/_20-override.cnf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "etc/_20-override.cnf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
99-force.cnf: | 99-force.cnf: |
{{ tuple "etc/_99-force.cnf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }} {{ tuple "etc/_99-force.cnf.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
{{- end }}

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- if .Values.manifests.pdb_server }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: policy/v1beta1 apiVersion: policy/v1beta1
@ -25,3 +26,4 @@ spec:
selector: selector:
matchLabels: matchLabels:
{{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }} {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 6 }}
{{- end }}

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- if .Values.manifests.secret_db }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
@ -23,3 +24,4 @@ metadata:
type: Opaque type: Opaque
data: data:
MYSQL_ROOT_PASSWORD: {{ .Values.endpoints.oslo_db.auth.admin.password | b64enc }} MYSQL_ROOT_PASSWORD: {{ .Values.endpoints.oslo_db.auth.admin.password | b64enc }}
{{- end }}

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- if .Values.manifests.secret_etc }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
@ -23,3 +24,4 @@ metadata:
type: Opaque type: Opaque
data: data:
admin_user.cnf: {{ tuple "secrets/_admin_user.cnf.tpl" . | include "helm-toolkit.utils.template" | b64enc }} admin_user.cnf: {{ tuple "secrets/_admin_user.cnf.tpl" . | include "helm-toolkit.utils.template" | b64enc }}
{{- end }}

View File

@ -16,7 +16,7 @@ limitations under the License.
# This service could be used for cluster pod discovery, though instead it's # This service could be used for cluster pod discovery, though instead it's
# primarily here to allow DNS lookups of cluster pods. # primarily here to allow DNS lookups of cluster pods.
{{- if .Values.manifests.service_discovery }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
@ -32,3 +32,4 @@ spec:
clusterIP: None clusterIP: None
selector: selector:
{{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{- end }}

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- if .Values.manifests.service }}
{{- $envAll := . }} {{- $envAll := . }}
--- ---
apiVersion: v1 apiVersion: v1
@ -34,3 +35,4 @@ spec:
port: {{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }} port: {{ tuple "oslo_db" "internal" "mysql" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}
selector: selector:
{{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }} {{ tuple $envAll "mariadb" "server" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
{{- end }}

View File

@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/}} */}}
{{- if .Values.manifests.statefulset }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.mariadb }} {{- $dependencies := .Values.dependencies.mariadb }}
@ -140,3 +141,4 @@ spec:
storage: {{ .Values.volume.size }} storage: {{ .Values.volume.size }}
storageClassName: {{ .Values.volume.class_name }} storageClassName: {{ .Values.volume.class_name }}
{{- end }} {{- end }}
{{- end }}

View File

@ -12,7 +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.
force_bootstrap: false images:
tags:
mariadb: docker.io/mariadb:10.1.23
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
pull_policy: IfNotPresent
labels:
node_selector_key: openstack-control-plane
node_selector_value: enabled
pod: pod:
affinity: affinity:
@ -30,32 +38,25 @@ pod:
resources: resources:
enabled: false enabled: false
server: server:
limits:
memory: "128Mi"
cpu: "500m"
requests: requests:
memory: "128Mi" memory: "128Mi"
cpu: "500m" cpu: "100m"
limits:
images: memory: "1024Mi"
tags: cpu: "2000m"
mariadb: docker.io/mariadb:10.1.23
dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.2.1
pull_policy: IfNotPresent
dependencies: dependencies:
mariadb: mariadb:
jobs: null jobs: null
services: null
force_bootstrap: false
volume: volume:
enabled: true enabled: true
class_name: general class_name: general
size: 5Gi size: 5Gi
labels:
node_selector_key: openstack-control-plane
node_selector_value: enabled
database: database:
config_override: null config_override: null
# Any configuration here will override the base config. # Any configuration here will override the base config.
@ -63,16 +64,6 @@ database:
# [mysqld] # [mysqld]
# wsrep_slave_threads=1 # wsrep_slave_threads=1
resources:
enabled: false
server:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "1024Mi"
cpu: "2000m"
# typically overriden by environmental # typically overriden by environmental
# values, but should include all endpoints # values, but should include all endpoints
# required by this chart # required by this chart
@ -95,3 +86,13 @@ endpoints:
default: 3306 default: 3306
wsrep: wsrep:
default: 4567 default: 4567
manifests:
configmap_bin: true
configmap_etc: true
pdb_server: true
secret_db: true
secret_etc: true
service_discovery: true
service: true
statefulset: true