Skip to content

Commit

Permalink
Making ES7 domain default
Browse files Browse the repository at this point in the history
  • Loading branch information
EliseCastle23 authored Oct 21, 2024
1 parent 9508c8f commit 69042b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gen3/bin/kube-setup-aws-es-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ envname="$(gen3 api environment)"

if g3kubectl get secrets/aws-es-proxy > /dev/null 2>&1; then
if [ "$esDomain" != "null" ]; then
if ES_ENDPOINT="$(aws es describe-elasticsearch-domains --domain-names "${esDomain}" --query "DomainStatusList[*].Endpoints" --output text)" \
if ES_ENDPOINT="$(aws es describe-elasticsearch-domains --domain-names "${envname}"-gen3-metadata-2 --query "DomainStatusList[*].Endpoints" --output text)" \
&& [[ -n "${ES_ENDPOINT}" && -n "${esDomain}" ]]; then
gen3 roll aws-es-proxy GEN3_ES_ENDPOINT "${ES_ENDPOINT}"
g3kubectl apply -f "${GEN3_HOME}/kube/services/aws-es-proxy/aws-es-proxy-priority-class.yaml"
Expand All @@ -33,8 +33,8 @@ if g3kubectl get secrets/aws-es-proxy > /dev/null 2>&1; then
gen3 kube-setup-networkpolicy service aws-es-proxy
g3kubectl patch deployment "aws-es-proxy-deployment" -p '{"spec":{"template":{"metadata":{"labels":{"netvpc":"yes"}}}}}' || true
fi
elif [ "$es7" = true ]; then
if ES_ENDPOINT="$(aws es describe-elasticsearch-domains --domain-names "${envname}"-gen3-metadata-2 --query "DomainStatusList[*].Endpoints" --output text)" \
elif [ "$es7" = false ]; then
if ES_ENDPOINT="$(aws es describe-elasticsearch-domains --domain-names "${esDomain}" --query "DomainStatusList[*].Endpoints" --output text)" \
&& [[ -n "${ES_ENDPOINT}" && -n "${envname}" ]]; then
gen3 roll aws-es-proxy GEN3_ES_ENDPOINT "${ES_ENDPOINT}"
g3kubectl apply -f "${GEN3_HOME}/kube/services/aws-es-proxy/aws-es-proxy-priority-class.yaml"
Expand Down Expand Up @@ -139,4 +139,4 @@ POLICY
gen3 kube-setup-networkpolicy service aws-es-proxy
g3kubectl patch deployment "aws-es-proxy-deployment" -p '{"spec":{"template":{"metadata":{"labels":{"netvpc":"yes"}}}}}' || true
fi
fi
fi

0 comments on commit 69042b0

Please sign in to comment.