From b683cb01493d76b9db6de0da68854552f0a5ac7f Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Thu, 5 Oct 2017 15:22:44 -0500 Subject: [PATCH] Postgres: remove chart This PS removes the postgres chart as it is now located in OSH. Change-Id: Iba5cdca8ca5fcbca7de2ceb26485c530e5277a26 --- postgresql/.helmignore | 21 --------- postgresql/Chart.yaml | 17 ------- postgresql/README.md | 11 ----- postgresql/templates/_helpers.tpl | 59 ----------------------- postgresql/templates/deployment.yaml | 70 ---------------------------- postgresql/templates/service.yaml | 26 ----------- postgresql/values.yaml | 48 ------------------- tools/gate/basic_launch.sh | 4 -- 8 files changed, 256 deletions(-) delete mode 100644 postgresql/.helmignore delete mode 100644 postgresql/Chart.yaml delete mode 100644 postgresql/README.md delete mode 100644 postgresql/templates/_helpers.tpl delete mode 100644 postgresql/templates/deployment.yaml delete mode 100644 postgresql/templates/service.yaml delete mode 100644 postgresql/values.yaml diff --git a/postgresql/.helmignore b/postgresql/.helmignore deleted file mode 100644 index f0c13194..00000000 --- a/postgresql/.helmignore +++ /dev/null @@ -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 diff --git a/postgresql/Chart.yaml b/postgresql/Chart.yaml deleted file mode 100644 index 50fca8a1..00000000 --- a/postgresql/Chart.yaml +++ /dev/null @@ -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 diff --git a/postgresql/README.md b/postgresql/README.md deleted file mode 100644 index 6857bd2e..00000000 --- a/postgresql/README.md +++ /dev/null @@ -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 -``` diff --git a/postgresql/templates/_helpers.tpl b/postgresql/templates/_helpers.tpl deleted file mode 100644 index 1ae4162c..00000000 --- a/postgresql/templates/_helpers.tpl +++ /dev/null @@ -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 -}} diff --git a/postgresql/templates/deployment.yaml b/postgresql/templates/deployment.yaml deleted file mode 100644 index e65f43e6..00000000 --- a/postgresql/templates/deployment.yaml +++ /dev/null @@ -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 }} diff --git a/postgresql/templates/service.yaml b/postgresql/templates/service.yaml deleted file mode 100644 index 2736398d..00000000 --- a/postgresql/templates/service.yaml +++ /dev/null @@ -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 }} diff --git a/postgresql/values.yaml b/postgresql/values.yaml deleted file mode 100644 index 68bd6e6c..00000000 --- a/postgresql/values.yaml +++ /dev/null @@ -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: \ No newline at end of file diff --git a/tools/gate/basic_launch.sh b/tools/gate/basic_launch.sh index 7417936e..8348d07d 100755 --- a/tools/gate/basic_launch.sh +++ b/tools/gate/basic_launch.sh @@ -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