Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update sma cluster-kafka and cluster-zookeeper from statefulset to cr strimzipodset in tds script #5380

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions upgrade/scripts/k8s/tds_lower_cpu_requests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# MIT License
#
# (C) Copyright 2021-2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2021-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -199,7 +199,7 @@ if [[ $kafkaDeployed -ne 0 ]]; then
echo "Patching cluster-kafka with new cpu request of $cluster_kafka_new_cpu_request (from $current_req)"
kubectl patch kafkas cluster -n sma --type=json -p="[{'op' : 'replace', 'path':'/spec/kafka/resources/requests/cpu', 'value' : \"$cluster_kafka_new_cpu_request\" }]"
sleep 10
until [[ $(kubectl -n sma get statefulset cluster-kafka -o json | jq -r '.status.updatedReplicas') -eq 3 ]]; do
until [[ $(kubectl -n sma get strimzipodset cluster-kafka -o json | jq -r '.status.readyPods') -eq 3 ]]; do
echo "Waiting for cluster-kafka cluster to have three updated replicas..."
sleep 30
done
Expand All @@ -211,7 +211,7 @@ if [[ $kafkaDeployed -ne 0 ]]; then
echo "Patching cluster-zookeeper statefulset with new cpu request of $cluster_zookeeper_new_cpu_request (from $current_req)"
kubectl patch kafkas cluster -n sma --type=json -p="[{'op' : 'replace', 'path':'/spec/zookeeper/resources/requests/cpu', 'value' : \"$cluster_zookeeper_new_cpu_request\" }]"
sleep 10
until [[ $(kubectl -n sma get statefulset cluster-zookeeper -o json | jq -r '.status.updatedReplicas') -eq 3 ]]; do
until [[ $(kubectl -n sma get strimzipodsetstatefulset cluster-zookeeper -o json | jq -r '.status.readyPods') -eq 3 ]]; do
echo "Waiting for cluster-zookeeper cluster to have three updated replicas..."
sleep 30
done
Expand Down