@@ -6,15 +6,21 @@ source "$DIR"/utils.sh
66initiate_aks_helm_deployment () {
77 delete_namespace " ${NAME_SPACE_RBAC} "
88 configure_namespace " ${NAME_SPACE} "
9+
910 deploy_redis_cache " ${NAME_SPACE} "
1011 patch_and_restart " $NAME_SPACE " " deployment" " redis" " ${DIR} /cluster/aks/patch/aks-spot-patch.yaml" # Patch Redis deployment to run on spot cluster
12+
1113 uninstall_helmchart " ${NAME_SPACE} " " ${RELEASE_NAME} "
14+
1215 cd " ${DIR} " || exit
1316 local rhdh_base_url=" https://${K8S_CLUSTER_ROUTER_BASE} "
1417 apply_yaml_files " ${DIR} " " ${NAME_SPACE} " " ${rhdh_base_url} "
1518 yq_merge_value_files " merge" " ${DIR} /value_files/${HELM_CHART_VALUE_FILE_NAME} " " ${DIR} /value_files/${HELM_CHART_AKS_DIFF_VALUE_FILE_NAME} " " /tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME} "
1619 mkdir -p " ${ARTIFACT_DIR} /${NAME_SPACE} "
1720 cp -a " /tmp/${HELM_CHART_K8S_MERGED_VALUE_FILE_NAME} " " ${ARTIFACT_DIR} /${NAME_SPACE} /" # Save the final value-file into the artifacts directory.
21+
22+ setup_image_pull_secret " ${NAME_SPACE} " " rh-pull-secret" " ${REGISTRY_REDHAT_IO_SERVICE_ACCOUNT_DOCKERCONFIGJSON} "
23+
1824 echo " Deploying image from repository: ${QUAY_REPO} , TAG_NAME: ${TAG_NAME} , in NAME_SPACE: ${NAME_SPACE} "
1925 helm upgrade -i " ${RELEASE_NAME} " -n " ${NAME_SPACE} " \
2026 " ${HELM_CHART_URL} " --version " ${CHART_VERSION} " \
@@ -27,16 +33,21 @@ initiate_aks_helm_deployment() {
2733initiate_rbac_aks_helm_deployment () {
2834 delete_namespace " ${NAME_SPACE} "
2935 configure_namespace " ${NAME_SPACE_RBAC} "
36+
3037 uninstall_helmchart " ${NAME_SPACE_RBAC} " " ${RELEASE_NAME_RBAC} "
38+
3139 cd " ${DIR} " || exit
3240 local rbac_rhdh_base_url=" https://${K8S_CLUSTER_ROUTER_BASE} "
3341 apply_yaml_files " ${DIR} " " ${NAME_SPACE_RBAC} " " ${rbac_rhdh_base_url} "
3442 yq_merge_value_files " merge" " ${DIR} /value_files/${HELM_CHART_RBAC_VALUE_FILE_NAME} " " ${DIR} /value_files/${HELM_CHART_RBAC_AKS_DIFF_VALUE_FILE_NAME} " " /tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME} "
3543 mkdir -p " ${ARTIFACT_DIR} /${NAME_SPACE_RBAC} "
3644 cp -a " /tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME} " " ${ARTIFACT_DIR} /${NAME_SPACE_RBAC} /" # Save the final value-file into the artifacts directory.
45+
46+ setup_image_pull_secret " ${NAME_SPACE_RBAC} " " rh-pull-secret" " ${REGISTRY_REDHAT_IO_SERVICE_ACCOUNT_DOCKERCONFIGJSON} "
47+
3748 echo " Deploying image from repository: ${QUAY_REPO} , TAG_NAME: ${TAG_NAME} , in NAME_SPACE: ${NAME_SPACE_RBAC} "
3849 helm upgrade -i " ${RELEASE_NAME_RBAC} " -n " ${NAME_SPACE_RBAC} " \
39- " ${HELM_REPO_NAME} / ${HELM_IMAGE_NAME }" --version " ${CHART_VERSION} " \
50+ " ${HELM_CHART_URL } " --version " ${CHART_VERSION} " \
4051 -f " /tmp/${HELM_CHART_RBAC_K8S_MERGED_VALUE_FILE_NAME} " \
4152 --set global.host=" ${K8S_CLUSTER_ROUTER_BASE} " \
4253 --set upstream.backstage.image.repository=" ${QUAY_REPO} " \
0 commit comments