summaryrefslogtreecommitdiffstats
path: root/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes')
-rw-r--r--kubernetes/common/postgres/templates/_deployment.tpl2
-rw-r--r--kubernetes/common/repositoryGenerator/templates/_repository.tpl9
-rw-r--r--kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl4
-rwxr-xr-xkubernetes/helm/plugins/deploy/deploy.sh114
-rw-r--r--kubernetes/modeling/components/modeling-etsicatalog/values.yaml2
-rw-r--r--kubernetes/strimzi/templates/strimzi-kafka.yaml4
6 files changed, 85 insertions, 50 deletions
diff --git a/kubernetes/common/postgres/templates/_deployment.tpl b/kubernetes/common/postgres/templates/_deployment.tpl
index 341b4c86c7..1051aaff0b 100644
--- a/kubernetes/common/postgres/templates/_deployment.tpl
+++ b/kubernetes/common/postgres/templates/_deployment.tpl
@@ -33,6 +33,8 @@ metadata:
name: "{{ index $dot.Values "container" "name" $pgMode }}"
spec:
replicas: 1
+ strategy:
+ type: Recreate
selector:
matchLabels:
app: {{ include "common.name" $dot }}-{{ $pgMode }}
diff --git a/kubernetes/common/repositoryGenerator/templates/_repository.tpl b/kubernetes/common/repositoryGenerator/templates/_repository.tpl
index f57d390477..1b99285a80 100644
--- a/kubernetes/common/repositoryGenerator/templates/_repository.tpl
+++ b/kubernetes/common/repositoryGenerator/templates/_repository.tpl
@@ -154,6 +154,7 @@
mail: email (optional)
You can also set the same things for dockerHub, elastic and googleK8s if
needed.
+ if not needed, set global.repositoryCred.user to empty value.
*/}}
{{- define "repositoryGenerator.secret" -}}
{{- $dot := default . .dot -}}
@@ -164,9 +165,11 @@
{{- if $subchartDot.Values.global.repositoryCred }}
{{- $repo := $subchartDot.Values.global.repository }}
{{- $cred := $subchartDot.Values.global.repositoryCred }}
- {{- $mail := default "@" $cred.mail }}
- {{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
- {{- $repoCreds = printf "\"%s\": {\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}" $repo $cred.user $cred.password $mail $auth }}
+ {{- if $cred.user }}
+ {{- $mail := default "@" $cred.mail }}
+ {{- $auth := printf "%s:%s" $cred.user $cred.password | b64enc }}
+ {{- $repoCreds = printf "\"%s\": {\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}" $repo $cred.user $cred.password $mail $auth }}
+ {{- end }}
{{- end }}
{{- if $subchartDot.Values.global.dockerHubRepositoryCred }}
{{- $dhRepo := $subchartDot.Values.global.dockerHubRepository }}
diff --git a/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl b/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl
index 5a45fa1004..fbaaedf0dd 100644
--- a/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl
+++ b/kubernetes/dcaegen2-services/common/dcaegen2-services-common/templates/_deployment.tpl
@@ -366,12 +366,12 @@ spec:
- name: POLICY_SYNC_PDP_USER
valueFrom:
secretKeyRef:
- name: {{ $policyRls }}-policy-xacml-pdp-api-creds
+ name: {{ $policyRls }}-policy-xacml-pdp-restserver-creds
key: login
- name: POLICY_SYNC_PDP_PASS
valueFrom:
secretKeyRef:
- name: {{ $policyRls }}-policy-xacml-pdp-api-creds
+ name: {{ $policyRls }}-policy-xacml-pdp-restserver-creds
key: password
- name: POLICY_SYNC_PDP_URL
value : http{{ if (include "common.needTLS" .) }}s{{ end }}://policy-xacml-pdp:6969
diff --git a/kubernetes/helm/plugins/deploy/deploy.sh b/kubernetes/helm/plugins/deploy/deploy.sh
index f32281da08..51438ad7ea 100755
--- a/kubernetes/helm/plugins/deploy/deploy.sh
+++ b/kubernetes/helm/plugins/deploy/deploy.sh
@@ -100,6 +100,40 @@ check_for_dep() {
sleep 15
}
+deploy_strimzi() {
+ #Deploy the srtimzi-kafka chart in advance. Dependent charts require the entity-operator
+ #for management of the strimzi crds
+ deploy_subchart
+ echo "waiting for ${RELEASE}-strimzi-entity-operator to be deployed"
+ check_for_dep ${RELEASE}-strimzi-entity-operator
+}
+
+deploy_subchart() {
+ if [ -z "$SUBCHART_RELEASE" ] || [ "$SUBCHART_RELEASE" = "$subchart" ]; then
+ LOG_FILE=$LOG_DIR/"${RELEASE}-${subchart}".log
+ :> $LOG_FILE
+
+ helm upgrade -i "${RELEASE}-${subchart}" $CACHE_SUBCHART_DIR/$subchart \
+ $DEPLOY_FLAGS -f $GLOBAL_OVERRIDES -f $SUBCHART_OVERRIDES \
+ > $LOG_FILE 2>&1
+
+ if [ "$VERBOSE" = "true" ]; then
+ cat $LOG_FILE
+ else
+ echo "release \"${RELEASE}-${subchart}\" deployed"
+ fi
+ # Add annotation last-applied-configuration if set-last-applied flag is set
+ if [ "$SET_LAST_APPLIED" = "true" ]; then
+ helm get manifest "${RELEASE}-${subchart}" \
+ | kubectl apply set-last-applied --create-annotation -n onap -f - \
+ > $LOG_FILE.log 2>&1
+ fi
+ fi
+ if [ "$DELAY" = "true" ]; then
+ echo sleep 3m
+ sleep 180
+ fi
+}
deploy() {
# validate params
@@ -234,53 +268,49 @@ deploy() {
#So cache the results to prevent repeated execution.
ALL_HELM_RELEASES=$(helm ls -q)
- #Deploy the srtimzi-kafka chart in advance. Dependent charts require the entity-operator
- #for management of the strimzi crds
- helm upgrade -i "${RELEASE}-strimzi" $CACHE_SUBCHART_DIR/strimzi
- echo "waiting for ${RELEASE}-strimzi-entity-operator to be deployed"
- check_for_dep ${RELEASE}-strimzi-entity-operator
-
- for subchart in * ; do
- SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
-
- SUBCHART_ENABLED=0
- if [ -f $SUBCHART_OVERRIDES ]; then
- SUBCHART_ENABLED=$(cat $SUBCHART_OVERRIDES | grep -c "^enabled: true")
- fi
+ for subchart in strimzi cassandra mariadb-galera postgres ; do
+ SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
- if [ $SUBCHART_ENABLED -eq 1 ]; then
- if [ -z "$SUBCHART_RELEASE" ] || [ "$SUBCHART_RELEASE" = "$subchart" ]; then
- LOG_FILE=$LOG_DIR/"${RELEASE}-${subchart}".log
- :> $LOG_FILE
+ SUBCHART_ENABLED=0
+ if [ -f $SUBCHART_OVERRIDES ]; then
+ SUBCHART_ENABLED=$(cat $SUBCHART_OVERRIDES | grep -c "^enabled: true")
+ fi
+ if [ "${subchart}" = "strimzi" ] && [ $SUBCHART_ENABLED -eq 1 ]; then
+ deploy_strimzi
+ fi
+ # Deploy them at first
+ if [ $SUBCHART_ENABLED -eq 1 ]; then
+ deploy_subchart
+ else
+ array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
+ n=${#array[*]}
+ for i in $(seq $(($n-1)) -1 0); do
+ helm del "${array[i]}"
+ done
+ fi
+ done
- helm upgrade -i "${RELEASE}-${subchart}" $CACHE_SUBCHART_DIR/$subchart \
- $DEPLOY_FLAGS -f $GLOBAL_OVERRIDES -f $SUBCHART_OVERRIDES \
- > $LOG_FILE 2>&1
+ for subchart in * ; do
+ SUBCHART_OVERRIDES=$CACHE_SUBCHART_DIR/$subchart/subchart-overrides.yaml
- if [ "$VERBOSE" = "true" ]; then
- cat $LOG_FILE
- else
- echo "release \"${RELEASE}-${subchart}\" deployed"
- fi
- # Add annotation last-applied-configuration if set-last-applied flag is set
- if [ "$SET_LAST_APPLIED" = "true" ]; then
- helm get manifest "${RELEASE}-${subchart}" \
- | kubectl apply set-last-applied --create-annotation -n onap -f - \
- > $LOG_FILE.log 2>&1
- fi
+ SUBCHART_ENABLED=0
+ if [ -f $SUBCHART_OVERRIDES ]; then
+ SUBCHART_ENABLED=$(cat $SUBCHART_OVERRIDES | grep -c "^enabled: true")
fi
- if [ "$DELAY" = "true" ]; then
- echo sleep 3m
- sleep 180
+ if [ "${subchart}" = "strimzi" ] || [ "${subchart}" = "cassandra" ] || [ "${subchart}" = "mariadb-galera" ] || [ "${subchart}" = "postgres" ]; then
+ SUBCHART_ENABLED=0
fi
- else
- array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
- n=${#array[*]}
- for i in $(seq $(($n-1)) -1 0); do
- helm del "${array[i]}"
- done
- fi
- done
+ # Deploy the others
+ if [ $SUBCHART_ENABLED -eq 1 ]; then
+ deploy_subchart
+ else
+ array=($(echo "$ALL_HELM_RELEASES" | grep "${RELEASE}-${subchart}"))
+ n=${#array[*]}
+ for i in $(seq $(($n-1)) -1 0); do
+ helm del "${array[i]}"
+ done
+ fi
+ done
# report on success/failures of installs/upgrades
helm ls --all-namespaces | grep -i FAILED | grep $RELEASE
diff --git a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
index b4d88375fc..1b1bb387b9 100644
--- a/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
+++ b/kubernetes/modeling/components/modeling-etsicatalog/values.yaml
@@ -102,7 +102,7 @@ config:
# application image
flavor: small
-image: onap/modeling/etsicatalog:1.0.11
+image: onap/modeling/etsicatalog:1.0.13
pullPolicy: Always
#Istio sidecar injection policy
diff --git a/kubernetes/strimzi/templates/strimzi-kafka.yaml b/kubernetes/strimzi/templates/strimzi-kafka.yaml
index 4ca53a2913..cfd2ef13cc 100644
--- a/kubernetes/strimzi/templates/strimzi-kafka.yaml
+++ b/kubernetes/strimzi/templates/strimzi-kafka.yaml
@@ -68,7 +68,7 @@ spec:
- id: 0
type: persistent-claim
size: {{ .Values.persistenceKafka.size }}
- deleteClaim: false
+ deleteClaim: true
class: {{ include "common.storageClass" (dict "dot" . "suffix" "kafka" "persistenceInfos" .Values.persistenceKafka) }}
zookeeper:
template:
@@ -82,7 +82,7 @@ spec:
storage:
type: persistent-claim
size: {{ .Values.persistenceZk.size }}
- deleteClaim: false
+ deleteClaim: true
class: {{ include "common.storageClass" (dict "dot" . "suffix" "zk" "persistenceInfos" .Values.persistenceZk) }}
entityOperator:
topicOperator: {}