File tree Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Expand file tree Collapse file tree 4 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ kubectl get hetznerbaremetalhost -A
4242
4343print_heading events:
4444
45- kubectl get events -A --sort-by=lastTimestamp | grep -vP ' LeaderElection' | tail -8
45+ kubectl get events -A --sort-by=lastTimestamp | grep -vP ' LeaderElection' | tail -6
4646
4747print_heading caph:
4848
@@ -54,15 +54,16 @@ regex='^I\d\d\d\d|\
5454.*failed to retrieve Spec.ProviderID|\
5555.*failed to patch Machine default
5656'
57- capi_logs=$( kubectl logs -n capi-system deployments/capi-controller-manager --since 7m | grep -vP " $( echo " $regex " | tr -d ' \n' ) " | tail -5)
57+ capi_ns=$( kubectl get deployments -A | grep capi-con | cut -d' ' -f1)
58+ capi_logs=$( kubectl logs -n " $capi_ns " deployments/capi-controller-manager --since 10m | grep -vP " $( echo " $regex " | tr -d ' \n' ) " | tail -5)
5859if [ -n " $capi_logs " ]; then
5960 print_heading capi
6061 echo " $capi_logs "
6162fi
6263
6364echo
6465
65- if [ $( kubectl get machine -l cluster.x-k8s.io/control-plane 2> /dev/null | wc -l) -eq 0 ]; then
66+ if [[ $( kubectl get machine -l cluster.x-k8s.io/control-plane 2> /dev/null | wc -l) -eq 0 ] ]; then
6667 echo " ❌ no control-plane machine exists."
6768 exit 1
6869fi
Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17- pod=$( kubectl -n caph-system get pods | grep caph-controller-manager | cut -d' ' -f1)
17+ ns=$( kubectl get deployments.apps -A | grep caph-controller-manager | cut -d' ' -f1)
18+ pod=$( kubectl -n " $ns " get pods | grep caph-controller-manager | cut -d' ' -f1)
1819
1920if [ -z " $pod " ]; then
2021 echo " failed to find caph-controller-manager pod"
2122 exit 1
2223fi
2324
24- kubectl -n caph-system logs " $pod " --tail 200 | \
25- ./hack/filter-caph-controller-manager-logs.py - | \
26- tail -n 20
25+ kubectl -n " $ns " logs " $pod " --tail 200 |
26+ ./hack/filter-caph-controller-manager-logs.py - |
27+ tail -n 10
Original file line number Diff line number Diff line change 2525trap ' echo "Warning: A command has failed. Exiting the script. Line was ($0:$LINENO): $(sed -n "${LINENO}p" "$0")"; exit 3' ERR
2626set -Eeuo pipefail
2727
28+ if [[ $( kubectl config current-context) == * oidc@* ]]; then
29+ echo " found oidc@ in the current kubectl context. It is likely that you are connected"
30+ echo " to the wrong cluster"
31+ exit 1
32+ fi
33+
2834image_path=" ghcr.io/syself"
2935
3036while [[ " $# " -gt 0 ]]; do
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616
1717# This script is executed in the Update-Bot container.
18+ # Call it via `make builder-image-push`.
1819# It checks if the Dockerfile for the build container has changed.
1920# If so, it uses the version of the main branch as the basis for creating a new image tag.
2021# The script also checks if the image tag for the build image exists in the main branch.
You can’t perform that action at this time.
0 commit comments