From 0e93fb5bfce4fcd462f5db0d9c6d1f29f2e742a6 Mon Sep 17 00:00:00 2001 From: kerenj Date: Tue, 6 Mar 2018 14:46:42 +0000 Subject: make so chart one namespace compatible changed namespace to be nsPrefix only added component name as prefix to chart name changed all templated to use name instead of fullname Issue-ID: OOM-784 Change-Id: If2288ba14e5f74a7f7ba4c2f9bf46eecc36feca7 Signed-off-by: kerenj --- kubernetes/so/charts/mariadb/Chart.yaml | 2 +- kubernetes/so/charts/mariadb/templates/NOTES.txt | 6 +++--- kubernetes/so/charts/mariadb/templates/clusterrolebinding.yaml | 2 +- kubernetes/so/charts/mariadb/templates/deployment.yaml | 6 +++--- kubernetes/so/charts/mariadb/templates/pv.yaml | 4 ++-- kubernetes/so/charts/mariadb/templates/pvc.yaml | 4 ++-- kubernetes/so/charts/mariadb/templates/secrets.yaml | 6 +++--- kubernetes/so/charts/mariadb/templates/service.yaml | 2 +- kubernetes/so/templates/NOTES.txt | 6 +++--- kubernetes/so/templates/clusterrolebinding.yaml | 2 +- kubernetes/so/templates/deployment.yaml | 6 +++--- kubernetes/so/templates/secrets.yaml | 2 +- kubernetes/so/templates/service.yaml | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) (limited to 'kubernetes/so') diff --git a/kubernetes/so/charts/mariadb/Chart.yaml b/kubernetes/so/charts/mariadb/Chart.yaml index da9cab3175..1b3b5ffb23 100644 --- a/kubernetes/so/charts/mariadb/Chart.yaml +++ b/kubernetes/so/charts/mariadb/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: MariaDB Service -name: mariadb +name: so-mariadb version: 2.0.0 diff --git a/kubernetes/so/charts/mariadb/templates/NOTES.txt b/kubernetes/so/charts/mariadb/templates/NOTES.txt index c1f5d13859..87565ada20 100644 --- a/kubernetes/so/charts/mariadb/templates/NOTES.txt +++ b/kubernetes/so/charts/mariadb/templates/NOTES.txt @@ -4,13 +4,13 @@ http://{{ . }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') echo http://$SERVICE_IP:{{ .Values.service.externalPort }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") diff --git a/kubernetes/so/charts/mariadb/templates/clusterrolebinding.yaml b/kubernetes/so/charts/mariadb/templates/clusterrolebinding.yaml index a1ff116614..df270f55e5 100644 --- a/kubernetes/so/charts/mariadb/templates/clusterrolebinding.yaml +++ b/kubernetes/so/charts/mariadb/templates/clusterrolebinding.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} diff --git a/kubernetes/so/charts/mariadb/templates/deployment.yaml b/kubernetes/so/charts/mariadb/templates/deployment.yaml index 14654dc24a..9c9cf09004 100644 --- a/kubernetes/so/charts/mariadb/templates/deployment.yaml +++ b/kubernetes/so/charts/mariadb/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -41,7 +41,7 @@ spec: - name: MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: - name: {{ template "common.fullname" . }} + name: {{ template "common.name" . }} key: db-root-password volumeMounts: - mountPath: /var/lib/mysql @@ -83,7 +83,7 @@ spec: {{- if .Values.persistence.enabled }} - name: mariadb-data persistentVolumeClaim: - claimName: {{ include "common.fullname" . }} + claimName: {{ include "common.name" . }} {{- else }} emptyDir: {} {{- end }} diff --git a/kubernetes/so/charts/mariadb/templates/pv.yaml b/kubernetes/so/charts/mariadb/templates/pv.yaml index e03879f119..d60e075ca5 100644 --- a/kubernetes/so/charts/mariadb/templates/pv.yaml +++ b/kubernetes/so/charts/mariadb/templates/pv.yaml @@ -2,10 +2,10 @@ kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: - app: {{ include "common.fullname" . }} + app: {{ include "common.name" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/kubernetes/so/charts/mariadb/templates/pvc.yaml b/kubernetes/so/charts/mariadb/templates/pvc.yaml index 4a15577687..2271d3c37a 100644 --- a/kubernetes/so/charts/mariadb/templates/pvc.yaml +++ b/kubernetes/so/charts/mariadb/templates/pvc.yaml @@ -2,10 +2,10 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: - app: {{ include "common.fullname" . }} + app: {{ include "common.name" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/kubernetes/so/charts/mariadb/templates/secrets.yaml b/kubernetes/so/charts/mariadb/templates/secrets.yaml index 2d2d33547a..dc9761091a 100644 --- a/kubernetes/so/charts/mariadb/templates/secrets.yaml +++ b/kubernetes/so/charts/mariadb/templates/secrets.yaml @@ -1,10 +1,10 @@ apiVersion: v1 kind: Secret metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: - app: {{ include "common.fullname" . }} + app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} @@ -18,7 +18,7 @@ metadata: name: {{ include "common.name" . }}-docker-registry-key namespace: {{ include "common.namespace" . }} labels: - app: {{ include "common.fullname" . }} + app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} diff --git a/kubernetes/so/charts/mariadb/templates/service.yaml b/kubernetes/so/charts/mariadb/templates/service.yaml index 0a040bcab5..5c133b77d1 100644 --- a/kubernetes/so/charts/mariadb/templates/service.yaml +++ b/kubernetes/so/charts/mariadb/templates/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} diff --git a/kubernetes/so/templates/NOTES.txt b/kubernetes/so/templates/NOTES.txt index 24371d08ab..0fa17a6a36 100644 --- a/kubernetes/so/templates/NOTES.txt +++ b/kubernetes/so/templates/NOTES.txt @@ -4,13 +4,13 @@ http://{{ . }} {{- end }} {{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ include "common.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') echo http://$SERVICE_IP:{{ .Values.service.externalPort }} {{- else if contains "ClusterIP" .Values.service.type }} export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") diff --git a/kubernetes/so/templates/clusterrolebinding.yaml b/kubernetes/so/templates/clusterrolebinding.yaml index a1ff116614..df270f55e5 100644 --- a/kubernetes/so/templates/clusterrolebinding.yaml +++ b/kubernetes/so/templates/clusterrolebinding.yaml @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} diff --git a/kubernetes/so/templates/deployment.yaml b/kubernetes/so/templates/deployment.yaml index 67718ad522..2d25a46722 100644 --- a/kubernetes/so/templates/deployment.yaml +++ b/kubernetes/so/templates/deployment.yaml @@ -1,7 +1,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -21,7 +21,7 @@ spec: - /root/ready.py args: - --container-name - - mariadb + - so-mariadb env: - name: NAMESPACE valueFrom: @@ -174,4 +174,4 @@ spec: path: start-jboss-server.sh mode: 0755 imagePullSecrets: - - name: "{{ include "common.name" . }}-docker-registry-key" \ No newline at end of file + - name: "{{ include "common.name" . }}-docker-registry-key" diff --git a/kubernetes/so/templates/secrets.yaml b/kubernetes/so/templates/secrets.yaml index 3bdef26165..269d40649d 100644 --- a/kubernetes/so/templates/secrets.yaml +++ b/kubernetes/so/templates/secrets.yaml @@ -4,7 +4,7 @@ metadata: name: {{ include "common.name" . }}-docker-registry-key namespace: {{ include "common.namespace" . }} labels: - app: {{ include "common.fullname" . }} + app: {{ include "common.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} diff --git a/kubernetes/so/templates/service.yaml b/kubernetes/so/templates/service.yaml index e3e4d48018..f1b5322d9a 100644 --- a/kubernetes/so/templates/service.yaml +++ b/kubernetes/so/templates/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.name" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} -- cgit 1.2.3-korg