1. Services ports renamed.
2. Added label 'app' inside all the deployment's yamls.
. README.md added with configuration information.
JIRA: CLOVER-3
JIRA: CONTAINER-22
Change-Id: I4c58b9ad6b5e0e598ad6a152f58c8afad084a805
Signed-off-by: Laura Sofia Enriquez <lsofia.enriquez@gmail.com>
--- /dev/null
+# Metaswitch Clearwater vIMS Chart
+
+Based on [Metaswitch's Clearwater](https://github.com/Metaswitch/clearwater-docker) k8s configuration.
+
+
+## Configuration
+
+The following tables lists the configurable parameters of the chart and their default values.
+
+
+Parameter | Description | Default
+--- | --- | ---
+`image.path` | dockerhub respository | `enriquetaso`
+`image.tag` | docker image tag | `latest`
+`config.configmaps` | Custom configmap | `env-vars`
+`config.zone` | Custom namespace | `default.svc.cluster.local`
+`config.ip` | MANDATORY: Should be repaced with external ip | `None`
+
+
 
 
 The deployment exposes:
 
-    - the Ellis web UI on {{ .Value.config.ip }}30080 for self-provisioning.
+    - the Ellis web UI on port 30080 for self-provisioning.
     - STUN/TURN on port 3478 for media relay.
     - SIP on port 5060 for service.
     - SIP/WebSocket on port 5062 for service.
 
     metadata:
       labels:
         service: astaire
+        app: astaire
     spec:
       terminationGracePeriodSeconds: 120
       containers:
 
   name: astaire
 spec:
   ports:
-  - name: "snmp-astaire"
+  - name: "http-astaire"
     port: 11311
   selector:
     service: astaire
 
       labels:
         service: bono
         snmp: enabled
+        app: bono
     spec:
       containers:
       - image: "{{ .Values.image.path }}/bono:{{ .Values.image.tag }}"
 
 metadata:
   name: bono
 spec:
+  externalIPs:
+  - {{ .Values.config.ip }}
   loadBalancerIP: {{ .Values.config.ip }}
-  type: LoadBalancer
   ports:
-  - name: "3478"
+  - name: "tcp-3478"
     port: 3478
-  - name: "5060"
+    protocol: TCP
+    targetPort: 3478
+  - name: "tcp-5060"
     port: 5060
-  - name: "5062"
+    protocol: TCP
+    targetPort: 5060
+  - name: "tcp-5062"
     port: 5062
+    protocol: TCP
+    targetPort: 5062
   selector:
     service: bono
+  sessionAffinity: None
+  type: ClusterIP
+status:
+  loadBalancer: {}
 
     metadata:
       labels:
         service: cassandra
+        app: cassandra
     spec:
       containers:
       - image: "{{ .Values.image.path }}/cassandra:{{ .Values.image.tag }}"
 
   name: cassandra
 spec:
   ports:
-  - name: "7001"
+  - name: "http-7001"
     port: 7001
-  - name: "7000"
+  - name: "http-7000"
     port: 7000
-  - name: "9042"
+  - name: "http-9042"
     port: 9042
-  - name: "9160"
+  - name: "http-9160"
     port: 9160
   selector:
     service: cassandra
 
     metadata:
       labels:
         service: chronos
+        app: chronos
     spec:
       terminationGracePeriodSeconds: 120
       containers:
 
   name: chronos
 spec:
   ports:
-  - name: "7253"
+  - name: "http-7253"
     port: 7253
   selector:
     service: chronos
 
     metadata:
       labels:
         service: ellis
+        app: ellis
     spec:
       containers:
       - image: "{{ .Values.image.path }}/ellis:{{ .Values.image.tag }}"
 
 spec:
   type: NodePort
   ports:
-  - name: "http"
+  - name: "http-ellis"
     port: 80
     nodePort: 30080
   selector:
 
       creationTimestamp: null
       labels:
         instance-type: etcd-pod
+        app: etcd-pod
     spec:
       containers:
       - args:
 
     instance-type: etcd-pod
 spec:
   ports:
-  - name: "etcd-client"
+  - name: "http-etcd-client"
     port: 2379
-  - name: "etcd-server"
+  - name: "http-etcd-server"
     port: 2380
-  - name: "4001"
+  - name: "http-4001"
     port: 4001
   selector:
     instance-type: etcd-pod
 
     metadata:
       labels:
         service: homer
+        app: homer
     spec:
       containers:
       - image: "{{ .Values.image.path }}/homer:{{ .Values.image.tag }}"
 
--- /dev/null
+apiVersion: v1
+kind: Service
+metadata:
+  name: homer
+spec:
+  ports:
+  - name: "http-7888"
+    port: 7888
+  selector:
+    service: homer
+  clusterIP: None
 
--- /dev/null
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: homestead
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      service: homestead
+  template:
+    metadata:
+      labels:
+        service: homestead
+        snmp: enabled
+        app: homestead
+    spec:
+      containers:
+      - image: "{{ .Values.image.path }}/homestead:{{ .Values.image.tag }}"
+        imagePullPolicy: Always
+        name: homestead
+        ports:
+        - containerPort: 22
+        - containerPort: 8888
+        envFrom:
+        - configMapRef:
+              name: env-vars
+        env:
+        - name: MY_POD_IP
+          valueFrom:
+            fieldRef:
+              fieldPath: status.podIP
+        livenessProbe:
+          exec:
+            command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "8888"]
+          initialDelaySeconds: 60
+        readinessProbe:
+          exec:
+            command: ["/bin/bash", "/usr/share/kubernetes/liveness.sh", "8888"]
+        volumeMounts:
+        - name: homesteadlogs
+          mountPath: /var/log/homestead
+      - image: busybox
+        name: tailer
+        command: [ "tail", "-F", "/var/log/homestead/homestead_current.txt" ]
+        volumeMounts:
+        - name: homesteadlogs
+          mountPath: /var/log/homestead
+      volumes:
+      - name: homesteadlogs
+        emptyDir: {}
+      restartPolicy: Always
 
       labels:
         service: homestead-prov
         snmp: enabled
+        app: homestead-pro
     spec:
       containers:
       - image: "{{ .Values.image.path }}/homestead-prov:{{ .Values.image.tag }}"
 
   name: homestead-prov
 spec:
   ports:
-  - name: "8889"
+  - name: "http-8889"
     port: 8889
   selector:
     service: homestead-prov
 
   name: homestead
 spec:
   ports:
-  - name: "8888"
+  - name: "http-8888"
     port: 8888
   selector:
     service: homestead
 
       labels:
         service: ralf
         snmp: enabled
+        app: ralf
     spec:
       containers:
       - image: "{{ .Values.image.path }}/ralf:{{ .Values.image.tag }}"
 
   name: ralf
 spec:
   ports:
-  - name: "10888"
+  - name: "http-10888"
     port: 10888
   selector:
     service: ralf
 
       labels:
         service: sprout
         snmp: enabled
+        app: sprout
     spec:
       containers:
       - image: "{{ .Values.image.path }}/sprout:{{ .Values.image.tag }}"
 
   name: sprout
 spec:
   ports:
-  - name: "5052"
+  - name: "http-5052"
     port: 5052
-  - name: "5054"
+  - name: "http-5054"
     port: 5054
   selector:
     service: sprout