Skip to content

Commit

Permalink
hotfix/codebundle timeout and code handling
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartshea authored Dec 18, 2023
1 parent 07596e4 commit 75e8321
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Remediate Readiness and Liveness Probe GitOps Manifests for Deployments in Names
... env=${env}
... include_in_history=False
... secret_file__kubeconfig=${kubeconfig}
... timeout_seconds=180
${remediation_list}= RW.CLI.Run Cli
... cmd=echo \'\'\'${probe_health.stdout}\'\'\' | awk "/Remediation Steps:/ {start=1; getline} start"
... env=${env}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ for ((o=0; o<NUM_OBJECTS; o++)); do

if [[ ! " $CONTAINER_PORTS " == *"$PROBE_PORT"* ]]; then
echo "Container \`$CONTAINER_NAME\`: Port $PROBE_PORT used in $PROBE_TYPE is not exposed by the container."
next_steps+=("Update $PROBE_TYPE For ${OBJECT_TYPE}\`${OBJECT_NAME}\` to use one of the following ports: $CONTAINER_PORTS")
next_steps+=("Update $PROBE_TYPE For ${OBJECT_TYPE} \`${OBJECT_NAME}\` to use one of the following ports: $CONTAINER_PORTS")
remediation_steps+=("{\"remediation_type\":\"probe_update\", \"object\": \"$OBJECT_TYPE}\\$OBJECT_NAME\", \"probe_type\": \"$PROBE_TYPE\", \"exec\":\"false\", \"invalid_port\":\"$PROBE_PORT\",\"valid_ports\":\"$CONTAINER_PORTS\", \"container\":\"$CONTAINER_NAME\"}")
else
echo "Container \`$CONTAINER_NAME\`: ${PROBE_TYPE} port $PROBE_PORT is valid."
Expand Down
4 changes: 2 additions & 2 deletions codebundles/k8s-deployment-healthcheck/runbook.robot
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Check Liveness Probe Configuration for Deployment `${DEPLOYMENT_NAME}`
... secret_file__kubeconfig=${kubeconfig}
... show_in_rwl_cheatsheet=true
${recommendations}= RW.CLI.Run Cli
... cmd=echo '${liveness_probe_health.stdout}' | awk '/Recommended Next Steps:/ {flag=1; next} flag'
... cmd=echo '''${liveness_probe_health.stdout}''' | awk '/Recommended Next Steps:/ {flag=1; next} flag'
... env=${env}
... include_in_history=false
IF len($recommendations.stdout) > 0
Expand Down Expand Up @@ -116,7 +116,7 @@ Check Readiness Probe Configuration for Deployment `${DEPLOYMENT_NAME}`
... secret_file__kubeconfig=${kubeconfig}
... show_in_rwl_cheatsheet=true
${recommendations}= RW.CLI.Run Cli
... cmd=echo '${readiness_probe_health.stdout}' | awk '/Recommended Next Steps:/ {flag=1; next} flag'
... cmd=echo '''${readiness_probe_health.stdout}''' | awk '/Recommended Next Steps:/ {flag=1; next} flag'
... env=${env}
... include_in_history=false
IF len($recommendations.stdout) > 0
Expand Down

0 comments on commit 75e8321

Please sign in to comment.