summaryrefslogtreecommitdiffstats
path: root/kubernetes/dcaegen2/charts
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/dcaegen2/charts')
-rw-r--r--kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml4
-rwxr-xr-xkubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh19
-rw-r--r--kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml3
3 files changed, 17 insertions, 9 deletions
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml
index 4e42b11208..8b5da2efe6 100644
--- a/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/resources/inputs/k8s-inventory-inputs.yaml
@@ -16,12 +16,12 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-sdc_config.address: '{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
+sdc_address: '{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
sdc_uri: 'https://{{ .Values.config.address.sdc }}.{{include "common.namespace" . }}:8443'
sdc_user: "dcae"
sdc_password: !!str Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
sdc_environment_name: "AUTO"
-sdc_msg_bus_config.address: '{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}'
+sdc_msg_bus_address: '{{ .Values.config.address.message_router }}.{{include "common.namespace" . }}'
postgres_user_inventory: "postgres"
postgres_password_inventory: "onap123"
service_change_handler_image: {{ .Values.componentImages.service_change_handler }}
diff --git a/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh b/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh
index 3431e7e6e7..f4547525c9 100755
--- a/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh
+++ b/kubernetes/dcaegen2/charts/dcae-redis/resources/redis/scripts/redis-cluster-config.sh
@@ -15,8 +15,9 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-
-if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
+(if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
+ echo "delay by 10 seconds for redis server starting"
+ sleep 10
NODES=""
echo "====> wait for all {{.Values.replicaCount}} redis pods up"
@@ -24,11 +25,16 @@ if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
do
echo "======> $(echo $NODES |wc -w) / {{.Values.replicaCount}} pods up"
sleep 5
- RESP=$(wget -vO- --ca-certificate /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --header "Authorization: Bearer $(</var/run/secrets/kubernetes.io/serviceaccount/token)" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT_443_TCP_PORT/api/v1/namespaces/{{.Release.Namespace}}/pods?labelSelector=app={{.Chart.Name}})
+ RESP=$(wget -vO- --ca-certificate /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --header "Authorization
+: Bearer $(</var/run/secrets/kubernetes.io/serviceaccount/token)" https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_PORT
+_443_TCP_PORT/api/v1/namespaces/{{.Release.Namespace}}/pods?labelSelector=app={{.Chart.Name}})
IPS=$(echo $RESP | jq -r '.items[].status.podIP')
+ IPS2=$(echo $IPS | sed -e 's/[a-zA-Z]*//g')
+ echo "======> IPs: ["$IPS2"]"
NODES=""
- for I in $IPS; do NODES="$NODES $I:{{.Values.service.externalPort}}"; done
+ for I in $IPS2; do NODES="$NODES $I:{{.Values.service.externalPort}}"; done
+ echo "======> nodes: ["$NODES"]"
done
echo "====> all {{.Values.replicaCount}} redis cluster pods are up. wait 10 seconds before the next step"; echo
sleep 10
@@ -36,6 +42,9 @@ if [[ "$HOSTNAME" == *{{.Chart.Name}}-0 ]]; then
echo "====> Configure the cluster"
# $NODES w/o quotes
+ echo "======> nodes: [$(echo $NODES |paste -s)]"
redis-trib create --replicas 1 $(echo $NODES |paste -s)
+fi ) &
+
+redis-server /conf/redis.conf
-fi
diff --git a/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml b/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml
index 472471416b..63d921aa8b 100644
--- a/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml
+++ b/kubernetes/dcaegen2/charts/dcae-redis/templates/statefulset.yaml
@@ -41,8 +41,7 @@ spec:
- /bin/sh
- -c
- |
- /opt/scripts/redis-cluster-config.sh &
- /usr/local/bin/redis-server-config.sh
+ /opt/scripts/redis-cluster-config.sh
ports:
- containerPort: {{ .Values.service.internalPort }}
name: {{ .Values.service.name }}