standardizing SDC helm charts 35/37635/1
authorMandeep Khinda <mandeep.khinda@amdocs.com>
Thu, 22 Mar 2018 02:12:15 +0000 (02:12 +0000)
committerMandeep Khinda <mandeep.khinda@amdocs.com>
Thu, 22 Mar 2018 02:12:15 +0000 (02:12 +0000)
W.I.P. draft to be shared

Issue-ID: OOM-747

Change-Id: Id6f1e57fdaf3cd6d9f75e8bc1e5bfde39b91235e
Signed-off-by: Mandeep Khinda <mandeep.khinda@amdocs.com>
68 files changed:
kubernetes/sdc/.helmignore [new file with mode: 0644]
kubernetes/sdc/Chart.yaml
kubernetes/sdc/charts/sdc-be/.helmignore [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/Chart.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/resources/config/README.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/resources/config/application.properties [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/templates/NOTES.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/templates/configmap.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/templates/service.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-be/values.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/.helmignore [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/Chart.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/resources/config/README.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/resources/config/application.properties [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/templates/NOTES.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/templates/configmap.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/templates/pv.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/templates/pvc.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/templates/sdc-cs.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/templates/service.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-cs/values.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/.helmignore [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/Chart.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/resources/config/README.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/resources/config/application.properties [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/templates/NOTES.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/templates/configmap.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/templates/sdc-es.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/templates/service.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-es/values.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/.helmignore [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/Chart.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/resources/config/README.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/resources/config/application.properties [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/templates/NOTES.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/templates/configmap.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/templates/sdc-fe-configmap.yaml [moved from kubernetes/sdc/templates/sdc-fe-configmap.yaml with 100% similarity]
kubernetes/sdc/charts/sdc-fe/templates/sdc-fe.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/templates/service.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/values.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/.helmignore [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/Chart.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/resources/config/README.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/resources/config/application.properties [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/templates/NOTES.txt [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/templates/configmap.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/templates/deployment.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/templates/service.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-kb/values.yaml [new file with mode: 0644]
kubernetes/sdc/requirements.yaml [new file with mode: 0644]
kubernetes/sdc/resources/config/environments/AUTO.json
kubernetes/sdc/resources/config/environments/Template.json
kubernetes/sdc/resources/config/log/filebeat/filebeat.yml
kubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb
kubernetes/sdc/templates/all-services.yaml [deleted file]
kubernetes/sdc/templates/configmap.yaml [new file with mode: 0644]
kubernetes/sdc/templates/sdc-be.yaml [deleted file]
kubernetes/sdc/templates/sdc-cs.yaml [deleted file]
kubernetes/sdc/templates/sdc-environments-configmap.yaml [deleted file]
kubernetes/sdc/templates/sdc-es.yaml [deleted file]
kubernetes/sdc/templates/sdc-fe.yaml [deleted file]
kubernetes/sdc/templates/sdc-kb.yaml [deleted file]
kubernetes/sdc/templates/sdc-pv-pvc.yaml [deleted file]
kubernetes/sdc/values.yaml

diff --git a/kubernetes/sdc/.helmignore b/kubernetes/sdc/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
index 668a9a6..6b2d6e6 100644 (file)
@@ -1,4 +1,4 @@
 apiVersion: v1
-description: A Helm chart for Kubernetes
+description: Service Design and Creation Umbrella Helm charts
 name: sdc
-version: 0.1.0
+version: 2.0.0
diff --git a/kubernetes/sdc/charts/sdc-be/.helmignore b/kubernetes/sdc/charts/sdc-be/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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/kubernetes/sdc/charts/sdc-be/Chart.yaml b/kubernetes/sdc/charts/sdc-be/Chart.yaml
new file mode 100644 (file)
index 0000000..930e94f
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: Backend API - Service Design and Creation Helm charts
+name: sdc-be
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-be/resources/config/README.txt b/kubernetes/sdc/charts/sdc-be/resources/config/README.txt
new file mode 100644 (file)
index 0000000..5cc0149
--- /dev/null
@@ -0,0 +1,10 @@
+This directory contains all external configuration files that
+need to be mounted into an application container.
+
+See the configmap.yaml in the templates directory for an example
+of how to load (ie map) config files from this directory, into
+Kubernetes, for distribution within the k8s cluster.
+
+See deployment.yaml in the templates directory for an example
+of how the 'config mapped' files are then mounted into the
+containers.
diff --git a/kubernetes/sdc/charts/sdc-be/resources/config/application.properties b/kubernetes/sdc/charts/sdc-be/resources/config/application.properties
new file mode 100644 (file)
index 0000000..496a15a
--- /dev/null
@@ -0,0 +1 @@
+sampleConfigKey=sampleConfigValue
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-be/templates/NOTES.txt b/kubernetes/sdc/charts/sdc-be/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..2465e03
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  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.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -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 {{ 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/sdc/charts/sdc-be/templates/configmap.yaml b/kubernetes/sdc/charts/sdc-be/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..5b8dde2
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-be/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-be/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..df1169e
--- /dev/null
@@ -0,0 +1,148 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - "sdc-es"
+        - --container-name
+        - "sdc-cs"
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#      - name: {{ include "common.name" . }}-job-completion
+#        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+#        imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
+#        command:
+#        - python
+#        args:
+#        - /root/readiness/sdc_check_job_completion.py
+#        - --job-name
+#        - sdc-config-cassandra
+#        env:
+#        - name: NAMESPACE
+#          valueFrom:
+#            fieldRef:
+#              apiVersion: v1
+#              fieldPath: metadata.namespace
+#        volumeMounts:
+#        - mountPath: /root/readiness
+#          name: sdc-check-job-completion
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          - containerPort: {{ .Values.service.internalPort1 }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          - name: ENVNAME
+            value: {{ .Values.global.env.name }}
+          - name: HOST_IP
+            valueFrom:
+              fieldRef:
+                fieldPath: status.podIP
+          volumeMounts:
+#          - name: sdc-sdc-es-es
+#            mountPath: /usr/share/elasticsearch/data/
+          - name: {{ .Release.Name }}-sdc-environments-configmap
+            mountPath: /root/chef-solo/environments/
+          - name: {{ include "common.fullname" . }}-localtime
+            mountPath: /etc/localtime
+            readOnly: true
+          - name: {{ include "common.fullname" . }}-logs
+            mountPath: /var/lib/jetty/logs
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-logback
+            mountPath: /tmp/logback.xml
+          lifecycle:
+            postStart:
+              exec:
+                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+
+        # side car containers
+        - name: {{ include "common.name" . }}-filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - name: {{ include "common.fullname" . }}-filebeat-conf
+            mountPath: /usr/share/filebeat/filebeat.yml
+            subPath: filebeat.yml
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-data-filebeat
+            mountPath: /usr/share/filebeat/data
+      volumes:
+        - name: {{ include "common.fullname" . }}-localtime
+          hostPath:
+            path: /etc/localtime
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+           name: {{ include "common.fullname" . }}-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-logs-2
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-logback
+          configMap:
+            name : {{ include "common.fullname" . }}-log-be-configmap
+#        - name: sdc-sdc-es-es
+#          hostPath:
+#            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
+#        - name: sdc-environments
+          configMap:
+            name: {{ include "common.fullname" . }}-environments-configmap
+            defaultMode: 0755
+        - name:  {{ include "common.fullname" . }}-logs
+          hostPath:
+            path:  {{ .Values.dataRootDir }}/{{ include "common.namespace" . }}/sdc/logs
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-be/templates/service.yaml b/kubernetes/sdc/charts/sdc-be/templates/service.yaml
new file mode 100644 (file)
index 0000000..5dd5688
--- /dev/null
@@ -0,0 +1,47 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    msb.onap.org/service-info: '[
+      {
+          "serviceName": "sdc",
+          "version": "v1",
+          "url": "/sdc/v1",
+          "protocol": "REST",
+          "port": "8080",
+          "visualRange":"1"
+      },
+      {
+          "serviceName": "sdc-deprecated",
+          "version": "v1",
+          "url": "/sdc/v1",
+          "protocol": "REST",
+          "port": "8080",
+          "visualRange":"1",
+          "path":"/sdc/v1"
+      }
+      ]'
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      #Example internal target port if required
+      #targetPort: {{ .Values.service.internalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-be/values.yaml b/kubernetes/sdc/charts/sdc-be/values.yaml
new file mode 100644 (file)
index 0000000..c134f35
--- /dev/null
@@ -0,0 +1,79 @@
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: openecomp/sdc-backend:v1.1.0
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+# Example:
+config:
+#  username: myusername
+#  password: mypassword
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  #Example service definition with external, internal and node ports.
+  #Services may use any combination of ports depending on the 'type' of
+  #service being defined.
+  type: NodePort
+  name: sdc-be
+  externalPort: 04
+  internalPort: 8443
+  externalPort1: 05
+  internalPort1: 8080
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdc/charts/sdc-cs/.helmignore b/kubernetes/sdc/charts/sdc-cs/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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/kubernetes/sdc/charts/sdc-cs/Chart.yaml b/kubernetes/sdc/charts/sdc-cs/Chart.yaml
new file mode 100644 (file)
index 0000000..7ce89f0
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: Cassandra - Service Design and Creation Helm charts
+name: sdc-cs
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-cs/resources/config/README.txt b/kubernetes/sdc/charts/sdc-cs/resources/config/README.txt
new file mode 100644 (file)
index 0000000..5cc0149
--- /dev/null
@@ -0,0 +1,10 @@
+This directory contains all external configuration files that
+need to be mounted into an application container.
+
+See the configmap.yaml in the templates directory for an example
+of how to load (ie map) config files from this directory, into
+Kubernetes, for distribution within the k8s cluster.
+
+See deployment.yaml in the templates directory for an example
+of how the 'config mapped' files are then mounted into the
+containers.
diff --git a/kubernetes/sdc/charts/sdc-cs/resources/config/application.properties b/kubernetes/sdc/charts/sdc-cs/resources/config/application.properties
new file mode 100644 (file)
index 0000000..496a15a
--- /dev/null
@@ -0,0 +1 @@
+sampleConfigKey=sampleConfigValue
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/NOTES.txt b/kubernetes/sdc/charts/sdc-cs/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..2465e03
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  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.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -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 {{ 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/sdc/charts/sdc-cs/templates/configmap.yaml b/kubernetes/sdc/charts/sdc-cs/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..5b8dde2
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-cs/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..ee3458b
--- /dev/null
@@ -0,0 +1,148 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - "sdc-es"
+        - --container-name
+        - "sdc-cs"
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#      - name: {{ include "common.name" . }}-job-completion
+#        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+#        imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
+#        command:
+#        - python
+#        args:
+#        - /root/readiness/sdc_check_job_completion.py
+#        - --job-name
+#        - sdc-config-cassandra
+#        env:
+#        - name: NAMESPACE
+#          valueFrom:
+#            fieldRef:
+#              apiVersion: v1
+#              fieldPath: metadata.namespace
+#        volumeMounts:
+#        - mountPath: /root/readiness
+#          name: sdc-check-job-completion
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          - containerPort: {{ .Values.service.internalPort1 }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          - name: ENVNAME
+            value: {{ .Values.global.env.name }}
+          - name: HOST_IP
+            valueFrom:
+              fieldRef:
+                fieldPath: status.podIP
+          volumeMounts:
+#          - name: sdc-sdc-es-es
+#            mountPath: /usr/share/elasticsearch/data/
+          - name: {{ include "common.fullname" . }}-environments
+            mountPath: /root/chef-solo/environments/
+          - name: {{ include "common.fullname" . }}-localtime
+            mountPath: /etc/localtime
+            readOnly: true
+          - name: {{ include "common.fullname" . }}-logs
+            mountPath: /var/lib/jetty/logs
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-logback
+            mountPath: /tmp/logback.xml
+          lifecycle:
+            postStart:
+              exec:
+                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+
+        # side car containers
+        - name: {{ include "common.name" . }}-filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - name: {{ include "common.fullname" . }}-filebeat-conf
+            mountPath: /usr/share/filebeat/filebeat.yml
+            subPath: filebeat.yml
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-data-filebeat
+            mountPath: /usr/share/filebeat/data
+      volumes:
+        - name: {{ include "common.fullname" . }}-localtime
+          hostPath:
+            path: /etc/localtime
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+           name: {{ include "common.fullname" . }}-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-logs-2
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-logback
+          configMap:
+            name : {{ include "common.fullname" . }}-log-be-configmap
+#        - name: sdc-sdc-es-es
+#          hostPath:
+#            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
+#        - name: sdc-environments
+          configMap:
+            name: {{ include "common.fullname" . }}-environments-configmap
+            defaultMode: 0755
+        - name:  {{ include "common.fullname" . }}-logs
+          hostPath:
+            path:  {{ .Values.dataRootDir }}/{{ include "common.namespace" . }}/sdc/logs
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/pv.yaml b/kubernetes/sdc/charts/sdc-cs/templates/pv.yaml
new file mode 100644 (file)
index 0000000..31230a9
--- /dev/null
@@ -0,0 +1,21 @@
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+    name: {{ include "common.fullname" . }}
+spec:
+  capacity:
+    storage: {{ .Values.persistence.size}}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+  hostPath:
+    path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+{{- end -}}
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/pvc.yaml b/kubernetes/sdc/charts/sdc-cs/templates/pvc.yaml
new file mode 100644 (file)
index 0000000..b0cd3bf
--- /dev/null
@@ -0,0 +1,32 @@
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    release: "{{ .Release.Name }}"
+    heritage: "{{ .Release.Service }}"
+{{- if .Values.persistence.annotations }}
+  annotations:
+{{ toYaml .Values.persistence.annotations | indent 4 }}
+{{- end }}
+spec:
+  selector:
+    matchLabels:
+      name: {{ include "common.fullname" . }}
+  accessModes:
+    - {{ .Values.persistence.accessMode }}
+  resources:
+    requests:
+      storage: {{ .Values.persistence.size }}
+{{- if .Values.persistence.storageClass }}
+{{- if (eq "-" .Values.persistence.storageClass) }}
+  storageClassName: ""
+{{- else }}
+  storageClassName: "{{ .Values.persistence.storageClass }}"
+{{- end }}
+{{- end }}
+{{- end -}}
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/sdc-cs.yaml b/kubernetes/sdc/charts/sdc-cs/templates/sdc-cs.yaml
new file mode 100644 (file)
index 0000000..9d2df3d
--- /dev/null
@@ -0,0 +1,80 @@
+#apiVersion: extensions/v1beta1
+#kind: Deployment
+#metadata:
+#  labels:
+#    app: sdc-cs
+#  name: sdc-cs
+#  namespace: "{{ .Values.nsPrefix }}"
+#spec:
+#  selector:
+#    matchLabels:
+#      app: sdc-cs
+#  template:
+#    metadata:
+#      labels:
+#        app: sdc-cs
+#      name: sdc-cs
+#    spec:
+#      initContainers:
+#      - command:
+#        - /root/ready.py
+#        args:
+#        - --container-name
+#        - sdc-es
+#        env:
+#        - name: NAMESPACE
+#          valueFrom:
+#            fieldRef:
+#              apiVersion: v1
+#              fieldPath: metadata.namespace
+#        image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+#        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#        name: sdc-cs-readiness
+#      containers:
+#      - env:
+#        - name: ENVNAME
+#          value: AUTO
+#        - name: HOST_IP
+#          valueFrom:
+#            fieldRef:
+#              fieldPath: status.podIP
+#        - name: ES_HEAP_SIZE
+#          value: "1024M"
+#        image: {{ .Values.image.sdcCassandra }}
+#        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#        name: sdc-cs
+#        volumeMounts:
+#        - mountPath: /var/lib/cassandra/
+#          name: sdc-sdc-cs-cs
+#        - mountPath: /root/chef-solo/environments/
+#          name: sdc-environments
+#        - mountPath: /etc/localtime
+#          name: sdc-localtime
+#          readOnly: true
+#        - mountPath: /var/lib/jetty/logs
+#          name: sdc-logs
+#        ports:
+#        - containerPort: 9042
+#        - containerPort: 9160
+#        readinessProbe:
+#          tcpSocket:
+#            port: 9160
+#          initialDelaySeconds: 5
+#          periodSeconds: 10
+#      volumes:
+#        - name: sdc-sdc-cs-cs
+#          persistentVolumeClaim:
+#            claimName: sdc-cs-db
+#        - name: sdc-environments
+#          configMap:
+#            name : sdc-environments-configmap
+#            defaultMode: 0755
+#        - name: sdc-localtime
+#          hostPath:
+#            path:  /etc/localtime
+#        - name:  sdc-logs
+#          hostPath:
+#            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
+#      imagePullSecrets:
+#      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
+#
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-cs/templates/service.yaml b/kubernetes/sdc/charts/sdc-cs/templates/service.yaml
new file mode 100644 (file)
index 0000000..7380536
--- /dev/null
@@ -0,0 +1,31 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.externalPort1 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.externalPort1 }}
+      targetPort: {{ .Values.service.internalPort1 }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-cs/values.yaml b/kubernetes/sdc/charts/sdc-cs/values.yaml
new file mode 100644 (file)
index 0000000..2671ba1
--- /dev/null
@@ -0,0 +1,100 @@
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: openecomp/sdc-cassandra:v1.1.0
+
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+# Example:
+config:
+#  username: myusername
+#  password: mypassword
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: sdc-cs
+  externalPort: 9042
+  internalPort: 9042
+  externalPort: 9160
+  internalPort: 9160
+
+## Persist data to a persitent volume
+persistence:
+  enabled: true
+
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: /sdc/sdc-cs/CS
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdc/charts/sdc-es/.helmignore b/kubernetes/sdc/charts/sdc-es/.helmignore
new file mode 100644 (file)
index 0000000..c13e3c8
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-es/Chart.yaml b/kubernetes/sdc/charts/sdc-es/Chart.yaml
new file mode 100644 (file)
index 0000000..9319637
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: Elasticsearch - Service Design and Creation Helm charts
+name: sdc-es
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-es/resources/config/README.txt b/kubernetes/sdc/charts/sdc-es/resources/config/README.txt
new file mode 100644 (file)
index 0000000..5cc0149
--- /dev/null
@@ -0,0 +1,10 @@
+This directory contains all external configuration files that
+need to be mounted into an application container.
+
+See the configmap.yaml in the templates directory for an example
+of how to load (ie map) config files from this directory, into
+Kubernetes, for distribution within the k8s cluster.
+
+See deployment.yaml in the templates directory for an example
+of how the 'config mapped' files are then mounted into the
+containers.
diff --git a/kubernetes/sdc/charts/sdc-es/resources/config/application.properties b/kubernetes/sdc/charts/sdc-es/resources/config/application.properties
new file mode 100644 (file)
index 0000000..496a15a
--- /dev/null
@@ -0,0 +1 @@
+sampleConfigKey=sampleConfigValue
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-es/templates/NOTES.txt b/kubernetes/sdc/charts/sdc-es/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..2465e03
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  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.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -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 {{ 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/sdc/charts/sdc-es/templates/configmap.yaml b/kubernetes/sdc/charts/sdc-es/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..5b8dde2
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-es/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-es/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..ee3458b
--- /dev/null
@@ -0,0 +1,148 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - "sdc-es"
+        - --container-name
+        - "sdc-cs"
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#      - name: {{ include "common.name" . }}-job-completion
+#        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+#        imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
+#        command:
+#        - python
+#        args:
+#        - /root/readiness/sdc_check_job_completion.py
+#        - --job-name
+#        - sdc-config-cassandra
+#        env:
+#        - name: NAMESPACE
+#          valueFrom:
+#            fieldRef:
+#              apiVersion: v1
+#              fieldPath: metadata.namespace
+#        volumeMounts:
+#        - mountPath: /root/readiness
+#          name: sdc-check-job-completion
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          - containerPort: {{ .Values.service.internalPort1 }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          - name: ENVNAME
+            value: {{ .Values.global.env.name }}
+          - name: HOST_IP
+            valueFrom:
+              fieldRef:
+                fieldPath: status.podIP
+          volumeMounts:
+#          - name: sdc-sdc-es-es
+#            mountPath: /usr/share/elasticsearch/data/
+          - name: {{ include "common.fullname" . }}-environments
+            mountPath: /root/chef-solo/environments/
+          - name: {{ include "common.fullname" . }}-localtime
+            mountPath: /etc/localtime
+            readOnly: true
+          - name: {{ include "common.fullname" . }}-logs
+            mountPath: /var/lib/jetty/logs
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-logback
+            mountPath: /tmp/logback.xml
+          lifecycle:
+            postStart:
+              exec:
+                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+
+        # side car containers
+        - name: {{ include "common.name" . }}-filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - name: {{ include "common.fullname" . }}-filebeat-conf
+            mountPath: /usr/share/filebeat/filebeat.yml
+            subPath: filebeat.yml
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-data-filebeat
+            mountPath: /usr/share/filebeat/data
+      volumes:
+        - name: {{ include "common.fullname" . }}-localtime
+          hostPath:
+            path: /etc/localtime
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+           name: {{ include "common.fullname" . }}-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-logs-2
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-logback
+          configMap:
+            name : {{ include "common.fullname" . }}-log-be-configmap
+#        - name: sdc-sdc-es-es
+#          hostPath:
+#            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
+#        - name: sdc-environments
+          configMap:
+            name: {{ include "common.fullname" . }}-environments-configmap
+            defaultMode: 0755
+        - name:  {{ include "common.fullname" . }}-logs
+          hostPath:
+            path:  {{ .Values.dataRootDir }}/{{ include "common.namespace" . }}/sdc/logs
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-es/templates/sdc-es.yaml b/kubernetes/sdc/charts/sdc-es/templates/sdc-es.yaml
new file mode 100644 (file)
index 0000000..9e83b9e
--- /dev/null
@@ -0,0 +1,75 @@
+#apiVersion: extensions/v1beta1
+#kind: Deployment
+#metadata:
+#  labels:
+#    app: sdc-es
+#  name: sdc-es
+#  namespace: "{{ .Values.nsPrefix }}"
+#spec:
+#  selector:
+#    matchLabels:
+#      app: sdc-es
+#  template:
+#    metadata:
+#      labels:
+#        app: sdc-es
+#      name: sdc-es
+#    spec:
+#      initContainers:
+#      - name: sdc-logs-init
+#        image: {{ .Values.image.ubuntuInit }}
+#        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#        command:
+#        - /bin/bash
+#        - "-c"
+#        - |
+#          mkdir -p /ubuntu-init/ASDC/ASDC-ES/
+#          mkdir -p /ubuntu-init/ASDC/ASDC-CS/
+#          mkdir -p /ubuntu-init/ASDC/ASDC-KB/
+#          mkdir -p /ubuntu-init/ASDC/ASDC-BE/
+#          mkdir -p /ubuntu-init/ASDC/ASDC-FE/
+#          chmod -R 777 /ubuntu-init/
+#      containers:
+#      - image: {{ .Values.image.sdcElasticsearch }}
+#        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#        name: sdc-es
+#        env:
+#        - name: ENVNAME
+#          value: "AUTO"
+#        - name: HOST_IP
+#          valueFrom:
+#            fieldRef:
+#              fieldPath: status.podIP
+#        - name: ES_HEAP_SIZE
+#          value: "1024M"
+#        volumeMounts:
+#        - name: sdc-logs
+#          mountPath: /ubuntu-init/
+#        - mountPath: /root/chef-solo/environments/
+#          name: sdc-environments
+#        - mountPath: /etc/localtime
+#          name: sdc-localtime
+#          readOnly: true
+#        - mountPath: /var/lib/jetty/logs
+#          name: sdc-logs
+#        ports:
+#        - containerPort: 9200
+#        - containerPort: 9300
+#        readinessProbe:
+#          tcpSocket:
+#            port: 9200
+#          initialDelaySeconds: 5
+#          periodSeconds: 10
+#      volumes:
+#        - name: sdc-environments
+#          configMap :
+#            name : sdc-environments-configmap
+#            defaultMode: 0755
+#        - name: sdc-localtime
+#          hostPath:
+#            path:  /etc/localtime
+#        - name:  sdc-logs
+#          hostPath:
+#            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
+#      imagePullSecrets:
+#      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
diff --git a/kubernetes/sdc/charts/sdc-es/templates/service.yaml b/kubernetes/sdc/charts/sdc-es/templates/service.yaml
new file mode 100644 (file)
index 0000000..0fbaae9
--- /dev/null
@@ -0,0 +1,25 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-es/values.yaml b/kubernetes/sdc/charts/sdc-es/values.yaml
new file mode 100644 (file)
index 0000000..cf5cc9b
--- /dev/null
@@ -0,0 +1,76 @@
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: openecomp/sdc-elasticsearch:v1.1.0
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+# Example:
+config:
+#  username: myusername
+#  password: mypassword
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: sdc-es
+  externalPort: 9200
+  internalPort: 9200
+  externalPort: 9300
+  internalPort: 9300
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdc/charts/sdc-fe/.helmignore b/kubernetes/sdc/charts/sdc-fe/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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/kubernetes/sdc/charts/sdc-fe/Chart.yaml b/kubernetes/sdc/charts/sdc-fe/Chart.yaml
new file mode 100644 (file)
index 0000000..5491e79
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: UI - Service Design and Creation Helm charts
+name: sdc-fe
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-fe/resources/config/README.txt b/kubernetes/sdc/charts/sdc-fe/resources/config/README.txt
new file mode 100644 (file)
index 0000000..5cc0149
--- /dev/null
@@ -0,0 +1,10 @@
+This directory contains all external configuration files that
+need to be mounted into an application container.
+
+See the configmap.yaml in the templates directory for an example
+of how to load (ie map) config files from this directory, into
+Kubernetes, for distribution within the k8s cluster.
+
+See deployment.yaml in the templates directory for an example
+of how the 'config mapped' files are then mounted into the
+containers.
diff --git a/kubernetes/sdc/charts/sdc-fe/resources/config/application.properties b/kubernetes/sdc/charts/sdc-fe/resources/config/application.properties
new file mode 100644 (file)
index 0000000..496a15a
--- /dev/null
@@ -0,0 +1 @@
+sampleConfigKey=sampleConfigValue
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-fe/templates/NOTES.txt b/kubernetes/sdc/charts/sdc-fe/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..2465e03
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  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.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -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 {{ 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/sdc/charts/sdc-fe/templates/configmap.yaml b/kubernetes/sdc/charts/sdc-fe/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..5b8dde2
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..ee3458b
--- /dev/null
@@ -0,0 +1,148 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - "sdc-es"
+        - --container-name
+        - "sdc-cs"
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#      - name: {{ include "common.name" . }}-job-completion
+#        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+#        imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
+#        command:
+#        - python
+#        args:
+#        - /root/readiness/sdc_check_job_completion.py
+#        - --job-name
+#        - sdc-config-cassandra
+#        env:
+#        - name: NAMESPACE
+#          valueFrom:
+#            fieldRef:
+#              apiVersion: v1
+#              fieldPath: metadata.namespace
+#        volumeMounts:
+#        - mountPath: /root/readiness
+#          name: sdc-check-job-completion
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          - containerPort: {{ .Values.service.internalPort1 }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          - name: ENVNAME
+            value: {{ .Values.global.env.name }}
+          - name: HOST_IP
+            valueFrom:
+              fieldRef:
+                fieldPath: status.podIP
+          volumeMounts:
+#          - name: sdc-sdc-es-es
+#            mountPath: /usr/share/elasticsearch/data/
+          - name: {{ include "common.fullname" . }}-environments
+            mountPath: /root/chef-solo/environments/
+          - name: {{ include "common.fullname" . }}-localtime
+            mountPath: /etc/localtime
+            readOnly: true
+          - name: {{ include "common.fullname" . }}-logs
+            mountPath: /var/lib/jetty/logs
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-logback
+            mountPath: /tmp/logback.xml
+          lifecycle:
+            postStart:
+              exec:
+                command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+
+        # side car containers
+        - name: {{ include "common.name" . }}-filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - name: {{ include "common.fullname" . }}-filebeat-conf
+            mountPath: /usr/share/filebeat/filebeat.yml
+            subPath: filebeat.yml
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-data-filebeat
+            mountPath: /usr/share/filebeat/data
+      volumes:
+        - name: {{ include "common.fullname" . }}-localtime
+          hostPath:
+            path: /etc/localtime
+        - name: {{ include "common.fullname" . }}-filebeat-conf
+          configMap:
+           name: {{ include "common.fullname" . }}-filebeat-configmap
+        - name: {{ include "common.fullname" . }}-logs-2
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-data-filebeat
+          emptyDir: {}
+        - name: {{ include "common.fullname" . }}-logback
+          configMap:
+            name : {{ include "common.fullname" . }}-log-be-configmap
+#        - name: sdc-sdc-es-es
+#          hostPath:
+#            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
+#        - name: sdc-environments
+          configMap:
+            name: {{ include "common.fullname" . }}-environments-configmap
+            defaultMode: 0755
+        - name:  {{ include "common.fullname" . }}-logs
+          hostPath:
+            path:  {{ .Values.dataRootDir }}/{{ include "common.namespace" . }}/sdc/logs
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-fe/templates/sdc-fe.yaml b/kubernetes/sdc/charts/sdc-fe/templates/sdc-fe.yaml
new file mode 100644 (file)
index 0000000..5855ffe
--- /dev/null
@@ -0,0 +1,119 @@
+#apiVersion: extensions/v1beta1
+#kind: Deployment
+#metadata:
+#  labels:
+#    app: sdc-fe
+#  name: sdc-fe
+#  namespace: "{{ .Values.nsPrefix }}"
+#spec:
+#  selector:
+#    matchLabels:
+#      app: sdc-fe
+#  template:
+#    metadata:
+#      labels:
+#        app: sdc-fe
+#      name: sdc-fe
+#    spec:
+#      initContainers:
+#      - command:
+#        - /root/ready.py
+#        args:
+#        - --container-name
+#        - sdc-es
+#        - --container-name
+#        - sdc-cs
+#        - --container-name
+#        - sdc-kb
+#        - --container-name
+#        - sdc-be
+#        env:
+#        - name: NAMESPACE
+#          valueFrom:
+#            fieldRef:
+#              apiVersion: v1
+#              fieldPath: metadata.namespace
+#        image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}
+#        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#        name: sdc-fe-readiness
+#      containers:
+#      - name: sdc-fe
+#        env:
+#        - name: ENVNAME
+#          value: AUTO
+#        - name: HOST_IP
+#          valueFrom:
+#            fieldRef:
+#              fieldPath: status.podIP
+#        image: {{ .Values.image.sdcFrontend }}
+#        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#        volumeMounts:
+#        - mountPath: /usr/share/elasticsearch/data/
+#          name: sdc-sdc-es-es
+#        - mountPath: /root/chef-solo/environments/
+#          name: sdc-environments
+#        - mountPath: /etc/localtime
+#          name: sdc-localtime
+#          readOnly: true
+#        - mountPath: /var/lib/jetty/logs
+#          name: sdc-logs
+#        - mountPath: /var/log/onap
+#          name: sdc-logs-2
+#        - mountPath: /root/chef-solo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
+#          name: sdc-fe-config
+#          subPath: FE_2_setup_configuration.rb
+#        - mountPath: /tmp/logback.xml
+#          name: sdc-logback
+#        lifecycle:
+#          postStart:
+#            exec:
+#              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
+#        ports:
+#        - containerPort: 9443
+#        - containerPort: 8181
+#        readinessProbe:
+#          tcpSocket:
+#            port: 8181
+#          initialDelaySeconds: 5
+#          periodSeconds: 10
+#      - image: {{ .Values.image.filebeat }}
+#        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+#        name: filebeat-onap
+#        volumeMounts:
+#        - mountPath: /usr/share/filebeat/filebeat.yml
+#          name: filebeat-conf
+#          subPath: filebeat.yml
+#        - mountPath: /var/log/onap
+#          name: sdc-logs-2
+#        - mountPath: /usr/share/filebeat/data
+#          name: sdc-data-filebeat
+#      volumes:
+#        - name: filebeat-conf
+#          configMap:
+#           name : sdc-filebeat-configmap
+#        - name: sdc-logs-2
+#          emptyDir: {}
+#        - name: sdc-data-filebeat
+#          emptyDir: {}
+#        - name: sdc-logback
+#          configMap:
+#           name : sdc-log-fe-configmap
+#        - name: sdc-sdc-es-es
+#          hostPath:
+#            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
+#        - name: sdc-environments
+#          configMap:
+#            name: sdc-environments-configmap
+#            defaultMode: 0755
+#        - name: sdc-localtime
+#          hostPath:
+#            path:  /etc/localtime
+#        - name:  sdc-logs
+#          hostPath:
+#            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
+#        - name:  sdc-fe-config
+#          configMap:
+#            name: sdc-fe-configmap
+#            defaultMode: 0755
+#      imagePullSecrets:
+#      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-fe/templates/service.yaml b/kubernetes/sdc/charts/sdc-fe/templates/service.yaml
new file mode 100644 (file)
index 0000000..6c75a0f
--- /dev/null
@@ -0,0 +1,42 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    msb.onap.org/service-info: '[
+      {
+          "serviceName": "sdc-gui",
+          "version": "v1",
+          "url": "/sdc1",
+          "protocol": "UI",
+          "port": "8181",
+          "visualRange":"0|1"
+      }
+      ]'
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.externalPort1 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    - port: {{ .Values.service.externalPort1 }}
+      targetPort: {{ .Values.service.internalPort1 }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-fe/values.yaml b/kubernetes/sdc/charts/sdc-fe/values.yaml
new file mode 100644 (file)
index 0000000..598cb9e
--- /dev/null
@@ -0,0 +1,82 @@
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: openecomp/sdc-frontend:v1.1.0
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+# Example:
+config:
+#  username: myusername
+#  password: mypassword
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  #Example service definition with external, internal and node ports.
+  #Services may use any combination of ports depending on the 'type' of
+  #service being defined.
+  type: NodePort
+  name: sdc-fe
+  externalPort: 9443
+  internalPort: 9443
+  nodePort: 07
+  externalPort1: 8181
+  internalPort1: 8181
+  nodePort1: 06
+
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdc/charts/sdc-kb/.helmignore b/kubernetes/sdc/charts/sdc-kb/.helmignore
new file mode 100644 (file)
index 0000000..b9208e2
--- /dev/null
@@ -0,0 +1,25 @@
+# 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
+
+
+#TODO:REMOVE
+sdc-kb.yaml
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-kb/Chart.yaml b/kubernetes/sdc/charts/sdc-kb/Chart.yaml
new file mode 100644 (file)
index 0000000..9360131
--- /dev/null
@@ -0,0 +1,4 @@
+apiVersion: v1
+description: Kibana - Service Design and Creation Helm charts
+name: sdc-kb
+version: 2.0.0
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-kb/resources/config/README.txt b/kubernetes/sdc/charts/sdc-kb/resources/config/README.txt
new file mode 100644 (file)
index 0000000..5cc0149
--- /dev/null
@@ -0,0 +1,10 @@
+This directory contains all external configuration files that
+need to be mounted into an application container.
+
+See the configmap.yaml in the templates directory for an example
+of how to load (ie map) config files from this directory, into
+Kubernetes, for distribution within the k8s cluster.
+
+See deployment.yaml in the templates directory for an example
+of how the 'config mapped' files are then mounted into the
+containers.
diff --git a/kubernetes/sdc/charts/sdc-kb/resources/config/application.properties b/kubernetes/sdc/charts/sdc-kb/resources/config/application.properties
new file mode 100644 (file)
index 0000000..496a15a
--- /dev/null
@@ -0,0 +1 @@
+sampleConfigKey=sampleConfigValue
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-kb/templates/NOTES.txt b/kubernetes/sdc/charts/sdc-kb/templates/NOTES.txt
new file mode 100644 (file)
index 0000000..0878f5c
--- /dev/null
@@ -0,0 +1,19 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range .Values.ingress.hosts }}
+  http://{{ . }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.fullname" . }})
+  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.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.fullname" . }} -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 {{ include "common.namespace" . }} -l "app={{ include "common.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/sdc/charts/sdc-kb/templates/configmap.yaml b/kubernetes/sdc/charts/sdc-kb/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..5b8dde2
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-kb/templates/deployment.yaml b/kubernetes/sdc/charts/sdc-kb/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..e1fb709
--- /dev/null
@@ -0,0 +1,106 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      initContainers:
+      - name: {{ include "common.name" . }}-readiness
+        command:
+        - /root/ready.py
+        args:
+        - --container-name
+        - "sdc-es"
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.internalPort }}
+          # disable liveness probe when breakpoints set in debugger
+          # so K8s doesn't restart unresponsive container
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.internalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          - name: ENVNAME
+            value: {{ .Values.global.env.name }}
+          - name: HOST_IP
+            valueFrom:
+              fieldRef:
+                fieldPath: status.podIP
+          - name: ELASTICSEARCH_URL
+            # TODO: Parameterize this somehow
+            value: http://sdc-es:9200
+          volumeMounts:
+          - name: {{ include "common.fullname" . }}-environments
+            mountPath: /root/chef-solo/environments/
+          - name: {{ include "common.fullname" . }}-localtime
+            mountPath: /etc/localtime
+            readOnly: true
+          - name: {{ include "common.fullname" . }}-logs
+            mountPath: /var/lib/jetty/logs
+          resources:
+{{ toYaml .Values.resources | indent 12 }}
+        {{- if .Values.nodeSelector }}
+        nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+        {{- end -}}
+        {{- if .Values.affinity }}
+        affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+        {{- end }}
+
+        # side car containers
+        - name: {{ include "common.name" . }}-filebeat-onap
+          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          volumeMounts:
+          - name: {{ include "common.fullname" . }}-filebeat-conf
+            mountPath: /usr/share/filebeat/filebeat.yml
+            subPath: filebeat.yml
+          - name: {{ include "common.fullname" . }}-logs-2
+            mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-data-filebeat
+            mountPath: /usr/share/filebeat/data
+      volumes:
+        - name: {{ include "common.fullname" . }}-localtime
+          hostPath:
+            path: /etc/localtime
+        - name: sdc-environments
+          configMap:
+            name: {{ .Release.Name }}-sdc-environments-configmap
+            defaultMode: 0755
+        - name: {{ include "common.fullname" . }}-logs
+          emptyDir: {}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-kb/templates/service.yaml b/kubernetes/sdc/charts/sdc-kb/templates/service.yaml
new file mode 100644 (file)
index 0000000..0fbaae9
--- /dev/null
@@ -0,0 +1,25 @@
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.name }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.name }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/kubernetes/sdc/charts/sdc-kb/values.yaml b/kubernetes/sdc/charts/sdc-kb/values.yaml
new file mode 100644 (file)
index 0000000..710f5c7
--- /dev/null
@@ -0,0 +1,74 @@
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ==
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:1.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+repository: nexus3.onap.org:10001
+image: openecomp/sdc-kibana:v1.1.0
+pullPolicy: Always
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+# Example:
+config:
+#  username: myusername
+#  password: mypassword
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+service:
+  type: ClusterIP
+  name: sdc-kb
+  externalPort: 5601
+  internalPort: 5601
+
+ingress:
+  enabled: false
+
+resources: {}
+  # We usually recommend not to specify default resources and to leave this as a conscious
+  # choice for the user. This also increases chances charts run on environments with little
+  # resources, such as Minikube. If you do want to specify resources, uncomment the following
+  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
+  #
+  # Example:
+  # Configure resource requests and limits
+  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
+  # Minimum memory for development is 2 CPU cores and 4GB memory
+  # Minimum memory for production is 4 CPU cores and 8GB memory
+#resources:
+#  limits:
+#    cpu: 2
+#    memory: 4Gi
+#  requests:
+#    cpu: 2
+#    memory: 4Gi
diff --git a/kubernetes/sdc/requirements.yaml b/kubernetes/sdc/requirements.yaml
new file mode 100644 (file)
index 0000000..acca8ef
--- /dev/null
@@ -0,0 +1,4 @@
+dependencies:
+  - name: common
+    version: ~2.0.0
+    repository: '@local'
\ No newline at end of file
index d35590e..45f4155 100755 (executable)
@@ -8,34 +8,34 @@
    "chef_type": "environment",
 
    "default_attributes": {
-        "CS_VIP": "sdc-cs.{{.Values.nsPrefix}}",
-        "BE_VIP": "sdc-be.{{.Values.nsPrefix}}",
-        "FE_VIP": "sdc-fe.{{.Values.nsPrefix}}",
-        "ES_VIP": "sdc-es.{{.Values.nsPrefix}}",
+        "CS_VIP": "sdc-cs.{{include "common.namespace" .}}",
+        "BE_VIP": "sdc-be.{{include "common.namespace" .}}",
+        "FE_VIP": "sdc-fe.{{include "common.namespace" .}}",
+        "ES_VIP": "sdc-es.{{include "common.namespace" .}}",
         "interfaces": {
             "application": "eth0",
             "private": "eth0"
         },
                 "ECompP": {
-                    "ecomp_rest_url": "http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/auxapi",
-            "ueb_url_list": "dmaap.{{.Values.nsPrefix}}, dmaap.{{.Values.nsPrefix}}",
+                    "ecomp_rest_url": "http://portalapps.{{include "common.namespace" .}}:8989/ONAPPORTAL/auxapi",
+            "ueb_url_list": "dmaap.{{include "common.namespace" .}}, dmaap.{{include "common.namespace" .}}",
             "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu",
             "app_key": "x9UfO7JsDn8BESVX",
             "inbox_name": "ECOMP-PORTAL-INBOX",
-            "ecomp_redirect_url": "http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/login.htm",
+            "ecomp_redirect_url": "http://portalapps.{{include "common.namespace" .}}:8989/ONAPPORTAL/login.htm",
             "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1",
                         "decryption_key": "AGLDdG4D04BKm2IxIWEr8o=="
         },
         "UEB": {
             "PublicKey": "iPIxkpAMI8qTcQj8",
             "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal",
-            "fqdn": ["dmaap.{{.Values.nsPrefix}}", "dmaap.{{.Values.nsPrefix}}"]
+            "fqdn": ["dmaap.{{include "common.namespace" .}}", "dmaap.{{include "common.namespace" .}}"]
         },
         "Nodes": {
-            "CS": "sdc-cs.{{.Values.nsPrefix}}",
-            "BE": "sdc-be.{{.Values.nsPrefix}}",
-            "FE": "sdc-fe.{{.Values.nsPrefix}}",
-            "ES": "sdc-es.{{.Values.nsPrefix}}"
+            "CS": "sdc-cs.{{include "common.namespace" .}}",
+            "BE": "sdc-be.{{include "common.namespace" .}}",
+            "FE": "sdc-fe.{{include "common.namespace" .}}",
+            "ES": "sdc-es.{{include "common.namespace" .}}"
         }
     },
     "override_attributes": {
index 247e990..cb173ab 100755 (executable)
             "private": "eth1"
         },
                "ECompP": {
-                   "ecomp_rest_url": "http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/auxapi",
-            "ueb_url_list": "dmaap.{{.Values.nsPrefix}},dmaap.{{.Values.nsPrefix}}", 
+                   "ecomp_rest_url": "http://portalapps.{{include "common.namespace" .}}:8989/ONAPPORTAL/auxapi",
+            "ueb_url_list": "dmaap.{{include "common.namespace" .}},dmaap.{{include "common.namespace" .}}", 
             "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu", 
             "app_key": "x9UfO7JsDn8BESVX", 
             "inbox_name": "ECOMP-PORTAL-INBOX", 
-            "ecomp_redirect_url": "http://portalapps.{{.Values.nsPrefix}}:8989/ONAPPORTAL/login.htm", 
+            "ecomp_redirect_url": "http://portalapps.{{include "common.namespace" .}}:8989/ONAPPORTAL/login.htm", 
             "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1",
                        "decryption_key": "AGLDdG4D04BKm2IxIWEr8o=="
         }, 
         "UEB": {
             "PublicKey": "iPIxkpAMI8qTcQj8",
             "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal",
-            "fqdn": ["dmaap.{{.Values.nsPrefix}}", "dmaap.{{.Values.nsPrefix}}"]
+            "fqdn": ["dmaap.{{include "common.namespace" .}}", "dmaap.{{include "common.namespace" .}}"]
         },
         "Nodes": {
             "CS": "yyy",
index 89c6932..48dfde8 100644 (file)
@@ -21,7 +21,7 @@ output.logstash:
   #List of logstash server ip addresses with port number.
   #But, in our case, this will be the loadbalancer IP address.
   #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
-  hosts: ["logstash.{{.Values.nsPrefix}}:5044"]
+  hosts: ["logstash.{{include "common.namespace" .}}:5044"]
   #If enable will do load balancing among availabe Logstash, automatically.
   loadbalance: true
 
index 5c233a2..3dc4b56 100755 (executable)
@@ -7,7 +7,7 @@ template "catalog-fe-config" do
    mode "0755"
    variables({
       :fe_host_ip   => node['HOST_IP'],
-      :be_host_ip   => "sdc-be.{{.Values.nsPrefix}}",
+      :be_host_ip   => "sdc-be.{{include "common.namespace" .}}",
       :catalog_port => node['BE'][:http_port],
       :ssl_port     => node['BE'][:https_port]
    })
diff --git a/kubernetes/sdc/templates/all-services.yaml b/kubernetes/sdc/templates/all-services.yaml
deleted file mode 100644 (file)
index 247ee03..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-#{{ if not .Values.disableSdcSdcEs }}
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: sdc-es
-  name: sdc-es
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  ports:
-  - name: sdc-es-port-9200
-    port: 9200
-  - name: sdc-es-port-9300
-    port: 9300
-  selector:
-    app: sdc-es
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableSdcSdcCs }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: sdc-cs
-  name: sdc-cs
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  ports:
-  - name: sdc-cs-port-9042
-    port: 9042
-  - name: sdc-cs-port-9160
-    port: 9160
-  selector:
-    app: sdc-cs
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableSdcSdcKb }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: sdc-kb
-  name: sdc-kb
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  ports:
-  - name: sdc-kb-port-5601
-    port: 5601
-  selector:
-    app: sdc-kb
-  clusterIP: None
-#{{ end }}
-#{{ if not .Values.disableSdcSdcBe }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: sdc-be
-  name: sdc-be
-  namespace: "{{ .Values.nsPrefix }}"
-  annotations:
-    msb.onap.org/service-info: '[
-      {
-          "serviceName": "sdc",
-          "version": "v1",
-          "url": "/sdc/v1",
-          "protocol": "REST",
-          "port": "8080",
-          "visualRange":"1"
-      },
-      {
-          "serviceName": "sdc-deprecated",
-          "version": "v1",
-          "url": "/sdc/v1",
-          "protocol": "REST",
-          "port": "8080",
-          "visualRange":"1",
-          "path":"/sdc/v1"
-      }
-      ]'
-spec:
-  ports:
-  - name: sdc-be-port-8443
-    nodePort: {{ .Values.nodePortPrefix }}04
-    port: 8443
-  - name: sdc-be-port-8080
-    nodePort: {{ .Values.nodePortPrefix }}05
-    port: 8080
-  selector:
-    app: sdc-be
-  type: NodePort
-#{{ end }}
-#{{ if not .Values.disableSdcSdcFe }}
----
-apiVersion: v1
-kind: Service
-metadata:
-  labels:
-    app: sdc-fe
-  name: sdc-fe
-  namespace: "{{ .Values.nsPrefix }}"
-  annotations:
-    msb.onap.org/service-info: '[
-      {
-          "serviceName": "sdc-gui",
-          "version": "v1",
-          "url": "/sdc1",
-          "protocol": "UI",
-          "port": "8181",
-          "visualRange":"0|1"
-      }
-      ]'
-spec:
-  ports:
-  - name: sdc-fe-port-9443
-    nodePort: {{ .Values.nodePortPrefix }}07
-    port: 9443
-  - name: sdc-fe-port-8181
-    nodePort: {{ .Values.nodePortPrefix }}06
-    port: 8181
-  selector:
-    app: sdc-fe
-  type: NodePort
-#{{ end }}
\ No newline at end of file
diff --git a/kubernetes/sdc/templates/configmap.yaml b/kubernetes/sdc/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..3082e51
--- /dev/null
@@ -0,0 +1,7 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ .Release.Name }}-sdc-environments-configmap
+  namespace: {{ include "common.namespace" . }}
+data:
+{{ tpl (.Files.Glob "resources/config/environments/*").AsConfig . | indent 2 }}
\ No newline at end of file
diff --git a/kubernetes/sdc/templates/sdc-be.yaml b/kubernetes/sdc/templates/sdc-be.yaml
deleted file mode 100644 (file)
index d075277..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-#{{ if not .Values.disableSdcSdcBe }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: sdc-be
-  name: sdc-be
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  selector:
-    matchLabels:
-      app: sdc-be
-  template:
-    metadata:
-      labels:
-        app: sdc-be
-      name: sdc-be
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - sdc-es
-        - --container-name
-        - sdc-cs
-        - --container-name
-        - sdc-kb
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-be-readiness
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - dmaap
-        env:
-        - name: NAMESPACE
-          value: {{ .Values.nsPrefix }}
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-dmaap-readiness
-      containers:
-      - env:
-        - name: ENVNAME
-          value: AUTO
-        - name: HOST_IP
-          valueFrom:
-            fieldRef:
-              fieldPath: status.podIP
-        image: {{ .Values.image.sdcBackend }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-be
-        volumeMounts:
-        - mountPath: /usr/share/elasticsearch/data/
-          name: sdc-sdc-es-es
-        - mountPath: /root/chef-solo/environments/
-          name: sdc-environments
-        - mountPath: /etc/localtime
-          name: sdc-localtime
-          readOnly: true
-        - mountPath: /var/lib/jetty/logs
-          name: sdc-logs
-        - mountPath: /var/log/onap
-          name: sdc-logs-2
-        - mountPath: /tmp/logback.xml
-          name: sdc-logback
-        lifecycle:
-          postStart:
-            exec:
-              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
-        ports:
-        - containerPort: 8443
-        - containerPort: 8080
-        readinessProbe:
-          tcpSocket:
-            port: 8443
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - image: {{ .Values.image.filebeat }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: filebeat-onap
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          name: filebeat-conf
-          subPath: filebeat.yml
-        - mountPath: /var/log/onap
-          name: sdc-logs-2
-        - mountPath: /usr/share/filebeat/data
-          name: sdc-data-filebeat
-      volumes:
-        - name: filebeat-conf
-          configMap:
-           name: sdc-filebeat-configmap
-        - name: sdc-logs-2
-          emptyDir: {}
-        - name: sdc-data-filebeat
-          emptyDir: {}
-        - name: sdc-logback
-          configMap:
-            name : sdc-log-be-configmap
-        - name: sdc-sdc-es-es
-          hostPath:
-            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
-        - name: sdc-environments
-          configMap:
-            name: sdc-environments-configmap
-            defaultMode: 0755
-        - name: sdc-localtime
-          hostPath:
-            path:  /etc/localtime
-        - name:  sdc-logs
-          hostPath:
-            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-cs.yaml b/kubernetes/sdc/templates/sdc-cs.yaml
deleted file mode 100644 (file)
index bf86de6..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#{{ if not .Values.disableSdcSdcCs }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: sdc-cs
-  name: sdc-cs
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  selector:
-    matchLabels:
-      app: sdc-cs
-  template:
-    metadata:
-      labels:
-        app: sdc-cs
-      name: sdc-cs
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - sdc-es
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-cs-readiness
-      containers:
-      - env:
-        - name: ENVNAME
-          value: AUTO
-        - name: HOST_IP
-          valueFrom:
-            fieldRef:
-              fieldPath: status.podIP
-        - name: ES_HEAP_SIZE
-          value: "1024M"
-        image: {{ .Values.image.sdcCassandra }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-cs
-        volumeMounts:
-        - mountPath: /var/lib/cassandra/
-          name: sdc-sdc-cs-cs
-        - mountPath: /root/chef-solo/environments/
-          name: sdc-environments
-        - mountPath: /etc/localtime
-          name: sdc-localtime
-          readOnly: true
-        - mountPath: /var/lib/jetty/logs
-          name: sdc-logs
-        ports:
-        - containerPort: 9042
-        - containerPort: 9160
-        readinessProbe:
-          tcpSocket:
-            port: 9160
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      volumes:
-        - name: sdc-sdc-cs-cs
-          persistentVolumeClaim:
-            claimName: sdc-cs-db
-        - name: sdc-environments
-          configMap:
-            name : sdc-environments-configmap
-            defaultMode: 0755
-        - name: sdc-localtime
-          hostPath:
-            path:  /etc/localtime
-        - name:  sdc-logs
-          hostPath:
-            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-environments-configmap.yaml b/kubernetes/sdc/templates/sdc-environments-configmap.yaml
deleted file mode 100644 (file)
index e1ff558..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#{{ if not .Values.disableSdcSdcBe }}
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: sdc-environments-configmap
-  namespace: {{ .Values.nsPrefix }}
-data:
-{{ tpl (.Files.Glob "resources/config/environments/*").AsConfig . | indent 2 }}
-#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-es.yaml b/kubernetes/sdc/templates/sdc-es.yaml
deleted file mode 100644 (file)
index 979c70d..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#{{ if not .Values.disableSdcSdcEs }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: sdc-es
-  name: sdc-es
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  selector:
-    matchLabels:
-      app: sdc-es
-  template:
-    metadata:
-      labels:
-        app: sdc-es
-      name: sdc-es
-    spec:
-      initContainers:
-      - name: sdc-logs-init
-        image: {{ .Values.image.ubuntuInit }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        command:
-        - /bin/bash
-        - "-c"
-        - |
-          mkdir -p /ubuntu-init/ASDC/ASDC-ES/
-          mkdir -p /ubuntu-init/ASDC/ASDC-CS/
-          mkdir -p /ubuntu-init/ASDC/ASDC-KB/
-          mkdir -p /ubuntu-init/ASDC/ASDC-BE/
-          mkdir -p /ubuntu-init/ASDC/ASDC-FE/
-          chmod -R 777 /ubuntu-init/
-      containers:
-      - image: {{ .Values.image.sdcElasticsearch }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-es
-        env:
-        - name: ENVNAME
-          value: "AUTO"
-        - name: HOST_IP
-          valueFrom:
-            fieldRef:
-              fieldPath: status.podIP
-        - name: ES_HEAP_SIZE
-          value: "1024M"
-        volumeMounts:
-        - name: sdc-logs
-          mountPath: /ubuntu-init/
-        - mountPath: /root/chef-solo/environments/
-          name: sdc-environments
-        - mountPath: /etc/localtime
-          name: sdc-localtime
-          readOnly: true
-        - mountPath: /var/lib/jetty/logs
-          name: sdc-logs
-        ports:
-        - containerPort: 9200
-        - containerPort: 9300
-        readinessProbe:
-          tcpSocket:
-            port: 9200
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      volumes:
-        - name: sdc-environments
-          configMap :
-            name : sdc-environments-configmap
-            defaultMode: 0755
-        - name: sdc-localtime
-          hostPath:
-            path:  /etc/localtime
-        - name:  sdc-logs
-          hostPath:
-            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-fe.yaml b/kubernetes/sdc/templates/sdc-fe.yaml
deleted file mode 100644 (file)
index adcec19..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-#{{ if not .Values.disableSdcSdcFe }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: sdc-fe
-  name: sdc-fe
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  selector:
-    matchLabels:
-      app: sdc-fe
-  template:
-    metadata:
-      labels:
-        app: sdc-fe
-      name: sdc-fe
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - sdc-es
-        - --container-name
-        - sdc-cs
-        - --container-name
-        - sdc-kb
-        - --container-name
-        - sdc-be
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-fe-readiness
-      containers:
-      - name: sdc-fe
-        env:
-        - name: ENVNAME
-          value: AUTO
-        - name: HOST_IP
-          valueFrom:
-            fieldRef:
-              fieldPath: status.podIP
-        image: {{ .Values.image.sdcFrontend }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        volumeMounts:
-        - mountPath: /usr/share/elasticsearch/data/
-          name: sdc-sdc-es-es
-        - mountPath: /root/chef-solo/environments/
-          name: sdc-environments
-        - mountPath: /etc/localtime
-          name: sdc-localtime
-          readOnly: true
-        - mountPath: /var/lib/jetty/logs
-          name: sdc-logs
-        - mountPath: /var/log/onap
-          name: sdc-logs-2
-        - mountPath: /root/chef-solo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb
-          name: sdc-fe-config
-          subPath: FE_2_setup_configuration.rb
-        - mountPath: /tmp/logback.xml
-          name: sdc-logback
-        lifecycle:
-          postStart:
-            exec:
-              command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
-        ports:
-        - containerPort: 9443
-        - containerPort: 8181
-        readinessProbe:
-          tcpSocket:
-            port: 8181
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      - image: {{ .Values.image.filebeat }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: filebeat-onap
-        volumeMounts:
-        - mountPath: /usr/share/filebeat/filebeat.yml
-          name: filebeat-conf
-          subPath: filebeat.yml
-        - mountPath: /var/log/onap
-          name: sdc-logs-2
-        - mountPath: /usr/share/filebeat/data
-          name: sdc-data-filebeat
-      volumes:
-        - name: filebeat-conf
-          configMap:
-           name : sdc-filebeat-configmap
-        - name: sdc-logs-2
-          emptyDir: {}
-        - name: sdc-data-filebeat
-          emptyDir: {}
-        - name: sdc-logback
-          configMap:
-           name : sdc-log-fe-configmap
-        - name: sdc-sdc-es-es
-          hostPath:
-            path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-es/ES
-        - name: sdc-environments
-          configMap:
-            name: sdc-environments-configmap
-            defaultMode: 0755
-        - name: sdc-localtime
-          hostPath:
-            path:  /etc/localtime
-        - name:  sdc-logs
-          hostPath:
-            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
-        - name:  sdc-fe-config
-          configMap:
-            name: sdc-fe-configmap
-            defaultMode: 0755
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-kb.yaml b/kubernetes/sdc/templates/sdc-kb.yaml
deleted file mode 100644 (file)
index 90fc6f2..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#{{ if not .Values.disableSdcSdcKb }}
-apiVersion: extensions/v1beta1
-kind: Deployment
-metadata:
-  labels:
-    app: sdc-kb
-  name: sdc-kb
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  selector:
-    matchLabels:
-      app: sdc-kb
-  template:
-    metadata:
-      labels:
-        app: sdc-kb
-      name: sdc-kb
-    spec:
-      initContainers:
-      - command:
-        - /root/ready.py
-        args:
-        - --container-name
-        - sdc-es
-        - --container-name
-        - sdc-cs
-        env:
-        - name: NAMESPACE
-          valueFrom:
-            fieldRef:
-              apiVersion: v1
-              fieldPath: metadata.namespace
-        image: {{ .Values.image.readiness }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-kb-readiness
-      containers:
-      - env:
-        - name: ENVNAME
-          value: AUTO
-        - name: ELASTICSEARCH_URL
-          value: http://sdc-es:9200
-        image: {{ .Values.image.sdcKibana }}
-        imagePullPolicy: {{ .Values.pullPolicy }}
-        name: sdc-kb
-        volumeMounts:
-        - mountPath: /root/chef-solo/environments/
-          name: sdc-environments
-        - mountPath: /etc/localtime
-          name: sdc-localtime
-          readOnly: true
-        - mountPath: /var/lib/jetty/logs
-          name: sdc-logs
-        ports:
-        - containerPort: 5601
-        readinessProbe:
-          tcpSocket:
-            port: 5601
-          initialDelaySeconds: 5
-          periodSeconds: 10
-      volumes:
-        - name: sdc-environments
-          configMap:
-            name: sdc-environments-configmap
-            defaultMode: 0755
-        - name: sdc-localtime
-          hostPath:
-            path:  /etc/localtime
-        - name:  sdc-logs
-          hostPath:
-            path:  {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/logs
-      imagePullSecrets:
-      - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
diff --git a/kubernetes/sdc/templates/sdc-pv-pvc.yaml b/kubernetes/sdc/templates/sdc-pv-pvc.yaml
deleted file mode 100644 (file)
index 8d9becf..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#{{ if not .Values.disableSdcSdcCs }}
-apiVersion: v1
-kind: PersistentVolume
-metadata:
-  name: "{{ .Values.nsPrefix }}-sdc"
-  namespace: "{{ .Values.nsPrefix }}"
-  labels:
-    name: "{{ .Values.nsPrefix }}-sdc"
-spec:
-  capacity:
-    storage: 2Gi
-  accessModes:
-    - ReadWriteMany
-  persistentVolumeReclaimPolicy: Retain
-  hostPath:
-    path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdc/sdc-cs/CS
----
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
-  name: sdc-cs-db
-  namespace: "{{ .Values.nsPrefix }}"
-spec:
-  accessModes:
-    - ReadWriteMany
-  resources:
-    requests:
-      storage: 2Gi
-  selector:
-    matchLabels:
-      name: "{{ .Values.nsPrefix }}-sdc"
-#{{ end }}
index d42abcc..afb9c4b 100644 (file)
@@ -1,13 +1,16 @@
-nsPrefix: onap
+#nsPrefix: onap
 pullPolicy: Always
 nodePortPrefix: 302
 dataRootDir: /dockerdata-nfs
-image:
-  readiness: oomk8s/readiness-check:1.1.0
-  sdcKibana: nexus3.onap.org:10001/openecomp/sdc-kibana:v1.1.0
-  sdcFrontend: nexus3.onap.org:10001/openecomp/sdc-frontend:v1.1.0
-  sdcElasticsearch: nexus3.onap.org:10001/openecomp/sdc-elasticsearch:v1.1.0
-  sdcCassandra: nexus3.onap.org:10001/openecomp/sdc-cassandra:v1.1.0
-  sdcBackend: nexus3.onap.org:10001/openecomp/sdc-backend:v1.1.0
-  filebeat: docker.elastic.co/beats/filebeat:5.5.0
-  ubuntuInit: oomk8s/ubuntu-init:1.0.0
+#image:
+#  readiness: oomk8s/readiness-check:1.1.0
+#  filebeat: docker.elastic.co/beats/filebeat:5.5.0
+#  ubuntuInit: oomk8s/ubuntu-init:1.0.0
+global:
+  env:
+    name: AUTO
+
+secrets:
+    sdc_user: YXNkY191c2Vy
+    sdc_password: QWExMjM0JV4h
+    cs_password: b25hcDEyMyNAIQ==