Merge "Fix UUI health check"
authorMandeep Khinda <Mandeep.Khinda@amdocs.com>
Wed, 7 Mar 2018 20:37:34 +0000 (20:37 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 7 Mar 2018 20:37:34 +0000 (20:37 +0000)
30 files changed:
.gitignore
docs/OOM Project Description/oom_project_description.rst
kubernetes/appc/resources/config/appc/opt/onap/sdnc/svclogic/config/svclogic.properties
kubernetes/appc/resources/config/appc/opt/openecomp/appc/svclogic/config/svclogic.properties
kubernetes/appc/templates/all-services.yaml
kubernetes/common/common-templates/templates/_namespace.tpl
kubernetes/config/docker/init/src/config/consul/consul-agent-config/appc-dbbuilder.json
kubernetes/config/docker/init/src/config/consul/consul-agent-config/appc-sdnctldb02-healthcheck.json
kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/mso-mariadb-script.sh
kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/sparky-be-script.sh
kubernetes/config/docker/init/src/config/consul/consul-agent-config/scripts/tabular-db-availability.sh
kubernetes/config/templates/pod.yaml
kubernetes/config/values.yaml
kubernetes/mso/resources/config/mso/jboss/standalone-full-ha-mso.xml
kubernetes/mso/values.yaml
kubernetes/oneclick/createAll.bash
kubernetes/oneclick/deleteAll.bash
kubernetes/so/charts/mariadb/Chart.yaml
kubernetes/so/charts/mariadb/templates/NOTES.txt
kubernetes/so/charts/mariadb/templates/clusterrolebinding.yaml
kubernetes/so/charts/mariadb/templates/deployment.yaml
kubernetes/so/charts/mariadb/templates/pv.yaml
kubernetes/so/charts/mariadb/templates/pvc.yaml
kubernetes/so/charts/mariadb/templates/secrets.yaml
kubernetes/so/charts/mariadb/templates/service.yaml
kubernetes/so/templates/NOTES.txt
kubernetes/so/templates/clusterrolebinding.yaml
kubernetes/so/templates/deployment.yaml
kubernetes/so/templates/secrets.yaml
kubernetes/so/templates/service.yaml

index 028a8ee..4dcd874 100644 (file)
@@ -1,2 +1,5 @@
 kubernetes/config/onap-parameters.yaml
 .idea/*
+kubernetes/dist/*
+requirements.lock
+**/charts/*.tgz
index 18309ca..ba9de5f 100644 (file)
@@ -5,6 +5,10 @@
 ONAP Operations Manager Project
 ###############################
 
+.. contents::
+   :depth: 3
+..
+
 Introduction
 ============
 
@@ -22,46 +26,80 @@ its life cycle while using hardware resources efficiently. 
 Quick Start Guide
 =================
 
-Once a kubernetes environment is available (check out `ONAP on Kubernetes <https://wiki.onap.org/display/DW/ONAP+on+Kubernetes>`__ if you're
-getting started) and the deployment artifacts have been customized for your location, ONAP is ready to be installed. 
+Pre-requisites
+--------------
+
+* Your Kubernetes environment must be available. For more information see, `ONAP on Kubernetes <https://wiki.onap.org/display/DW/ONAP+on+Kubernetes>`__.
+* Deployment artifacts are customized for your location.
+
+**Step 1**
+
+Review and optionally change configuration parameters:
+
+Setup the `/oom/kubernetes/config/onap-parameters.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters.yaml;h=7ddaf4d4c3dccf2fad515265f0da9c31ec0e64b1;hb=refs/heads/master>`__ file with key-value pairs specific to your OpenStack environment.
+
+OR
+
+There is a `sample <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters-sample.yaml;h=3a74beddbbf7f9f9ec8e5a6abaecb7cb238bd519;hb=refs/heads/master>`__ that may help you out or even be usable directly if you don't intend to actually use OpenStack resources.
+
+**Step 2**
+
+In-order to be able to support multiple ONAP instances within a single kubernetes environment, a configuration set is required. To do this, execute the `createConfig.sh <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/createConfig.sh;h=f226ccae47ca6de15c1da49be4b8b6de974895ed;hb=refs/heads/master>`__ script::
+
+  oom/kubernetes/config/createConfig.sh -n onap
+  
+Where:
+
+* onap' refers to the name of the instance. This serves as the Namespace prefix for each deployed ONAP component (for example, onap-mso).
+
+**Step 3**
+
+The bash script `createAll.bash <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/oneclick/createAll.bash;h=5e5f2dc76ea7739452e757282e750638b4e3e1de;hb=refs/heads/master>`__ is used to create an ONAP deployment with kubernetes. It has two primary functions:
+
+* Creating the namespaces used to encapsulate the ONAP components, and
+* Creating the services, pods and containers within each of these namespaces that provide the core functionality of ONAP.
+
+Before you execute the createAll.bash. script, pod config-init (`pod-config-init.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/pod-config-init.yaml;h=b1285ce21d61815c082f6d6aa3c43d00561811c7;hb=refs/heads/master>`__) may need editing to match your environment and deployment into the default namespace.
+
+To deploy the containers and create your ONAP system, execute the following command::
+  
+  oom/kubernetes/oneclick/createAll.bash -n onap
+  
+Additional information on usage of createAll.bash
+-------------------------------------------------
+
+Namespaces provide isolation between ONAP components as ONAP release 1.0 contains duplicate application (for example, mariadb) and port usage.
 
-The first step is to setup
-the \ `/oom/kubernetes/config/onap-parameters.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters.yaml;h=7ddaf4d4c3dccf2fad515265f0da9c31ec0e64b1;hb=refs/heads/master>`__
-file with key-value pairs specific to your OpenStack environment.  There is a
-`sample <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/onap-parameters-sample.yaml;h=3a74beddbbf7f9f9ec8e5a6abaecb7cb238bd519;hb=refs/heads/master>`__
-that may help you out or even be usable directly if you don't intend to actually use OpenStack resources.
+As such createAll.bash requires the user to enter a namespace prefix string that can be used to separate multiple deployments of onap. The result will be set of 10 namespaces (for example, onap-sdc, onap-aai, onap-mso, onap-message-router, onap-robot, onap-vid, onap-sdnc, onap-portal, onap-policy, onap-appc) being created within the kubernetes environment.
 
-In-order to be able to support multiple ONAP instances within a single kubernetes environment a configuration set is required.
- The `createConfig.sh <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/createConfig.sh;h=f226ccae47ca6de15c1da49be4b8b6de974895ed;hb=refs/heads/master>`__ script
-is used to do this.::
+Deploying multiple ONAP instances within the same Kubernetes cluster
+--------------------------------------------------------------------
 
-  > ./createConfig.sh -n onapTrial
+To deploy multiple ONAP instances, you must specify the number of Instances you would like to create in a Kubernetes cluster using createAllbash.
 
-The bash script 
-\ `createAll.bash <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/oneclick/createAll.bash;h=5e5f2dc76ea7739452e757282e750638b4e3e1de;hb=refs/heads/master>`__ is
-used to create an ONAP deployment with kubernetes. It has two primary
-functions:
+This is currently required due to the use of NodePort ranges. NodePorts allow external IP:Port access to containers that are running inside a Kubernetes cluster.
 
--  Creating the namespaces used to encapsulate the ONAP components, and
+To create multiple instances of an ONAP deployment in the cluster, use the following commands::
+  
+  oom/kubernetes/config/createConfig.sh -n onap
+  
+  oom/kubernetes/oneclick/createAll.bash -n onap -i 2
+  
+Where:
 
--  Creating the services, pods and containers within each of these
-   namespaces that provide the core functionality of ONAP.
+* 'onap' refers to the name of the instance.
+* ‘i 2’ refers to the number of instances of an ONAP deployment in the cluster.
 
-To deploy the containers and create your ONAP system enter::
+To delete a deployed instance
+-----------------------------
 
-  > ./createAll.bash -n onapTrial
+To delete a deployed instance, use the following command::
+  
+  oom/kubernetes/oneclick/deleteAll.bash -n onap
+  
+**Note**: Deleting the runtime containers does not remove the configuration created in step 2.
 
-Namespaces provide isolation between ONAP components as ONAP release 1.0
-contains duplicate application (e.g. mariadb) and port usage. As
-such createAll.bash requires the user to enter a namespace prefix string
-that can be used to separate multiple deployments of onap. The result
-will be set of 10 namespaces (e.g. onapTrial-sdc, onapTrial-aai,
-onapTrial-mso, onapTrial-message-router, onapTrial-robot, onapTrial-vid,
-onapTrial-sdnc, onapTrial-portal, onapTrial-policy, onapTrial-appc)
-being created within the kubernetes environment.  A prerequisite pod
-config-init (\ `pod-config-init.yaml <https://gerrit.onap.org/r/gitweb?p=oom.git;a=blob;f=kubernetes/config/pod-config-init.yaml;h=b1285ce21d61815c082f6d6aa3c43d00561811c7;hb=refs/heads/master>`__)
-may need editing to match your environment and deployment into the
-default namespace before running createAll.bash.
+For more information on OOM project documentation, refer to `Quick Start Guide on Wiki  <https://wiki.onap.org/display/DW/ONAP+Operations+Manager+Project#ONAPOperationsManagerProject-QuickStartGuide>`__.
 
 Demo Video
 ----------
index e104245..bcf321c 100644 (file)
@@ -20,7 +20,7 @@
 ###
 
 org.onap.ccsdk.sli.dbtype = jdbc
-org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01.{{.Values.nsPrefix}}:3306/sdnctl
 org.onap.ccsdk.sli.jdbc.database = sdnctl
 org.onap.ccsdk.sli.jdbc.user = sdnctl
 org.onap.ccsdk.sli.jdbc.password = gamma
index f161b2a..2f67a58 100644 (file)
@@ -20,7 +20,7 @@
 ###
 
 org.onap.ccsdk.sli.dbtype = jdbc
-org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01:3306/sdnctl
+org.onap.ccsdk.sli.jdbc.url = jdbc:mysql://appc-sdnctldb01.{{.Values.nsPrefix}}:3306/sdnctl
 org.onap.ccsdk.sli.jdbc.database = sdnctl
 org.onap.ccsdk.sli.jdbc.user = sdnctl
 org.onap.ccsdk.sli.jdbc.password = gamma
index b6d40d7..181cab9 100644 (file)
@@ -69,7 +69,7 @@ spec:
 apiVersion: v1
 kind: Service
 metadata:
-  name: dgbuilder
+  name: appc-dgbuilder
   namespace: "{{ .Values.nsPrefix }}"
   labels:
     app: appc-dgbuilder
index 076fd53..2964a0f 100644 (file)
@@ -7,7 +7,5 @@
   - .Values.nsSuffix  : override namespace suffix
 */}}
 {{- define "common.namespace" -}}
-  {{- $prefix := default .Release.Name .Values.nsPrefix -}}
-  {{- $suffix := default .Chart.Name .Values.nsSuffix -}}
-  {{- printf "%s-%s" $prefix $suffix -}}
+  {{- default .Release.Name .Values.nsPrefix -}}
 {{- end -}}
index 2763505..a6c3467 100644 (file)
@@ -5,7 +5,7 @@
       {
         "id": "appc-dgbuilder",
         "name": "APPC-Dgbuilder Server Health Check",
-        "http": "http://dgbuilder.namespace-placeholder:3000/",
+        "http": "http://appc-dgbuilder.namespace-placeholder:3000/",
         "method": "HEAD",
         "header": {
           "Authorization": ["Basic ZGd1c2VyOnRlc3QxMjM="],
index 60bdd22..559e5a8 100644 (file)
@@ -3,9 +3,9 @@
     "name": "Health Check: APPC-SDN-CTL-DB-02",
     "checks": [
       {
-        "id": "sdnctldb02.namespace-placeholder",
+        "id": "appc-sdnctldb02.namespace-placeholder",
         "name": "APPC SDNCTLDB02 Health Check",
-        "tcp": "sdnctldb02.namespace-placeholder:3306",
+        "tcp": "appc-sdnctldb02.namespace-placeholder:3306",
         "interval": "10s",
         "timeout": "1s"
       }
index 42e708e..cabaa4b 100755 (executable)
@@ -1,4 +1,4 @@
-NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "mariadb[^[:space:]]*")
+NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "mso-mariadb[^[:space:]]*")
 
    if [ -n "$NAME" ]; then
        if /consul/config/bin/kubectl -n namespace-placeholder exec -it $NAME -- bash -c 'mysqladmin status -u root -p$MYSQL_ROOT_PASSWORD' > /dev/null; then
index d7def2d..0791c58 100755 (executable)
@@ -1,5 +1,5 @@
 
-NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "sparky-be[^[:space:]]*")
+NAME=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "aai-sparky-be[^[:space:]]*")
 
 if [ -n "$NAME" ]; then
    if /consul/config/bin/kubectl -n namespace-placeholder exec -it $NAME -- ps -efww | grep 'java' | grep 'sparky' > /dev/null; then
index a3ac9b4..ebec497 100755 (executable)
@@ -1,6 +1,6 @@
 
 # Query the Hbase service for the cluster status.
-GET_CLUSTER_STATUS_RESPONSE=$(curl -si -X GET -H "Accept: text/xml" http://hbase.namespace-placeholder:8080/status/cluster)
+GET_CLUSTER_STATUS_RESPONSE=$(curl -si -X GET -H "Accept: text/xml" http://aai-hbase.namespace-placeholder:8080/status/cluster)
 
 if [ -z "$GET_CLUSTER_STATUS_RESPONSE" ]; then
   echo "Tabular store is unreachable."
index 217478b..38d27ee 100644 (file)
@@ -14,7 +14,7 @@ metadata:
 spec:
   containers:
     - name: {{ .Chart.Name }}
-      image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+      image: "{{ .Values.image.repository }}"
       imagePullPolicy: {{ .Values.image.pullPolicy }}
       envFrom:
         - configMapRef:
@@ -25,7 +25,7 @@ spec:
           fieldRef:
             fieldPath: metadata.namespace
       - name: NAMESPACE_PREFIX
-        value: {{ .Values.nsPrefix }}            
+        value: {{ .Values.nsPrefix }}
       - name: DOCKER_SHARE_PATH
         value: {{ .Values.dockerSharePath }}
       volumeMounts:
@@ -35,4 +35,4 @@ spec:
     - name: config-init-root
       hostPath:
         path: {{ .Values.dockerSharePath }}
-  restartPolicy: Never
\ No newline at end of file
+  restartPolicy: Never
index 6a67572..243996d 100644 (file)
@@ -2,7 +2,5 @@
 nsPrefix: onap
 dockerSharePath: /dockerdata-nfs
 image:
-  repository: oomk8s/config-init
-  #master => Beijing (major release uprev)
-  tag: 2.0.0-SNAPSHOT
+  repository: oomk8s/config-init:2.0.0-SNAPSHOT
   pullPolicy: Always
index 135950d..86edeb3 100644 (file)
         <subsystem xmlns="urn:jboss:domain:datasources:4.0">
             <datasources>
                 <datasource jndi-name="java:jboss/datasources/mso-requests" pool-name="mso-requests" enabled="true" use-ccm="true">
-                    <connection-url>jdbc:mariadb://mso-mariadb:3306/mso_requests?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
+                    <connection-url>jdbc:mariadb://mso-mariadb.{{.Values.nsPrefix}}:3306/mso_requests?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
                     <driver>mariadb</driver>
                     <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                     <pool>
                     </timeout>
                 </datasource>
                 <datasource jndi-name="java:jboss/datasources/mso-catalog" pool-name="mso-catalog" enabled="true" use-ccm="true">
-                    <connection-url>jdbc:mariadb://mso-mariadb:3306/mso_catalog?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
+                    <connection-url>jdbc:mariadb://mso-mariadb.{{.Values.nsPrefix}}:3306/mso_catalog?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
                     <driver>mariadb</driver>
                     <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
                     <pool>
                     </timeout>
                 </datasource>
                 <datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
-                    <connection-url>jdbc:mariadb://mso-mariadb:3306/camundabpmn?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
+                    <connection-url>jdbc:mariadb://mso-mariadb.{{.Values.nsPrefix}}:3306/camundabpmn?autoReconnect=true&amp;connectTimeout=60000&amp;socketTimeout=60000</connection-url>
                     <driver>mariadb</driver>
                     <new-connection-sql>set autocommit=1</new-connection-sql>
                     <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
index 986d057..4cc9146 100644 (file)
@@ -12,6 +12,6 @@ dbReplicas: 1
 dataRootDir: /dockerdata-nfs
 image:
   readiness: oomk8s/readiness-check:1.1.0
-  mso: nexus3.onap.org:10001/openecomp/mso:v1.1.1
+  mso: nexus3.onap.org:10001/openecomp/mso:v1.1.2
   mariadb: nexus3.onap.org:10001/mariadb:10.1.11
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
index b7d6a64..488f920 100755 (executable)
@@ -27,8 +27,7 @@ check_return_code(){
 }
 
 create_service_account() {
-#  cmd=`echo kubectl create clusterrolebinding $1-$2-admin-binding --clusterrole=cluster-admin --serviceaccount=$1-$2:default`
-  cmd=`echo kubectl create clusterrolebinding $1-$2-admin-binding --clusterrole=cluster-admin --serviceaccount=$1:default`
+  cmd=`echo kubectl create clusterrolebinding $1-admin-binding --clusterrole=cluster-admin --serviceaccount=$1:default`
   eval ${cmd}
   check_return_code $cmd
 }
@@ -39,7 +38,6 @@ create_namespace() {
 }
 
 create_registry_key() {
-#  cmd=`echo kubectl --namespace $1-$2 create secret docker-registry $3 --docker-server=$4 --docker-username=$5 --docker-password=$6 --docker-email=$7`
 cmd=`echo kubectl --namespace $1 create secret docker-registry $2 --docker-server=$3 --docker-username=$4 --docker-password=$5 --docker-email=$6`
   eval ${cmd}
   check_return_code $cmd
@@ -179,15 +177,15 @@ then
 
     printf "\nCreating registry secret **********\n"
     create_registry_key $NS ${NS}-docker-registry-key $ONAP_DOCKER_REGISTRY $DU $DP $ONAP_DOCKER_MAIL
+
+    printf "\nCreating service account **********\n"
+    create_service_account $NS
 fi
 
 printf "\n\n********** Creating deployments for ${HELM_APPS[*]} ********** \n"
 
 for i in ${HELM_APPS[@]}; do
 
-  printf "\nCreating service account **********\n"
-  create_service_account $NS $i
-
   printf "\nCreating deployments and services **********\n"
   create_onap_helm $NS $i $start
 
index 52748bc..9833af7 100755 (executable)
@@ -7,12 +7,11 @@ delete_namespace() {
 }
 
 delete_service_account() {
-    kubectl delete clusterrolebinding $1-$2-admin-binding
-    printf "Service account $1-$2-admin-binding deleted.\n\n"
+    kubectl delete clusterrolebinding $1-admin-binding
 }
 
 delete_registry_key() {
-  kubectl --namespace $1-$2 delete secret ${1}-docker-registry-key
+  kubectl --namespace $1 delete secret ${1}-docker-registry-key
 }
 
 delete_app_helm() {
@@ -134,13 +133,14 @@ printf "\n********** Cleaning up ONAP: ${ONAP_APPS[*]}\n"
 
 for i in ${HELM_APPS[@]}; do
   delete_app_helm $NS $i
-  delete_service_account $NS $i
 done
 
 if [ "$SINGLE_COMPONENT" == "false" ]
 then
     delete_app_helm $NS "config"
     delete_namespace $NS
+    delete_registry_key $NS
+    delete_service_account $NS
 fi
 
 if $WAIT_TERMINATE; then
index da9cab3..1b3b5ff 100644 (file)
@@ -1,4 +1,4 @@
 apiVersion: v1
 description: MariaDB Service
-name: mariadb
+name: so-mariadb
 version: 2.0.0
index c1f5d13..87565ad 100644 (file)
@@ -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}")
index a1ff116..df270f5 100644 (file)
@@ -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" . }}
index 14654dc..9c9cf09 100644 (file)
@@ -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 }}
index e03879f..d60e075 100644 (file)
@@ -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 }}"
index 4a15577..2271d3c 100644 (file)
@@ -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 }}"
index 2d2d335..dc97610 100644 (file)
@@ -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 }}
index 0a040bc..5c133b7 100644 (file)
@@ -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" . }}
index 24371d0..0fa17a6 100644 (file)
@@ -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}")
index a1ff116..df270f5 100644 (file)
@@ -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" . }}
index 67718ad..2d25a46 100644 (file)
@@ -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"
index 3bdef26..269d406 100644 (file)
@@ -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 }}
index e3e4d48..f1b5322 100644 (file)
@@ -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" . }}