Skip to content

Commit

Permalink
minor updates (#265)
Browse files Browse the repository at this point in the history
* minor updates

* fix typo
  • Loading branch information
stewartshea authored Nov 22, 2023
1 parent 8bc3d1b commit a6a95b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codebundles/k8s-certmanager-healthcheck/runbook.robot
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Suite Setup Suite Initialization

*** Tasks ***
Get Namespace Certificate Summary for Namespace `${NAMESPACE}`
[Documentation] Gets a list of certmanager certificates and summarize their information for review.
[Documentation] Gets a list of certmanager certificates that are due for renewal and summarize their information for review.
[Tags] tls certificates kubernetes objects expiration summary certmanager ${NAMESPACE}
${cert_info}= RW.CLI.Run Cli
... cmd=${KUBERNETES_DISTRIBUTION_BINARY} get certificates.cert-manager.io --context=${CONTEXT} -n ${NAMESPACE} -ojson | jq -r --arg now "$(date +%Y-%m-%dT%H:%M:%SZ)" '.items[] | select(.status.conditions[] | select(.type == "Ready" and .status == "True")) | select(.status.renewalTime) | select((.status.notAfter | strptime("%Y-%m-%dT%H:%M:%SZ") | mktime) <= ($now | strptime("%Y-%m-%dT%H:%M:%SZ") | mktime)) | "Namespace:" + .metadata.namespace + " URL:" + .spec.dnsNames[0] + " Renews:" + .status.renewalTime + " Expires:" + .status.notAfter'
Expand Down
4 changes: 3 additions & 1 deletion codebundles/k8s-namespace-healthcheck/runbook.robot
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Troubleshoot Warning Events in Namespace `${NAMESPACE}`
... cmd=echo "${item["object"]}" | awk -F"/" '{print $3}' | sed 's/ *$//' | tr -d '\n'
... env=${env}
... include_in_history=False
#FIXME Theres a case where the object generating the event is gone. We need to figure out how
# to best handle this case instead of "Unknown" "unknown"
${item_owner}= RW.CLI.Run Bash File
... bash_file=find_resource_owners.sh
... cmd_overide=./find_resource_owners.sh ${object_kind.stdout} ${object_short_name.stdout} ${NAMESPACE} ${CONTEXT}
Expand Down Expand Up @@ -91,7 +93,7 @@ Troubleshoot Container Restarts In Namespace `${NAMESPACE}`
... env=${env}
... secret_file__kubeconfig=${kubeconfig}
${recommendations}= RW.CLI.Run Cli
... cmd=echo "${container_restart_analysis.stdout}" | awk '/Recommended Next Steps:/ {flag=1; next} flag'
... cmd=echo '${container_restart_analysis.stdout}' | awk '/Recommended Next Steps:/ {flag=1; next} flag'
... env=${env}
... include_in_history=false
RW.CLI.Parse Cli Output By Line
Expand Down

0 comments on commit a6a95b5

Please sign in to comment.