Postgres: remove chart
This PS removes the postgres chart as it is now located in OSH. Change-Id: Iba5cdca8ca5fcbca7de2ceb26485c530e5277a26
This commit is contained in:
parent
966ee087f2
commit
b683cb0149
|
@ -1,21 +0,0 @@
|
|||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
|
@ -1,17 +0,0 @@
|
|||
# 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.
|
||||
|
||||
description: A Helm chart for postgresql
|
||||
name: postgresql
|
||||
version: 0.1.0
|
|
@ -1,11 +0,0 @@
|
|||
# openstack-helm/postgresql
|
||||
|
||||
This chart leverages StatefulSets, with persistent storage.
|
||||
|
||||
The StatefulSets all leverage PVCs to provide stateful storage to /var/lib/postgresql.
|
||||
|
||||
You must ensure that your control nodes that should receive postgresql instances are labeled with openstack-control-plane=enabled, or whatever you have configured in values.yaml for the label configuration:
|
||||
|
||||
```
|
||||
kubectl label nodes openstack-control-plane=enabled --all
|
||||
```
|
|
@ -1,59 +0,0 @@
|
|||
{{/*
|
||||
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.
|
||||
*/}}
|
||||
|
||||
# fqdn
|
||||
{{- define "util.region"}}cluster{{- end}}
|
||||
{{- define "util.tld"}}local{{- end}}
|
||||
|
||||
{{- define "util.fqdn" -}}
|
||||
{{- $fqdn := .Release.Namespace -}}
|
||||
{{- if .Values.endpoints.fqdn -}}
|
||||
{{- $fqdn := .Values.endpoints.fqdn -}}
|
||||
{{- end -}}
|
||||
{{- $fqdn -}}
|
||||
{{- end -}}
|
||||
|
||||
#-----------------------------------------
|
||||
# hosts
|
||||
#-----------------------------------------
|
||||
|
||||
# infrastructure services
|
||||
{{- define "util.postgresql_host"}}postgresql.{{.Release.Namespace}}.svc.{{ include "util.region" . }}.{{ include "util.tld" . }}{{- end}}
|
||||
|
||||
|
||||
{{- define "util.joinListWithComma" -}}
|
||||
{{ range $k, $v := . }}{{ if $k }},{{ end }}{{ $v }}{{ end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "util.template" -}}
|
||||
{{- $name := index . 0 -}}
|
||||
{{- $context := index . 1 -}}
|
||||
{{- $v:= $context.Template.Name | split "/" -}}
|
||||
{{- $n := len $v -}}
|
||||
{{- $last := sub $n 1 | printf "_%d" | index $v -}}
|
||||
{{- $wtf := $context.Template.Name | replace $last $name -}}
|
||||
{{ include $wtf $context }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "util.hash" -}}
|
||||
{{- $name := index . 0 -}}
|
||||
{{- $context := index . 1 -}}
|
||||
{{- $v:= $context.Template.Name | split "/" -}}
|
||||
{{- $n := len $v -}}
|
||||
{{- $last := sub $n 1 | printf "_%d" | index $v -}}
|
||||
{{- $wtf := $context.Template.Name | replace $last $name -}}
|
||||
{{- include $wtf $context | sha256sum | quote -}}
|
||||
{{- end -}}
|
|
@ -1,70 +0,0 @@
|
|||
{{/*
|
||||
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: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ .Values.service_name }}
|
||||
spec:
|
||||
serviceName: {{ .Values.service_name }}
|
||||
replicas: {{ .Values.replicas }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Values.service_name }}
|
||||
spec:
|
||||
nodeSelector:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
containers:
|
||||
- name: {{ .Values.service_name }}
|
||||
image: {{ .Values.images.postgresql }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
ports:
|
||||
- containerPort: {{ .Values.network.port.postgresql }}
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- pg_isready
|
||||
initialDelaySeconds: 20
|
||||
timeoutSeconds: 5
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- pg_isready
|
||||
initialDelaySeconds: 20
|
||||
timeoutSeconds: 5
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 10 }}
|
||||
volumeMounts:
|
||||
- name: postgresql-data
|
||||
mountPath: /var/lib/postgresql
|
||||
volumes:
|
||||
{{- if .Values.development.enabled }}
|
||||
- name: postgresql-data
|
||||
hostPath:
|
||||
path: {{ .Values.development.storage_path }}
|
||||
{{- else }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: postgresql-data
|
||||
annotations:
|
||||
{{ .Values.volume.class_path }}: {{ .Values.volume.class_name }}
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.volume.size }}
|
||||
{{- end }}
|
|
@ -1,26 +0,0 @@
|
|||
{{/*
|
||||
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: {{ .Values.service_name }}
|
||||
spec:
|
||||
ports:
|
||||
- name: db
|
||||
port: {{ .Values.network.port.postgresql }}
|
||||
selector:
|
||||
app: {{ .Values.service_name }}
|
|
@ -1,48 +0,0 @@
|
|||
# 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 postgresql.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
development:
|
||||
enabled: true
|
||||
storage_path: /data/openstack-helm/postgresql
|
||||
|
||||
replicas: 1 #only 1 replica currently supported
|
||||
|
||||
service_name: postgresql
|
||||
|
||||
# using dockerhub postgresql: https://hub.docker.com/r/library/postgres/tags/
|
||||
images:
|
||||
postgresql: "docker.io/postgres:9.5"
|
||||
pull_policy: IfNotPresent
|
||||
|
||||
volume:
|
||||
class_path: volume.beta.kubernetes.io/storage-class
|
||||
class_name: general
|
||||
size: 20Gi
|
||||
|
||||
labels:
|
||||
node_selector_key: openstack-control-plane
|
||||
node_selector_value: enabled
|
||||
|
||||
network:
|
||||
port:
|
||||
postgresql: 5432
|
||||
|
||||
dependencies:
|
||||
postgresql:
|
||||
service:
|
||||
jobs:
|
|
@ -20,10 +20,6 @@ helm_build
|
|||
|
||||
helm search
|
||||
|
||||
helm install --name=postgresql local/postgresql --namespace=openstack
|
||||
|
||||
kube_wait_for_pods openstack 1200
|
||||
|
||||
helm install --name=kibana local/kibana --namespace=kube-system
|
||||
|
||||
kube_wait_for_pods kube-system 600
|
||||
|
|
Loading…
Reference in New Issue