diff options
Diffstat (limited to 'kubernetes/so/templates')
-rw-r--r-- | kubernetes/so/templates/NOTES.txt | 8 | ||||
-rw-r--r-- | kubernetes/so/templates/clusterrolebinding.yaml | 19 | ||||
-rw-r--r-- | kubernetes/so/templates/configmap.yaml | 14 | ||||
-rw-r--r-- | kubernetes/so/templates/deployment.yaml | 23 | ||||
-rw-r--r-- | kubernetes/so/templates/log-configmap.yaml | 14 | ||||
-rw-r--r-- | kubernetes/so/templates/namespace.yaml | 4 | ||||
-rw-r--r-- | kubernetes/so/templates/secrets.yaml | 13 | ||||
-rw-r--r-- | kubernetes/so/templates/service.yaml | 19 |
8 files changed, 68 insertions, 46 deletions
diff --git a/kubernetes/so/templates/NOTES.txt b/kubernetes/so/templates/NOTES.txt index 0fa17a6a36..91d8ed42f1 100644 --- a/kubernetes/so/templates/NOTES.txt +++ b/kubernetes/so/templates/NOTES.txt @@ -4,16 +4,16 @@ 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.name" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.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.name" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.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}") + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ template "so.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} {{- end }} diff --git a/kubernetes/so/templates/clusterrolebinding.yaml b/kubernetes/so/templates/clusterrolebinding.yaml deleted file mode 100644 index df270f55e5..0000000000 --- a/kubernetes/so/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,19 +0,0 @@ - -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: {{ include "common.name" . }} - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin -subjects: - - kind: ServiceAccount - name: default - namespace: {{ include "common.namespace" . }}
\ No newline at end of file diff --git a/kubernetes/so/templates/configmap.yaml b/kubernetes/so/templates/configmap.yaml index c9afd4f71e..db83fbb4f6 100644 --- a/kubernetes/so/templates/configmap.yaml +++ b/kubernetes/so/templates/configmap.yaml @@ -1,3 +1,17 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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: diff --git a/kubernetes/so/templates/deployment.yaml b/kubernetes/so/templates/deployment.yaml index 2d25a46722..0727ce80a3 100644 --- a/kubernetes/so/templates/deployment.yaml +++ b/kubernetes/so/templates/deployment.yaml @@ -1,7 +1,21 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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: extensions/v1beta1 kind: Deployment metadata: - name: {{ include "common.name" . }} + name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -21,7 +35,7 @@ spec: - /root/ready.py args: - --container-name - - so-mariadb + - mariadb env: - name: NAMESPACE valueFrom: @@ -35,7 +49,7 @@ spec: - name: {{ .Chart.Name }} command: - /tmp/start-jboss-server.sh - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + image: "{{ .Values.repository | default .Values.global.repository }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} ports: - containerPort: {{ .Values.service.internalPort }} @@ -174,4 +188,5 @@ spec: path: start-jboss-server.sh mode: 0755 imagePullSecrets: - - name: "{{ include "common.name" . }}-docker-registry-key" + - name: "{{ include "common.namespace" . }}-docker-registry-key" + diff --git a/kubernetes/so/templates/log-configmap.yaml b/kubernetes/so/templates/log-configmap.yaml index 4d1cc90886..ed55ec07a4 100644 --- a/kubernetes/so/templates/log-configmap.yaml +++ b/kubernetes/so/templates/log-configmap.yaml @@ -1,3 +1,17 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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: diff --git a/kubernetes/so/templates/namespace.yaml b/kubernetes/so/templates/namespace.yaml deleted file mode 100644 index 83eb8e7815..0000000000 --- a/kubernetes/so/templates/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: {{ include "common.namespace" . }}
\ No newline at end of file diff --git a/kubernetes/so/templates/secrets.yaml b/kubernetes/so/templates/secrets.yaml deleted file mode 100644 index 269d40649d..0000000000 --- a/kubernetes/so/templates/secrets.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "common.name" . }}-docker-registry-key - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -data: - .dockercfg: {{ .Values.global.repositorySecret | default .Values.repositorySecret }} -type: kubernetes.io/dockercfg
\ No newline at end of file diff --git a/kubernetes/so/templates/service.yaml b/kubernetes/so/templates/service.yaml index f1b5322d9a..63e41acc46 100644 --- a/kubernetes/so/templates/service.yaml +++ b/kubernetes/so/templates/service.yaml @@ -1,7 +1,21 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# 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: {{ include "common.name" . }} + name: so namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -66,4 +80,5 @@ spec: {{- end}} selector: app: {{ include "common.name" . }} - release: {{ .Release.Name }}
\ No newline at end of file + release: {{ .Release.Name }} + |