summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/README_HELM2
-rw-r--r--kubernetes/aai/resources/config/log/model-loader/logback.xml (renamed from kubernetes/aai/resources/model-loader/conf/logback.xml)0
-rw-r--r--kubernetes/aai/resources/config/log/resources/logback.xml (renamed from kubernetes/aai/resources/resources/conf/logback.xml)0
-rw-r--r--kubernetes/aai/resources/config/log/search-data-service/logback.xml (renamed from kubernetes/aai/resources/search-data-service/conf/logback.xml)0
-rw-r--r--kubernetes/aai/resources/config/log/sparky-be/logback.xml (renamed from kubernetes/aai/resources/sparky-be/conf/logback.xml)0
-rw-r--r--kubernetes/aai/resources/config/log/traversal/logback.xml (renamed from kubernetes/aai/resources/traversal/conf/logback.xml)0
-rw-r--r--kubernetes/aai/templates/aai-deployment.yaml1
-rw-r--r--kubernetes/aai/templates/aai-resources-deployment.yaml11
-rw-r--r--kubernetes/aai/templates/aai-resources-traversal-configmap.yaml16
-rw-r--r--kubernetes/aai/templates/aai-traversal-deployment.yaml11
-rw-r--r--kubernetes/aai/templates/data-router-deployment.yaml1
-rw-r--r--kubernetes/aai/templates/elasticsearch-deployment.yaml1
-rw-r--r--kubernetes/aai/templates/hbase-deployment.yaml1
-rw-r--r--kubernetes/aai/templates/modelloader-deployment-configmap.yaml8
-rw-r--r--kubernetes/aai/templates/modelloader-deployment.yaml11
-rw-r--r--kubernetes/aai/templates/search-data-service-configmap.yaml8
-rw-r--r--kubernetes/aai/templates/search-data-service-deployment.yaml11
-rw-r--r--kubernetes/aai/templates/sparky-be-deployment-configmap.yaml8
-rw-r--r--kubernetes/aai/templates/sparky-be-deployment.yaml11
-rw-r--r--kubernetes/aai/values.yaml10
-rw-r--r--kubernetes/appc/templates/appc-deployment.yaml1
-rw-r--r--kubernetes/appc/templates/db-deployment.yaml3
-rw-r--r--kubernetes/appc/templates/dgbuilder-deployment.yaml1
-rw-r--r--kubernetes/appc/values.yaml5
-rw-r--r--kubernetes/message-router/templates/message-router-dmaap.yaml1
-rw-r--r--kubernetes/message-router/templates/message-router-kafka.yaml1
-rw-r--r--kubernetes/message-router/templates/message-router-zookeeper.yaml3
-rw-r--r--kubernetes/message-router/values.yaml3
-rw-r--r--kubernetes/msb/templates/msb-discovery-deployment.yaml17
-rw-r--r--kubernetes/msb/templates/msb-eag-deployment.yaml17
-rw-r--r--kubernetes/msb/templates/msb-iag-deployment.yaml17
-rw-r--r--kubernetes/msb/values.yaml1
-rw-r--r--kubernetes/mso/templates/db-deployment.yaml1
-rw-r--r--kubernetes/mso/templates/mso-deployment.yaml2
-rw-r--r--kubernetes/mso/values.yaml2
-rw-r--r--kubernetes/policy/templates/dep-brmsgw.yaml2
-rw-r--r--kubernetes/policy/templates/dep-drools.yaml2
-rw-r--r--kubernetes/policy/templates/dep-maria.yaml3
-rw-r--r--kubernetes/policy/templates/dep-nexus.yaml1
-rw-r--r--kubernetes/policy/templates/dep-pap.yaml1
-rw-r--r--kubernetes/policy/templates/dep-pdp.yaml2
-rw-r--r--kubernetes/policy/values.yaml9
-rwxr-xr-xkubernetes/portal/templates/portal-apps-deployment.yaml1
-rwxr-xr-xkubernetes/portal/templates/portal-mariadb-deployment.yaml1
-rw-r--r--kubernetes/portal/templates/portal-vnc-dep.yaml1
-rw-r--r--kubernetes/portal/templates/portal-widgets-deployment.yaml1
-rw-r--r--kubernetes/portal/values.yaml4
-rw-r--r--kubernetes/readiness/docker/init/ready.py84
-rw-r--r--kubernetes/sdnc/templates/dgbuilder-deployment.yaml1
-rw-r--r--kubernetes/sdnc/templates/dmaap-deployment.yaml1
-rw-r--r--kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml2
-rw-r--r--kubernetes/sdnc/templates/ueb-deployment.yaml1
-rw-r--r--kubernetes/sdnc/templates/web-deployment.yaml1
-rw-r--r--kubernetes/sdnc/values.yaml5
-rwxr-xr-xkubernetes/vid/resources/config/lf_config/vid-my.cnf (renamed from kubernetes/config/docker/init/src/config/vid/vid/lf_config/vid-my.cnf)0
-rwxr-xr-xkubernetes/vid/resources/config/lf_config/vid-pre-init.sql (renamed from kubernetes/config/docker/init/src/config/vid/vid/lf_config/vid-pre-init.sql)0
-rw-r--r--kubernetes/vid/resources/config/log/filebeat/filebeat.yml41
-rw-r--r--kubernetes/vid/resources/config/log/vid/logback.xml (renamed from kubernetes/config/docker/init/src/config/log/vid/logback.xml)0
-rw-r--r--kubernetes/vid/templates/vid-lfconfig-configmap.yaml9
-rw-r--r--kubernetes/vid/templates/vid-log-configmap.yaml17
-rw-r--r--kubernetes/vid/templates/vid-mariadb-deployment.yaml24
-rw-r--r--kubernetes/vid/templates/vid-pv-pvc.yaml4
-rw-r--r--kubernetes/vid/templates/vid-server-deployment.yaml13
-rw-r--r--kubernetes/vid/values.yaml5
64 files changed, 315 insertions, 107 deletions
diff --git a/kubernetes/README_HELM b/kubernetes/README_HELM
index c1d5fdf432..0f65120397 100644
--- a/kubernetes/README_HELM
+++ b/kubernetes/README_HELM
@@ -3,7 +3,7 @@ Prerequisites:
- Helm
In order to use Helm with Rancher, check the tiller version installed
-by runing "helm version" on the ranchr CLI
+by running "helm version" on the rancher CLI
and install the appropriate Helm.
Notice both tiller and helm are installed,
but you will need to install on your VM.
diff --git a/kubernetes/aai/resources/model-loader/conf/logback.xml b/kubernetes/aai/resources/config/log/model-loader/logback.xml
index d512d3b91c..d512d3b91c 100644
--- a/kubernetes/aai/resources/model-loader/conf/logback.xml
+++ b/kubernetes/aai/resources/config/log/model-loader/logback.xml
diff --git a/kubernetes/aai/resources/resources/conf/logback.xml b/kubernetes/aai/resources/config/log/resources/logback.xml
index 6cfc293f46..6cfc293f46 100644
--- a/kubernetes/aai/resources/resources/conf/logback.xml
+++ b/kubernetes/aai/resources/config/log/resources/logback.xml
diff --git a/kubernetes/aai/resources/search-data-service/conf/logback.xml b/kubernetes/aai/resources/config/log/search-data-service/logback.xml
index 14ed4142fe..14ed4142fe 100644
--- a/kubernetes/aai/resources/search-data-service/conf/logback.xml
+++ b/kubernetes/aai/resources/config/log/search-data-service/logback.xml
diff --git a/kubernetes/aai/resources/sparky-be/conf/logback.xml b/kubernetes/aai/resources/config/log/sparky-be/logback.xml
index c1b99c183f..c1b99c183f 100644
--- a/kubernetes/aai/resources/sparky-be/conf/logback.xml
+++ b/kubernetes/aai/resources/config/log/sparky-be/logback.xml
diff --git a/kubernetes/aai/resources/traversal/conf/logback.xml b/kubernetes/aai/resources/config/log/traversal/logback.xml
index fb8d8a53bf..fb8d8a53bf 100644
--- a/kubernetes/aai/resources/traversal/conf/logback.xml
+++ b/kubernetes/aai/resources/config/log/traversal/logback.xml
diff --git a/kubernetes/aai/templates/aai-deployment.yaml b/kubernetes/aai/templates/aai-deployment.yaml
index e0e422b43a..4e8d82f42f 100644
--- a/kubernetes/aai/templates/aai-deployment.yaml
+++ b/kubernetes/aai/templates/aai-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: aai-service
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.aaiServiceReplicas }}
selector:
matchLabels:
app: aai-service
diff --git a/kubernetes/aai/templates/aai-resources-deployment.yaml b/kubernetes/aai/templates/aai-resources-deployment.yaml
index 5ca0c165df..dd7d7cc9d9 100644
--- a/kubernetes/aai/templates/aai-resources-deployment.yaml
+++ b/kubernetes/aai/templates/aai-resources-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: aai-resources
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.aaiResourceReplicas }}
selector:
matchLabels:
app: aai-resources
@@ -97,16 +98,8 @@ spec:
emptyDir: {}
- name: aai-resources-log-conf
configMap:
- name: aai-resources-configmap
+ name: aai-resources-log-configmap
restartPolicy: Always
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: aai-resources-configmap
- namespace: {{ .Values.nsPrefix }}-aai
-data:
-{{ (.Files.Glob "resources/resources/conf/logback.xml").AsConfig | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml b/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml
index 772c3a79c8..ebd69132a2 100644
--- a/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml
+++ b/kubernetes/aai/templates/aai-resources-traversal-configmap.yaml
@@ -14,4 +14,20 @@ metadata:
namespace: {{ .Values.nsPrefix }}-aai
data:
{{ tpl (.Files.Glob "resources/config/aai-data/environments/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: aai-resources-log-configmap
+ namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/log/resources/logback.xml").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: aai-traversal-log-configmap
+ namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/log/traversal/logback.xml").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/aai-traversal-deployment.yaml b/kubernetes/aai/templates/aai-traversal-deployment.yaml
index fda0055d21..38e7fb0847 100644
--- a/kubernetes/aai/templates/aai-traversal-deployment.yaml
+++ b/kubernetes/aai/templates/aai-traversal-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: aai-traversal
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.aaiTraversalReplicas }}
selector:
matchLabels:
app: aai-traversal
@@ -99,16 +100,8 @@ spec:
emptyDir: {}
- name: aai-traversal-log-conf
configMap:
- name: aai-traversal-configmap
+ name: aai-traversal-log-configmap
restartPolicy: Always
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: aai-traversal-configmap
- namespace: {{ .Values.nsPrefix }}-aai
-data:
-{{ (.Files.Glob "resources/traversal/conf/logback.xml").AsConfig | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/data-router-deployment.yaml b/kubernetes/aai/templates/data-router-deployment.yaml
index 06dbc9118e..5a7f9e927f 100644
--- a/kubernetes/aai/templates/data-router-deployment.yaml
+++ b/kubernetes/aai/templates/data-router-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: data-router
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.dataRouterReplicas }}
selector:
matchLabels:
app: data-router
diff --git a/kubernetes/aai/templates/elasticsearch-deployment.yaml b/kubernetes/aai/templates/elasticsearch-deployment.yaml
index baa1cb8523..d3535d07c6 100644
--- a/kubernetes/aai/templates/elasticsearch-deployment.yaml
+++ b/kubernetes/aai/templates/elasticsearch-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: elasticsearch
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.elasticsearchReplicas }}
selector:
matchLabels:
app: elasticsearch
diff --git a/kubernetes/aai/templates/hbase-deployment.yaml b/kubernetes/aai/templates/hbase-deployment.yaml
index 3c1949c35a..5b2a98cc89 100644
--- a/kubernetes/aai/templates/hbase-deployment.yaml
+++ b/kubernetes/aai/templates/hbase-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: hbase
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.hbaseReplicas }}
selector:
matchLabels:
app: hbase
diff --git a/kubernetes/aai/templates/modelloader-deployment-configmap.yaml b/kubernetes/aai/templates/modelloader-deployment-configmap.yaml
index 7f37bd605b..e5a59a124d 100644
--- a/kubernetes/aai/templates/modelloader-deployment-configmap.yaml
+++ b/kubernetes/aai/templates/modelloader-deployment-configmap.yaml
@@ -15,4 +15,12 @@ metadata:
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/model-loader/appconfig/auth/*").AsSecrets . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: aai-model-loader-log-configmap
+ namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/log/model-loader/logback.xml").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/modelloader-deployment.yaml b/kubernetes/aai/templates/modelloader-deployment.yaml
index c81305817c..c5a788c287 100644
--- a/kubernetes/aai/templates/modelloader-deployment.yaml
+++ b/kubernetes/aai/templates/modelloader-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: model-loader-service
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.modelLoaderReplicas }}
selector:
matchLabels:
app: model-loader-service
@@ -68,16 +69,8 @@ spec:
emptyDir: {}
- name: aai-model-loader-log-conf
configMap:
- name: aai-model-loader-configmap
+ name: aai-model-loader-log-configmap
restartPolicy: Always
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: aai-model-loader-configmap
- namespace: {{ .Values.nsPrefix }}-aai
-data:
-{{ (.Files.Glob "resources/model-loader/conf/logback.xml").AsConfig | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/search-data-service-configmap.yaml b/kubernetes/aai/templates/search-data-service-configmap.yaml
index c392e412aa..8f707d4ca3 100644
--- a/kubernetes/aai/templates/search-data-service-configmap.yaml
+++ b/kubernetes/aai/templates/search-data-service-configmap.yaml
@@ -23,4 +23,12 @@ metadata:
namespace: {{ .Values.nsPrefix }}-aai
data:
{{ tpl (.Files.Glob "resources/config/search-data-service/appconfig/auth/search_policy.json").AsSecrets . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: aai-search-data-service-log-configmap
+ namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/log/search-data-service/logback.xml").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/search-data-service-deployment.yaml b/kubernetes/aai/templates/search-data-service-deployment.yaml
index 392a754459..7202e0d39c 100644
--- a/kubernetes/aai/templates/search-data-service-deployment.yaml
+++ b/kubernetes/aai/templates/search-data-service-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: search-data-service
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.searchDataServiceReplicas }}
selector:
matchLabels:
app: search-data-service
@@ -89,16 +90,8 @@ spec:
emptyDir: {}
- name: aai-search-data-service-log-conf
configMap:
- name: aai-search-data-service-configmap
+ name: aai-search-data-service-log-configmap
restartPolicy: Always
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: aai-search-data-service-configmap
- namespace: {{ .Values.nsPrefix }}-aai
-data:
-{{ (.Files.Glob "resources/search-data-service/conf/logback.xml").AsConfig | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml b/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml
index 55dea653cd..590608b566 100644
--- a/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml
+++ b/kubernetes/aai/templates/sparky-be-deployment-configmap.yaml
@@ -31,4 +31,12 @@ metadata:
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/sparky-be/appconfig/auth/*").AsSecrets . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: aai-sparky-be-log-configmap
+ namespace: {{ .Values.nsPrefix }}-aai
+data:
+{{ tpl (.Files.Glob "resources/config/log/sparky-be/logback.xml").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/templates/sparky-be-deployment.yaml b/kubernetes/aai/templates/sparky-be-deployment.yaml
index dfeab6a394..e5339283ab 100644
--- a/kubernetes/aai/templates/sparky-be-deployment.yaml
+++ b/kubernetes/aai/templates/sparky-be-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: sparky-be
namespace: "{{ .Values.nsPrefix }}-aai"
spec:
+ replicas: {{ .Values.sparkyReplicas }}
selector:
matchLabels:
app: sparky-be
@@ -101,16 +102,8 @@ spec:
emptyDir: {}
- name: aai-sparky-be-log-conf
configMap:
- name: aai-sparky-be-configmap
+ name: aai-sparky-be-log-configmap
restartPolicy: Always
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: aai-sparky-be-configmap
- namespace: {{ .Values.nsPrefix }}-aai
-data:
-{{ (.Files.Glob "resources/sparky-be/conf/logback.xml").AsConfig | indent 2 }}
#{{ end }}
diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml
index 6912c7374a..b05859737e 100644
--- a/kubernetes/aai/values.yaml
+++ b/kubernetes/aai/values.yaml
@@ -5,7 +5,15 @@ nodePortPrefix: 302
# POLICY hotfix - Note this must be temporary
# See https://jira.onap.org/browse/POLICY-510
aaiServiceClusterIp: 10.43.255.254
-
+aaiServiceReplicas: 1
+aaiResourceReplicas: 1
+aaiTraversalReplicas: 1
+dataRouterReplicas: 1
+elasticsearchReplicas: 1
+hbaseReplicas: 1
+modelLoaderReplicas: 1
+searchDataServiceReplicas: 1
+sparkyReplicas: 1
image:
readiness: oomk8s/readiness-check:1.0.0
aaiProxy: aaionap/haproxy
diff --git a/kubernetes/appc/templates/appc-deployment.yaml b/kubernetes/appc/templates/appc-deployment.yaml
index 8caf286043..35e947093c 100644
--- a/kubernetes/appc/templates/appc-deployment.yaml
+++ b/kubernetes/appc/templates/appc-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: appc
namespace: "{{ .Values.nsPrefix }}-appc"
spec:
+ replicas: {{ .Values.appcReplicas }}
selector:
matchLabels:
app: appc
diff --git a/kubernetes/appc/templates/db-deployment.yaml b/kubernetes/appc/templates/db-deployment.yaml
index 607a0df81f..0b29393cb5 100644
--- a/kubernetes/appc/templates/db-deployment.yaml
+++ b/kubernetes/appc/templates/db-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: appc-dbhost
namespace: "{{ .Values.nsPrefix }}-appc"
spec:
+ replicas: {{ .Values.dbReplicas }}
selector:
matchLabels:
app: appc-dbhost
@@ -45,4 +46,4 @@ spec:
claimName: appc-db
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/appc/templates/dgbuilder-deployment.yaml b/kubernetes/appc/templates/dgbuilder-deployment.yaml
index ed69c05f38..3bbc6715aa 100644
--- a/kubernetes/appc/templates/dgbuilder-deployment.yaml
+++ b/kubernetes/appc/templates/dgbuilder-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: appc-dgbuilder
namespace: "{{ .Values.nsPrefix }}-appc"
spec:
+ replicas: {{ .Values.dgbuilderReplicas }}
selector:
matchLabels:
app: appc-dgbuilder
diff --git a/kubernetes/appc/values.yaml b/kubernetes/appc/values.yaml
index 882267c41d..0bf4da9c09 100644
--- a/kubernetes/appc/values.yaml
+++ b/kubernetes/appc/values.yaml
@@ -1,9 +1,12 @@
nsPrefix: onap
pullPolicy: Always
nodePortPrefix: 302
+appcReplicas: 1
+dbReplicas: 1
+dgbuilderReplicas: 1
image:
readiness: oomk8s/readiness-check:1.0.0
appc: nexus3.onap.org:10001/openecomp/appc-image:v1.2.0
mysqlServer: mysql/mysql-server:5.6
dgbuilderSdnc: nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image:v0.1.0
- filebeat: docker.elastic.co/beats/filebeat:5.5.0 \ No newline at end of file
+ filebeat: docker.elastic.co/beats/filebeat:5.5.0
diff --git a/kubernetes/message-router/templates/message-router-dmaap.yaml b/kubernetes/message-router/templates/message-router-dmaap.yaml
index 1d9777e760..cecf69b86f 100644
--- a/kubernetes/message-router/templates/message-router-dmaap.yaml
+++ b/kubernetes/message-router/templates/message-router-dmaap.yaml
@@ -5,6 +5,7 @@ metadata:
name: dmaap
namespace: "{{ .Values.nsPrefix }}-message-router"
spec:
+ replicas: {{ .Values.dmaapReplicas }}
selector:
matchLabels:
app: dmaap
diff --git a/kubernetes/message-router/templates/message-router-kafka.yaml b/kubernetes/message-router/templates/message-router-kafka.yaml
index 509b15fc53..94e01b31c0 100644
--- a/kubernetes/message-router/templates/message-router-kafka.yaml
+++ b/kubernetes/message-router/templates/message-router-kafka.yaml
@@ -5,6 +5,7 @@ metadata:
name: global-kafka
namespace: "{{ .Values.nsPrefix }}-message-router"
spec:
+ replicas: {{ .Values.kafkaReplicas }}
selector:
matchLabels:
app: global-kafka
diff --git a/kubernetes/message-router/templates/message-router-zookeeper.yaml b/kubernetes/message-router/templates/message-router-zookeeper.yaml
index 47cdb51f2f..5a5bc9f355 100644
--- a/kubernetes/message-router/templates/message-router-zookeeper.yaml
+++ b/kubernetes/message-router/templates/message-router-zookeeper.yaml
@@ -5,6 +5,7 @@ metadata:
name: zookeeper
namespace: "{{ .Values.nsPrefix }}-message-router"
spec:
+ replicas: {{ .Values.zookeeperReplicas }}
selector:
matchLabels:
app: zookeeper
@@ -41,4 +42,4 @@ spec:
claimName: message-router-zookeeper
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/message-router/values.yaml b/kubernetes/message-router/values.yaml
index 92067294f8..6782b71746 100644
--- a/kubernetes/message-router/values.yaml
+++ b/kubernetes/message-router/values.yaml
@@ -1,6 +1,9 @@
nsPrefix: onap
pullPolicy: Always
nodePortPrefix: 302
+dmaapReplicas: 1
+kafkaReplicas: 1
+zookeeperReplicas: 1
image:
readiness: oomk8s/readiness-check:1.0.0
dmaap: attos/dmaap:latest
diff --git a/kubernetes/msb/templates/msb-discovery-deployment.yaml b/kubernetes/msb/templates/msb-discovery-deployment.yaml
index 5f8db61ac5..5c01febd1e 100644
--- a/kubernetes/msb/templates/msb-discovery-deployment.yaml
+++ b/kubernetes/msb/templates/msb-discovery-deployment.yaml
@@ -16,6 +16,21 @@ spec:
name: msb-discovery
spec:
hostname: msb-discovery
+ initContainers:
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - msb-consul
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: {{ .Values.image.readiness }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: msb-discovery-readiness
containers:
- args:
image: {{ .Values.image.discovery }}
@@ -34,4 +49,4 @@ spec:
imagePullPolicy: {{ .Values.pullPolicy }}
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/msb/templates/msb-eag-deployment.yaml b/kubernetes/msb/templates/msb-eag-deployment.yaml
index 714f19b1a5..10cbbe115d 100644
--- a/kubernetes/msb/templates/msb-eag-deployment.yaml
+++ b/kubernetes/msb/templates/msb-eag-deployment.yaml
@@ -16,6 +16,21 @@ spec:
name: msb-eag
spec:
hostname: msb-eag
+ initContainers:
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - msb-discovery
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: {{ .Values.image.readiness }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: msb-eag-readiness
containers:
- args:
image: {{ .Values.image.apigateway }}
@@ -38,4 +53,4 @@ spec:
imagePullPolicy: {{ .Values.pullPolicy}}
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/msb/templates/msb-iag-deployment.yaml b/kubernetes/msb/templates/msb-iag-deployment.yaml
index ca4d5a033f..18dbc67f86 100644
--- a/kubernetes/msb/templates/msb-iag-deployment.yaml
+++ b/kubernetes/msb/templates/msb-iag-deployment.yaml
@@ -16,6 +16,21 @@ spec:
name: msb-iag
spec:
hostname: msb-iag
+ initContainers:
+ - command:
+ - /root/ready.py
+ args:
+ - --container-name
+ - msb-discovery
+ env:
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ apiVersion: v1
+ fieldPath: metadata.namespace
+ image: {{ .Values.image.readiness }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: msb-iag-readiness
containers:
- args:
image: {{ .Values.image.apigateway }}
@@ -38,4 +53,4 @@ spec:
imagePullPolicy: "{{ .Values.pullPolicy}}"
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/msb/values.yaml b/kubernetes/msb/values.yaml
index 7c1b16b8dc..9bbdb929db 100644
--- a/kubernetes/msb/values.yaml
+++ b/kubernetes/msb/values.yaml
@@ -1,6 +1,7 @@
nsPrefix: onap
pullPolicy: IfNotPresent
image:
+ readiness: oomk8s/readiness-check:1.0.0
consul: consul:0.9.3
discovery: nexus3.onap.org:10001/onap/msb/msb_discovery:1.0.0
apigateway: nexus3.onap.org:10001/onap/msb/msb_apigateway:1.0.0
diff --git a/kubernetes/mso/templates/db-deployment.yaml b/kubernetes/mso/templates/db-deployment.yaml
index e6f09c565c..cc4c656a04 100644
--- a/kubernetes/mso/templates/db-deployment.yaml
+++ b/kubernetes/mso/templates/db-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: mariadb
namespace: "{{ .Values.nsPrefix }}-mso"
spec:
+ replicas: {{ .Values.dbReplicas }}
selector:
matchLabels:
app: mariadb
diff --git a/kubernetes/mso/templates/mso-deployment.yaml b/kubernetes/mso/templates/mso-deployment.yaml
index 580facdaa6..b4146401c4 100644
--- a/kubernetes/mso/templates/mso-deployment.yaml
+++ b/kubernetes/mso/templates/mso-deployment.yaml
@@ -5,7 +5,7 @@ metadata:
name: mso
namespace: "{{ .Values.nsPrefix }}-mso"
spec:
- replicas: 1
+ replicas: {{ .Values.msoReplicas }}
selector:
matchLabels:
app: mso
diff --git a/kubernetes/mso/values.yaml b/kubernetes/mso/values.yaml
index 73b9f31446..77d3d60edf 100644
--- a/kubernetes/mso/values.yaml
+++ b/kubernetes/mso/values.yaml
@@ -7,6 +7,8 @@ openStackKeyStoneUrl: "http://1.2.3.4:5000"
dmaapTopic: "AUTO"
openStackServiceTenantName: "service"
openStackEncryptedPasswordHere: "c124921a3a0efbe579782cde8227681e"
+msoReplicas: 1
+dbReplicas: 1
image:
readiness: oomk8s/readiness-check:1.0.0
mso: nexus3.onap.org:10001/openecomp/mso:v1.1.1
diff --git a/kubernetes/policy/templates/dep-brmsgw.yaml b/kubernetes/policy/templates/dep-brmsgw.yaml
index 667ccc6251..6c0533ce15 100644
--- a/kubernetes/policy/templates/dep-brmsgw.yaml
+++ b/kubernetes/policy/templates/dep-brmsgw.yaml
@@ -5,7 +5,7 @@ metadata:
name: brmsgw
namespace: "{{ .Values.nsPrefix }}-policy"
spec:
- replicas: 1
+ replicas: {{ .Values.brmsgwReplicas }}
selector:
matchLabels:
app: brmsgw
diff --git a/kubernetes/policy/templates/dep-drools.yaml b/kubernetes/policy/templates/dep-drools.yaml
index afa044abe9..1dc16cf374 100644
--- a/kubernetes/policy/templates/dep-drools.yaml
+++ b/kubernetes/policy/templates/dep-drools.yaml
@@ -5,7 +5,7 @@ metadata:
name: drools
namespace: "{{ .Values.nsPrefix }}-policy"
spec:
- replicas: 1
+ replicas: {{ .Values.droolsReplicas }}
selector:
matchLabels:
app: drools
diff --git a/kubernetes/policy/templates/dep-maria.yaml b/kubernetes/policy/templates/dep-maria.yaml
index c921e8c890..e42230f994 100644
--- a/kubernetes/policy/templates/dep-maria.yaml
+++ b/kubernetes/policy/templates/dep-maria.yaml
@@ -5,6 +5,7 @@ metadata:
name: mariadb
namespace: "{{ .Values.nsPrefix }}-policy"
spec:
+ replicas: {{ .Values.mariadbReplicas }}
selector:
matchLabels:
app: mariadb
@@ -35,4 +36,4 @@ spec:
path: /etc/localtime
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/policy/templates/dep-nexus.yaml b/kubernetes/policy/templates/dep-nexus.yaml
index 4adb05f630..2db40b2763 100644
--- a/kubernetes/policy/templates/dep-nexus.yaml
+++ b/kubernetes/policy/templates/dep-nexus.yaml
@@ -5,6 +5,7 @@ metadata:
name: nexus
namespace: "{{ .Values.nsPrefix }}-policy"
spec:
+ replicas: {{ .Values.nexusReplicas }}
selector:
matchLabels:
app: nexus
diff --git a/kubernetes/policy/templates/dep-pap.yaml b/kubernetes/policy/templates/dep-pap.yaml
index d3d5ff3738..68ccb5a746 100644
--- a/kubernetes/policy/templates/dep-pap.yaml
+++ b/kubernetes/policy/templates/dep-pap.yaml
@@ -5,6 +5,7 @@ metadata:
name: pap
namespace: "{{ .Values.nsPrefix }}-policy"
spec:
+ replicas: {{ .Values.papReplicas }}
selector:
matchLabels:
app: pap
diff --git a/kubernetes/policy/templates/dep-pdp.yaml b/kubernetes/policy/templates/dep-pdp.yaml
index b62e280895..f867fa54e2 100644
--- a/kubernetes/policy/templates/dep-pdp.yaml
+++ b/kubernetes/policy/templates/dep-pdp.yaml
@@ -5,7 +5,7 @@ metadata:
name: pdp
namespace: "{{ .Values.nsPrefix }}-policy"
spec:
- replicas: 1
+ replicas: {{ .Values.pdpReplicas }}
selector:
matchLabels:
app: pdp
diff --git a/kubernetes/policy/values.yaml b/kubernetes/policy/values.yaml
index f52dc445e6..79b59cf58e 100644
--- a/kubernetes/policy/values.yaml
+++ b/kubernetes/policy/values.yaml
@@ -5,7 +5,12 @@ nodePortPrefix: 302
# POLICY hotfix - Note this must be temporary
# See https://jira.onap.org/browse/POLICY-510
aaiServiceClusterIp: 10.43.255.254
-
+brmsgwReplicas: 1
+droolsReplicas: 1
+mariadbReplicas: 1
+nexusReplicas: 1
+papReplicas: 1
+pdpReplicas: 1
image:
readiness: oomk8s/readiness-check
readinessVersion: 1.0.0
@@ -18,4 +23,4 @@ image:
policyNexus: nexus3.onap.org:10001/onap/policy/policy-nexus
policyNexusVersion: v1.1.1
ubuntu: ubuntu:16.04
- filebeat: docker.elastic.co/beats/filebeat:5.5.0 \ No newline at end of file
+ filebeat: docker.elastic.co/beats/filebeat:5.5.0
diff --git a/kubernetes/portal/templates/portal-apps-deployment.yaml b/kubernetes/portal/templates/portal-apps-deployment.yaml
index b45cec4946..c6a38bd4cf 100755
--- a/kubernetes/portal/templates/portal-apps-deployment.yaml
+++ b/kubernetes/portal/templates/portal-apps-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: portalapps
namespace: "{{ .Values.nsPrefix }}-portal"
spec:
+ replicas: {{ .Values.portalAppsReplicas }}
selector:
matchLabels:
app: portalapps
diff --git a/kubernetes/portal/templates/portal-mariadb-deployment.yaml b/kubernetes/portal/templates/portal-mariadb-deployment.yaml
index fafcad2772..9db512a120 100755
--- a/kubernetes/portal/templates/portal-mariadb-deployment.yaml
+++ b/kubernetes/portal/templates/portal-mariadb-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: portaldb
namespace: "{{ .Values.nsPrefix }}-portal"
spec:
+ replicas: {{ .Values.portalDbReplicas }}
selector:
matchLabels:
app: portaldb
diff --git a/kubernetes/portal/templates/portal-vnc-dep.yaml b/kubernetes/portal/templates/portal-vnc-dep.yaml
index d5f433816e..3a80572238 100644
--- a/kubernetes/portal/templates/portal-vnc-dep.yaml
+++ b/kubernetes/portal/templates/portal-vnc-dep.yaml
@@ -22,6 +22,7 @@ metadata:
name: vnc-portal
namespace: "{{ .Values.nsPrefix }}-portal"
spec:
+ replicas: {{ .Values.vncPortalReplicas }}
selector:
matchLabels:
app: vnc-portal
diff --git a/kubernetes/portal/templates/portal-widgets-deployment.yaml b/kubernetes/portal/templates/portal-widgets-deployment.yaml
index 0dd92027df..6f27ef6e80 100644
--- a/kubernetes/portal/templates/portal-widgets-deployment.yaml
+++ b/kubernetes/portal/templates/portal-widgets-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: portalwidgets
namespace: "{{ .Values.nsPrefix }}-portal"
spec:
+ replicas: {{ .Values.portalWidgetsReplicas }}
selector:
matchLabels:
app: portalwidgets
diff --git a/kubernetes/portal/values.yaml b/kubernetes/portal/values.yaml
index 34f5cc444b..f34e6a08fd 100644
--- a/kubernetes/portal/values.yaml
+++ b/kubernetes/portal/values.yaml
@@ -1,6 +1,10 @@
nsPrefix: onap
pullPolicy: Always
nodePortPrefix: 302
+portalAppsReplicas: 1
+portalDbReplicas: 1
+vncPortalReplicas: 1
+portalWidgetsReplicas: 1
image:
readiness: oomk8s/readiness-check:1.0.0
portalapps: nexus3.onap.org:10001/onap/portal-apps:v1.3.0
diff --git a/kubernetes/readiness/docker/init/ready.py b/kubernetes/readiness/docker/init/ready.py
index c5b55eef18..6d2edef81c 100644
--- a/kubernetes/readiness/docker/init/ready.py
+++ b/kubernetes/readiness/docker/init/ready.py
@@ -1,8 +1,13 @@
#!/usr/bin/python
-from kubernetes import client, config
-import time, argparse, logging, sys, os
+import getopt
+import logging
+import os
+import sys
+import time
-#extract env variables.
+from kubernetes import client
+
+# extract env variables.
namespace = os.environ['NAMESPACE']
cert = os.environ['CERT']
host = os.environ['KUBERNETES_SERVICE_HOST']
@@ -11,12 +16,7 @@ token_path = os.environ['TOKEN']
with open(token_path, 'r') as token_file:
token = token_file.read().replace('\n', '')
-client.configuration.host = "https://" + host
-client.configuration.ssl_ca_cert = cert
-client.configuration.api_key['authorization'] = token
-client.configuration.api_key_prefix['authorization'] = 'Bearer'
-
-#setup logging
+# setup logging
log = logging.getLogger(__name__)
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %(message)s'))
@@ -24,25 +24,29 @@ handler.setLevel(logging.INFO)
log.addHandler(handler)
log.setLevel(logging.INFO)
+configuration = client.Configuration()
+configuration.host = "https://" + host
+configuration.ssl_ca_cert = cert
+configuration.api_key['authorization'] = token
+configuration.api_key_prefix['authorization'] = 'Bearer'
+coreV1Api = client.CoreV1Api(client.ApiClient(configuration))
def is_ready(container_name):
- log.info( "Checking if " + container_name + " is ready")
- # config.load_kube_config() # for local testing
- # namespace='onap-sdc' # for local testing
- v1 = client.CoreV1Api()
-
ready = False
-
+ log.info("Checking if " + container_name + " is ready")
try:
- response = v1.list_namespaced_pod(namespace=namespace, watch=False)
+ response = coreV1Api.list_namespaced_pod(namespace=namespace, watch=False)
for i in response.items:
+ # container_statuses can be None, which is non-iterable.
+ if i.status.container_statuses is None:
+ continue
for s in i.status.container_statuses:
if s.name == container_name:
ready = s.ready
if not ready:
- log.info( container_name + " is not ready.")
+ log.info(container_name + " is not ready.")
else:
- log.info( container_name + " is ready!")
+ log.info(container_name + " is ready!")
else:
continue
return ready
@@ -50,27 +54,49 @@ def is_ready(container_name):
log.error("Exception when calling list_namespaced_pod: %s\n" % e)
-def main(args):
+DEF_TIMEOUT = 10
+DESCRIPTION = "Kubernetes container readiness check utility"
+USAGE = "Usage: ready.py [-t <timeout>] -c <container_name> [-c <container_name> ...]\n" \
+ "where\n" \
+ "<timeout> - wait for container readiness timeout in min, default is " + str(DEF_TIMEOUT) + "\n" \
+ "<container_name> - name of the container to wait for\n"
+
+def main(argv):
# args are a list of container names
- for container_name in args:
- # 5 min, TODO: make configurable
- timeout = time.time() + 60 * 10
+ container_names = []
+ timeout = DEF_TIMEOUT
+ try:
+ opts, args = getopt.getopt(argv, "hc:t:", ["container-name=", "timeout=", "help"])
+ for opt, arg in opts:
+ if opt in ("-h", "--help"):
+ print("%s\n\n%s" % (DESCRIPTION, USAGE))
+ sys.exit()
+ elif opt in ("-c", "--container-name"):
+ container_names.append(arg)
+ elif opt in ("-t", "--timeout"):
+ timeout = float(arg)
+ except (getopt.GetoptError, ValueError) as e:
+ print("Error parsing input parameters: %s\n" % e)
+ print(USAGE)
+ sys.exit(2)
+ if container_names.__len__() == 0:
+ print("Missing required input parameter(s)\n")
+ print(USAGE)
+ sys.exit(2)
+
+ for container_name in container_names:
+ timeout = time.time() + timeout * 60
while True:
ready = is_ready(container_name)
if ready is True:
break
elif time.time() > timeout:
- log.warning( "timed out waiting for '" + container_name + "' to be ready")
+ log.warning("timed out waiting for '" + container_name + "' to be ready")
exit(1)
else:
time.sleep(5)
if __name__ == "__main__":
- parser = argparse.ArgumentParser(description='Process some names.')
- parser.add_argument('--container-name', action='append', required=True, help='A container name')
- args = parser.parse_args()
- arg_dict = vars(args)
+ main(sys.argv[1:])
- for arg in arg_dict.itervalues():
- main(arg)
diff --git a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
index e0f8b298e9..b9ec155c3f 100644
--- a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
+++ b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: sdnc-dgbuilder
namespace: "{{ .Values.nsPrefix }}-sdnc"
spec:
+ replicas: {{ .Values.dgbuilderReplicas }}
selector:
matchLabels:
app: sdnc-dgbuilder
diff --git a/kubernetes/sdnc/templates/dmaap-deployment.yaml b/kubernetes/sdnc/templates/dmaap-deployment.yaml
index b9ba346156..eb6f354abd 100644
--- a/kubernetes/sdnc/templates/dmaap-deployment.yaml
+++ b/kubernetes/sdnc/templates/dmaap-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: dmaap-listener
namespace: "{{ .Values.nsPrefix }}-sdnc"
spec:
+ replicas: {{ .Values.dmaapReplicas }}
selector:
matchLabels:
app: dmaap-listener
diff --git a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml
index 9d3feeff9c..a283d0f626 100644
--- a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml
+++ b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml
@@ -5,7 +5,7 @@ metadata:
name: nfs-provisioner
namespace: "{{ .Values.nsPrefix }}-sdnc"
spec:
- replicas: 1
+ replicas: {{ .Values.nfsReplicas }}
strategy:
type: Recreate
template:
diff --git a/kubernetes/sdnc/templates/ueb-deployment.yaml b/kubernetes/sdnc/templates/ueb-deployment.yaml
index a7e5e748bd..c109acdaef 100644
--- a/kubernetes/sdnc/templates/ueb-deployment.yaml
+++ b/kubernetes/sdnc/templates/ueb-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: ueb-listener
namespace: "{{ .Values.nsPrefix }}-sdnc"
spec:
+ replicas: {{ .Values.uebReplicas }}
selector:
matchLabels:
app: ueb-listener
diff --git a/kubernetes/sdnc/templates/web-deployment.yaml b/kubernetes/sdnc/templates/web-deployment.yaml
index 7e8b59c1eb..73d8e0a6cb 100644
--- a/kubernetes/sdnc/templates/web-deployment.yaml
+++ b/kubernetes/sdnc/templates/web-deployment.yaml
@@ -5,6 +5,7 @@ metadata:
name: sdnc-portal
namespace: "{{ .Values.nsPrefix }}-sdnc"
spec:
+ replicas: {{ .Values.portalReplicas }}
selector:
matchLabels:
app: sdnc-portal
diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml
index 395970957a..e91dc2a4cf 100644
--- a/kubernetes/sdnc/values.yaml
+++ b/kubernetes/sdnc/values.yaml
@@ -14,5 +14,10 @@ image:
enableODLCluster: false
numberOfODLReplicas: 1
numberOfDbReplicas: 1
+dgbuilderReplicas: 1
+dmaapReplicas: 1
+nfsReplicas: 1
+uebReplicas: 1
+portalReplicas: 1
disableSdncSdncDgbuilder: false
disableSdncSdncPortal: false
diff --git a/kubernetes/config/docker/init/src/config/vid/vid/lf_config/vid-my.cnf b/kubernetes/vid/resources/config/lf_config/vid-my.cnf
index 472bf4698e..472bf4698e 100755
--- a/kubernetes/config/docker/init/src/config/vid/vid/lf_config/vid-my.cnf
+++ b/kubernetes/vid/resources/config/lf_config/vid-my.cnf
diff --git a/kubernetes/config/docker/init/src/config/vid/vid/lf_config/vid-pre-init.sql b/kubernetes/vid/resources/config/lf_config/vid-pre-init.sql
index 57b797d03c..57b797d03c 100755
--- a/kubernetes/config/docker/init/src/config/vid/vid/lf_config/vid-pre-init.sql
+++ b/kubernetes/vid/resources/config/lf_config/vid-pre-init.sql
diff --git a/kubernetes/vid/resources/config/log/filebeat/filebeat.yml b/kubernetes/vid/resources/config/log/filebeat/filebeat.yml
new file mode 100644
index 0000000000..f316b866af
--- /dev/null
+++ b/kubernetes/vid/resources/config/log/filebeat/filebeat.yml
@@ -0,0 +1,41 @@
+filebeat.prospectors:
+#it is mandatory, in our case it's log
+- input_type: log
+ #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
+ paths:
+ - /var/log/onap/*/*/*/*.log
+ - /var/log/onap/*/*/*.log
+ - /var/log/onap/*/*.log
+ #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
+ ignore_older: 48h
+ # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
+ clean_inactive: 96h
+
+
+# Name of the registry file. If a relative path is used, it is considered relative to the
+# data path. Else full qualified file name.
+#filebeat.registry_file: ${path.data}/registry
+
+
+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.onap-log:5044"]
+ #If enable will do load balancing among availabe Logstash, automatically.
+ loadbalance: true
+
+ #The list of root certificates for server verifications.
+ #If certificate_authorities is empty or not set, the trusted
+ #certificate authorities of the host system are used.
+ #ssl.certificate_authorities: $ssl.certificate_authorities
+
+ #The path to the certificate for SSL client authentication. If the certificate is not specified,
+ #client authentication is not available.
+ #ssl.certificate: $ssl.certificate
+
+ #The client certificate key used for client authentication.
+ #ssl.key: $ssl.key
+
+ #The passphrase used to decrypt an encrypted key stored in the configured key file
+ #ssl.key_passphrase: $ssl.key_passphrase
diff --git a/kubernetes/config/docker/init/src/config/log/vid/logback.xml b/kubernetes/vid/resources/config/log/vid/logback.xml
index 49db781b3e..49db781b3e 100644
--- a/kubernetes/config/docker/init/src/config/log/vid/logback.xml
+++ b/kubernetes/vid/resources/config/log/vid/logback.xml
diff --git a/kubernetes/vid/templates/vid-lfconfig-configmap.yaml b/kubernetes/vid/templates/vid-lfconfig-configmap.yaml
new file mode 100644
index 0000000000..1cc3f218b9
--- /dev/null
+++ b/kubernetes/vid/templates/vid-lfconfig-configmap.yaml
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableVidVidMariadb }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: vid-lfconfig-configmap
+ namespace: {{ .Values.nsPrefix }}-vid
+data:
+{{ tpl (.Files.Glob "resources/config/lf_config/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/vid/templates/vid-log-configmap.yaml b/kubernetes/vid/templates/vid-log-configmap.yaml
new file mode 100644
index 0000000000..00481d259e
--- /dev/null
+++ b/kubernetes/vid/templates/vid-log-configmap.yaml
@@ -0,0 +1,17 @@
+#{{ if not .Values.disableVidVidServer }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: vid-log-configmap
+ namespace: {{ .Values.nsPrefix }}-vid
+data:
+{{ tpl (.Files.Glob "resources/config/log/vid/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: vid-filebeat-configmap
+ namespace: {{ .Values.nsPrefix }}-vid
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/vid/templates/vid-mariadb-deployment.yaml b/kubernetes/vid/templates/vid-mariadb-deployment.yaml
index 55ef5da872..bf23c3f8b1 100644
--- a/kubernetes/vid/templates/vid-mariadb-deployment.yaml
+++ b/kubernetes/vid/templates/vid-mariadb-deployment.yaml
@@ -7,6 +7,7 @@ metadata:
name: vid-mariadb
namespace: "{{ .Values.nsPrefix }}-vid"
spec:
+ replicas: {{ .Values.vidMariaDbReplicas }}
selector:
matchLabels:
app: vid-mariadb
@@ -36,9 +37,11 @@ spec:
- mountPath: /var/lib/mysql
name: vid-mariadb-data
- mountPath: /docker-entrypoint-initdb.d/vid-pre-init.sql
- name: vid-pre-init
+ name: vid-lfconfig
+ subPath: vid-pre-init.sql
- mountPath: /etc/mysql/my.cnf
- name: my-cnf
+ name: vid-lfconfig
+ subPath: my.cnf
ports:
- containerPort: 3306
readinessProbe:
@@ -53,12 +56,15 @@ spec:
- name: vid-mariadb-data
persistentVolumeClaim:
claimName: vid-db
- - name: vid-pre-init
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/vid/vid/lf_config/vid-pre-init.sql
- - name: my-cnf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/vid/vid/lf_config/vid-my.cnf
+ - name: vid-lfconfig
+ configMap:
+ name: vid-lfconfig-configmap
+ defaultMode: 0755
+ items:
+ - key: vid-my.cnf
+ path: my.cnf
+ - key: vid-pre-init.sql
+ path: vid-pre-init.sql
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/vid/templates/vid-pv-pvc.yaml b/kubernetes/vid/templates/vid-pv-pvc.yaml
index f513a87354..3315d093e3 100644
--- a/kubernetes/vid/templates/vid-pv-pvc.yaml
+++ b/kubernetes/vid/templates/vid-pv-pvc.yaml
@@ -13,7 +13,7 @@ spec:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/vid/mariadb/data
+ path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/vid/mariadb/data
---
kind: PersistentVolumeClaim
apiVersion: v1
@@ -29,4 +29,4 @@ spec:
selector:
matchLabels:
name: "{{ .Values.nsPrefix }}-vid-db"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/vid/templates/vid-server-deployment.yaml b/kubernetes/vid/templates/vid-server-deployment.yaml
index 832fdeb93c..7f9cb653b2 100644
--- a/kubernetes/vid/templates/vid-server-deployment.yaml
+++ b/kubernetes/vid/templates/vid-server-deployment.yaml
@@ -7,6 +7,7 @@ metadata:
name: vid-server
namespace: "{{ .Values.nsPrefix }}-vid"
spec:
+ replicas: {{ .Values.vidServerReplicas }}
selector:
matchLabels:
app: vid-server
@@ -73,7 +74,7 @@ spec:
value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
- name: VID_MYSQL_MAXCONNECTIONS
value: "5"
- image: {{ .Values.image.vid }}
+ image: {{ .Values.image.vid }}
imagePullPolicy: {{ .Values.pullPolicy }}
name: vid-server
lifecycle:
@@ -90,6 +91,7 @@ spec:
name: vid-logs
- mountPath: /tmp/logback.xml
name: vid-logback
+ subPath: logback.xml
readinessProbe:
tcpSocket:
port: 8080
@@ -101,6 +103,7 @@ spec:
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
name: filebeat-conf
+ subPath: filebeat.yml
- mountPath: /var/log/onap
name: vid-logs
- mountPath: /usr/share/filebeat/data
@@ -110,15 +113,15 @@ spec:
hostPath:
path: /etc/localtime
- name: filebeat-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ configMap:
+ name: vid-filebeat-configmap
- name: vid-logs
emptyDir: {}
- name: vid-data-filebeat
emptyDir: {}
- name: vid-logback
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/vid/logback.xml
+ configMap:
+ name: vid-log-configmap
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
#{{ end }}
diff --git a/kubernetes/vid/values.yaml b/kubernetes/vid/values.yaml
index 9b1748f507..64635889cf 100644
--- a/kubernetes/vid/values.yaml
+++ b/kubernetes/vid/values.yaml
@@ -1,8 +1,11 @@
nsPrefix: onap
pullPolicy: Always
nodePortPrefix: 302
+dataRootDir: /dockerdata-nfs
+vidMariaDbReplicas: 1
+vidServerReplicas: 1
image:
readiness: oomk8s/readiness-check:1.0.0
mariadb: nexus3.onap.org:10001/library/mariadb:10
vid: nexus3.onap.org:10001/openecomp/vid:v1.1.1
- filebeat: docker.elastic.co/beats/filebeat:5.5.0 \ No newline at end of file
+ filebeat: docker.elastic.co/beats/filebeat:5.5.0