summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2018-05-15 10:45:02 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-15 10:45:02 +0000
commit988a1188bfa06657e89262e67339e616bfad7764 (patch)
tree4fe3222a0e61536f39d3c9a19f9d232d7137cf64 /kubernetes
parent1fda96895b4e2d6debbcf6fe34a638d537e0a592 (diff)
parentca210a9856321996ff03f0067e7e9f06248b3bf4 (diff)
Merge "Correcting message-router topic seeding"
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/deployment.yaml27
-rw-r--r--kubernetes/dmaap/charts/message-router/charts/message-router-kafka/values.yaml11
-rw-r--r--kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/deployment.yaml27
-rw-r--r--kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/values.yaml10
4 files changed, 47 insertions, 28 deletions
diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/deployment.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/deployment.yaml
index 25ab2101cf..f514dd1315 100644
--- a/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/deployment.yaml
+++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/templates/deployment.yaml
@@ -31,17 +31,24 @@ spec:
release: {{ .Release.Name }}
spec:
initContainers:
- - command:
- - bash
- args:
+ - name: {{ include "common.name" . }}-seed-kafka-topics
+ command:
+ - /bin/bash
- -c
- - "if [ -d /var/tmp/SDC-DISTR-NOTIF-TOPIC-SDC-OPENSOURCE-ENV1-0 ]; then echo nothing to do; else cp -a /opt/config/src/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/* /var/tmp/; fi"
- image: "{{ .Values.global.configRepository }}/{{ .Values.global.configImage }}"
+ - >
+ if [ -d /tmp/topics/ECOMP-PORTAL-INBOX-0 ]; then
+ echo "nothing to do";
+ else
+ git clone -b {{ .Values.config.gerritBranch }} --single-branch {{ .Values.config.gerritProject }} /tmp/gerrit;
+ echo "Clone complete. Copying from /tmp/gerrit/oom-projects/data-kafka/kafka-logs/* to /tmp/topics";
+ cp -var /tmp/gerrit/oom-topics/data-kafka/kafka-logs/* /tmp/topics;
+ echo "Done.";
+ fi
+ image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- - mountPath: /var/tmp
+ - mountPath: /tmp/topics
name: kafka-data
- name: kafka-primer
- command:
- /root/ready.py
args:
@@ -62,15 +69,13 @@ spec:
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 }}
+ {{ if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
- {{ end -}}
+ {{ end }}
readinessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/values.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/values.yaml
index bf5ee4c4e8..d6a8c2c03c 100644
--- a/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/values.yaml
+++ b/kubernetes/dmaap/charts/message-router/charts/message-router-kafka/values.yaml
@@ -21,9 +21,8 @@ global:
readinessImage: readiness-check:2.0.0
loggingRepository: docker.elastic.co
loggingImage: beats/filebeat:5.5.0
- configRepository: oomk8s
- configImage: config-init:2.0.0-SNAPSHOT
persistence: {}
+ ubuntuInitRepository: registry.hub.docker.com
#################################################################
# Application configuration defaults.
@@ -32,6 +31,7 @@ global:
repository: docker.io
image: wurstmeister/kafka:1.1.0
pullPolicy: Always
+ubuntuInitImage: oomk8s/ubuntu-init:2.0.0
zookeeper:
name: message-router-zookeeper
@@ -41,7 +41,12 @@ zookeeper:
debugEnabled: false
# application configuration
-config: {}
+config:
+ # gerrit branch where the latest code is checked in
+ gerritBranch: master
+ # gerrit project where the latest code is checked in
+ gerritProject: http://gerrit.onap.org/r/dmaap/messagerouter/messageservice.git
+
# default number of instances
replicaCount: 1
diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/deployment.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/deployment.yaml
index 678b83e3bd..327afca767 100644
--- a/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/deployment.yaml
+++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/templates/deployment.yaml
@@ -31,32 +31,37 @@ spec:
release: {{ .Release.Name }}
spec:
initContainers:
- - command:
- - bash
- args:
+ - name: {{ include "common.name" . }}-seed-zookeeper-topics
+ command:
+ - /bin/bash
- -c
- - "if [ -d /var/tmp/version-2 ]; then echo nothing to do; else cp -a /opt/config/src/message-router/dcae-startup-vm-message-router/docker_files/data-zookeeper/* /var/tmp/; fi"
- image: "{{ .Values.global.configRepository }}/{{ .Values.global.configImage }}"
+ - >
+ if [ -d /tmp/topics/version-2 ]; then
+ echo "nothing to do";
+ else
+ git clone -b {{ .Values.config.gerritBranch }} --single-branch {{ .Values.config.gerritProject }} /tmp/gerrit;
+ echo "Clone complete. Copying from /tmp/gerrit/oom-projects/data-zookeeper/* to /tmp/topics";
+ cp -var /tmp/gerrit/oom-topics/data-zookeeper/* /tmp/topics;
+ echo "Done.";
+ fi
+ image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
- - mountPath: /var/tmp
+ - mountPath: /tmp/topics
name: zookeeper-data
- name: zookeeper-primer
containers:
- name: {{ include "common.name" . }}
image: "{{ include "common.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 }}
+ {{ if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
- {{ end -}}
+ {{ end }}
readinessProbe:
tcpSocket:
port: {{ .Values.service.internalPort }}
diff --git a/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/values.yaml b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/values.yaml
index 93ba66576d..a71b14a046 100644
--- a/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/values.yaml
+++ b/kubernetes/dmaap/charts/message-router/charts/message-router-zookeeper/values.yaml
@@ -21,8 +21,7 @@ global:
readinessImage: readiness-check:2.0.0
loggingRepository: docker.elastic.co
loggingImage: beats/filebeat:5.5.0
- configRepository: oomk8s
- configImage: config-init:2.0.0-SNAPSHOT
+ ubuntuInitRepository: registry.hub.docker.com
persistence: {}
#################################################################
@@ -32,12 +31,17 @@ global:
repository: docker.io
image: wurstmeister/zookeeper:latest
pullPolicy: Always
+ubuntuInitImage: oomk8s/ubuntu-init:2.0.0
# flag to enable debugging - application support required
debugEnabled: false
# application configuration
-config: {}
+config:
+ # gerrit branch where the latest code is checked in
+ gerritBranch: master
+ # gerrit project where the latest code is checked in
+ gerritProject: http://gerrit.onap.org/r/dmaap/messagerouter/messageservice.git
# default number of instances
replicaCount: 1