Skip to content

Commit

Permalink
Merge pull request #22 from edenlabllc/release/v1.28.0
Browse files Browse the repository at this point in the history
Release/v1.28.0
  • Loading branch information
apanasiuk-el authored Jan 2, 2025
2 parents c57009b + 7ebe987 commit 5ceb373
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/gcp-cluster-postsync-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

RELEASE_NAME="${1}"
NAMESPACE="${2:-gcp}"
NAMESPACE="${2:-capg-system}"
LIMIT="${3:-1200}"

GO_TEMPLATE='
Expand Down
27 changes: 27 additions & 0 deletions bin/gcp-cluster-presync-hook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

set -e

NAMESPACE="${1:-capg-system}"
REGISTRY="${2}"
VERSION="${3}"

readonly CONTROLLER_MANAGER_NAME=capg-controller-manager
readonly CONTROLLER_MANAGER_CONTAINER_NAME=manager

if [[ -n "${REGISTRY}" && -n "${VERSION}" ]]; then
IMAGE="${REGISTRY}:${VERSION}"
else
exit 0
fi

if (kubectl --namespace "${NAMESPACE}" get deployment "${CONTROLLER_MANAGER_NAME}" &> /dev/null); then
CURRENT_IMAGE="$(kubectl --namespace "${NAMESPACE}" get deployment "${CONTROLLER_MANAGER_NAME}" --output yaml \
| yq '.spec.template.spec.containers[] | select(.name == "'"${CONTROLLER_MANAGER_CONTAINER_NAME}"'") | .image')"

if [[ "${CURRENT_IMAGE}" != "${IMAGE}" ]]; then
kubectl --namespace "${NAMESPACE}" \
set image deployment "${CONTROLLER_MANAGER_NAME}" "${CONTROLLER_MANAGER_CONTAINER_NAME}=${IMAGE}"
kubectl --namespace "${NAMESPACE}" rollout status deployment "${CONTROLLER_MANAGER_NAME}"
fi
fi
2 changes: 1 addition & 1 deletion bin/gcp-cluster-uninstall-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

CLUSTER_NAME="${1}"
NAMESPACE="${2}"
NAMESPACE="${2:-capg-system}"
WAIT_FOR_CLUSTER_DELETION="${3:-false}"

kubectl --namespace "${NAMESPACE}" delete cluster "${CLUSTER_NAME}" "--wait=${WAIT_FOR_CLUSTER_DELETION}"
Expand Down

0 comments on commit 5ceb373

Please sign in to comment.