diff options
Diffstat (limited to 'kubernetes/dcaegen2')
3 files changed, 17 insertions, 9 deletions
diff --git a/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml b/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml index fc89c6c459..16de112655 100644 --- a/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml +++ b/kubernetes/dcaegen2/charts/dcae-bootstrap/values.yaml @@ -44,13 +44,13 @@ config: # application image repository: nexus3.onap.org:10001 -image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.1.5 +image: onap/org.onap.dcaegen2.deployments.k8s-bootstrap-container:1.1.6 # DCAE component images to be deployed via Cloudify Manager # Use to override default setting in blueprints componentImages: #TODO for further investigation: input template expansion issues if we comment this out - config_binding_service: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.1.4 + config_binding_service: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.1.5 # deployment_handler: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.deployment-handler:2.1.1 # holmes_engine: nexus3.onap.org:10001//onap/holmes/engine-management:v1.0.0 # holmes_rules: nexus3.onap.org:10001/onap/holmes/rule-management:v1.0.0 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 }} |