Skip to content

Commit

Permalink
Merge pull request #63 from wunderio/feature/rollout-status
Browse files Browse the repository at this point in the history
rollout status is only available for RollingUpdate strategy type
  • Loading branch information
Rade333 authored Aug 6, 2024
2 parents 12d5829 + 8522bf0 commit 4fe3dad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/ciReleaseDeploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ var ciReleaseDeployCmd = &cobra.Command{
# Wait for resources to be ready
# Get all deployments and statefulsets in the release and check the status of each one.
statefulsets=$(kubectl get statefulset -n "$NAMESPACE" -l "release=${RELEASE_NAME}" -o name)
statefulsets=$(kubectl get statefulset -n "${NAMESPACE}" -l "release=${RELEASE_NAME}" -o=json | jq '.items[]|select(.spec.updateStrategy.type=="RollingUpdate")|.metadata.name')
if [ ! -z "$statefulsets" ]; then
echo "$statefulsets" | xargs -n 1 kubectl rollout status -n "$NAMESPACE" --timeout 5m
echo "$statefulsets" | xargs -n 1 kubectl rollout status statefulset -n "$NAMESPACE" --timeout 5m
fi
kubectl get deployment -n "$NAMESPACE" -l "release=${RELEASE_NAME}" -o name | xargs -n 1 kubectl rollout status -n "$NAMESPACE" --timeout 5m
`,
Expand Down Expand Up @@ -617,9 +617,9 @@ var ciReleaseDeployCmd = &cobra.Command{
# Wait for resources to be ready
# Get all deployments and statefulsets in the release and check the status of each one.
statefulsets=$(kubectl get statefulset -n "$NAMESPACE" -l "release=${RELEASE_NAME}" -o name)
statefulsets=$(kubectl get statefulset -n "${NAMESPACE}" -l "release=${RELEASE_NAME}" -o=json | jq '.items[]|select(.spec.updateStrategy.type=="RollingUpdate")|.metadata.name')
if [ ! -z "$statefulsets" ]; then
echo "$statefulsets" | xargs -n 1 kubectl rollout status -n "$NAMESPACE" --timeout 5m
echo "$statefulsets" | xargs -n 1 kubectl rollout status statefulset -n "$NAMESPACE" --timeout 5m
fi
kubectl get deployment -n "$NAMESPACE" -l "release=${RELEASE_NAME}" -o name | xargs -n 1 kubectl rollout status -n "$NAMESPACE" --timeout 5m
`,
Expand Down

0 comments on commit 4fe3dad

Please sign in to comment.