Skip to content

Commit 5db1db0

Browse files
committed
chore(hybrid-quickstart): updating to work with 1.12.1 and the fixes it brings
1 parent 6a50e5e commit 5db1db0

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

tools/hybrid-quickstart/steps.sh

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ set_config_params() {
6363
export GKE_CLUSTER_NAME=${GKE_CLUSTER_NAME:-apigee-hybrid}
6464
export GKE_CLUSTER_MACHINE_TYPE=${GKE_CLUSTER_MACHINE_TYPE:-e2-standard-4}
6565
echo "- GKE Node Type $GKE_CLUSTER_MACHINE_TYPE"
66-
export APIGEE_HYBRID_VERSION='1.12.0'
66+
export APIGEE_HYBRID_VERSION='1.12.1'
6767
echo "- Apigee hybrid version $APIGEE_HYBRID_VERSION"
6868
export CHARTS_REPO=oci://us-docker.pkg.dev/apigee-release/apigee-hybrid-helm-charts
6969
echo "- Repository for Helm charts $CHARTS_REPO"
@@ -93,8 +93,8 @@ set_config_params() {
9393
echo "- Nameserver ${NAME_SERVER:-N/A}"
9494

9595
export QUICKSTART_ROOT="${QUICKSTART_ROOT:-$PWD}"
96+
export HYBRID_HOME="$QUICKSTART_ROOT/generated"
9697
export QUICKSTART_TOOLS="$QUICKSTART_ROOT/tools"
97-
export HYBRID_HOME=$QUICKSTART_ROOT/generated
9898
export HELM_CHARTS_ROOT="$QUICKSTART_ROOT/helm-charts"
9999

100100
echo "- Script root from: $QUICKSTART_ROOT"
@@ -112,7 +112,7 @@ function wait_for_ready(){
112112

113113
# shellcheck disable=SC2001
114114
sanitized="$(echo "$action" | sed 's/Bearer [^\"]*/TOKEN/gi')"
115-
echo -e "Waiting for $sanitized to return output $expected_output"
115+
echo -e " Waiting for $sanitized to return output $expected_output"
116116
echo -e "Start: $(date)\n"
117117

118118
while true; do
@@ -562,6 +562,7 @@ create_k8s_sa_workload() {
562562
K8S_SA=$1
563563
GCP_SA=$2
564564
kubectl create sa -n apigee "$K8S_SA" || echo "$K8S_SA exists"
565+
sleep 1 # so that the next command doesn't return NotFound for K8S_SA
565566
kubectl annotate sa --overwrite -n apigee "$K8S_SA" "iam.gke.io/gcp-service-account=$GCP_SA"
566567

567568
gcloud iam service-accounts add-iam-policy-binding "$GCP_SA" \
@@ -612,15 +613,16 @@ configure_runtime() {
612613
echo "Configure Overrides"
613614

614615
cat << EOF > "$HELM_CHARTS_ROOT"/overrides.yaml
616+
# https://cloud.google.com/apigee/docs/hybrid/latest/config-prop-ref
617+
615618
gcp:
616619
projectID: $PROJECT_ID
617620
region: "$AX_REGION" # Analytics Region
618621
workloadIdentity:
619622
enabled: true
620623
621-
# Apigee org name.
622624
org: $PROJECT_ID
623-
# Kubernetes cluster name details
625+
624626
k8sCluster:
625627
name: $GKE_CLUSTER_NAME
626628
region: "$REGION"
@@ -630,10 +632,6 @@ namespace: apigee
630632
# explictly set node pool names until b/325582303 is resolved
631633
nodeSelector:
632634
requiredForScheduling: false
633-
# apigeeData:
634-
# value: default-pool
635-
# apigeeRuntime:
636-
# value: default-pool
637635
638636
instanceID: "$GKE_CLUSTER_NAME-$REGION"
639637
@@ -644,9 +642,6 @@ envs:
644642
synchronizer: apigee-synchronizer@$PROJECT_ID.iam.gserviceaccount.com
645643
udca: apigee-udca@$PROJECT_ID.iam.gserviceaccount.com
646644
647-
udca:
648-
gsa: apigee-udca@$PROJECT_ID.iam.gserviceaccount.com
649-
650645
watcher:
651646
gsa: apigee-watcher@$PROJECT_ID.iam.gserviceaccount.com
652647
@@ -661,7 +656,7 @@ metrics:
661656
gsa: apigee-metrics@$PROJECT_ID.iam.gserviceaccount.com
662657
663658
logger:
664-
enabled: true
659+
enabled: false
665660
gsa: apigee-logger@$PROJECT_ID.iam.gserviceaccount.com
666661
667662
virtualhosts:
@@ -675,7 +670,6 @@ virtualhosts:
675670
ingressGateways:
676671
- name: apigee-ingress
677672
replicaCountMin: 1
678-
replicaCountMax: 2
679673
EOF
680674

681675
if [ "$CERT_TYPE" = "google-managed" ]; then
@@ -695,7 +689,7 @@ fi
695689

696690
install_wildcard_gateway() {
697691
timeout 300 bash -c 'until kubectl wait --for=condition=ready --timeout 60s pod -l app=apigee-controller -n apigee-system; do sleep 10; done'
698-
kubectl apply -f "$HYBRID_HOME"/generated/wildcard-gateway.yaml
692+
kubectl apply -f "$HYBRID_HOME"/wildcard-gateway.yaml
699693
}
700694

701695
check_cluster_readiness() {
@@ -754,7 +748,7 @@ EOF
754748

755749
kubectl apply -f "$HYBRID_HOME"/apigee-k8s-cluster-ready-check.yaml
756750
echo "- ⏳ Waiting for jobs/apigee-k8s-cluster-ready-check to complete..."
757-
timeout 180 bash -c 'until kubectl wait --for=condition=complete --timeout 60s jobs apigee-k8s-cluster-ready-check; do sleep 2; done'
751+
timeout 300 bash -c 'until kubectl wait --for=condition=complete --timeout 60s jobs apigee-k8s-cluster-ready-check; do sleep 2; done'
758752
kubectl delete -f "$HYBRID_HOME"/apigee-k8s-cluster-ready-check.yaml # one-off job not needed anymore
759753

760754
echo "✅ Completed readiness checks and deleted job"
@@ -876,7 +870,7 @@ install_runtime() {
876870
timeout 600 bash -c 'until kubectl wait --for=jsonpath='{.status.state}'=running --timeout 60s apigeeroute $(kubectl get apigeeroute -o=jsonpath='{.items[0].metadata.name}' -n apigee) -n apigee; do sleep 10; done'
877871
echo "✅ apigee-virtualhost installed and ready"
878872

879-
cat << EOF > "$HYBRID_HOME"/generated/wildcard-gateway.yaml
873+
cat << EOF > "$HYBRID_HOME"/wildcard-gateway.yaml
880874
apiVersion: apigee.cloud.google.com/v1alpha1
881875
kind: ApigeeRoute
882876
metadata:

0 commit comments

Comments
 (0)