From 5be71d8c14095fdaef6ccdeefe3279c16ece99ca Mon Sep 17 00:00:00 2001 From: Theo Barber-Bany Date: Wed, 25 Sep 2024 18:51:11 +0100 Subject: [PATCH] Remove code examples --- .../src/developer/providers/code-examples.md | 28 ------------------- hack/verify-capi-book-summary.sh | 4 +-- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 docs/book/src/developer/providers/code-examples.md diff --git a/docs/book/src/developer/providers/code-examples.md b/docs/book/src/developer/providers/code-examples.md deleted file mode 100644 index 79cba76c1d87..000000000000 --- a/docs/book/src/developer/providers/code-examples.md +++ /dev/null @@ -1,28 +0,0 @@ - - // Return early and set the paused condition to True if the object or Cluster - // is paused. - // We assume that the change to the object has to be written, e.g. via the - // patchHelper in defer. - if annotations.IsPaused(cluster, m) { - log.Info("Reconciliation is paused for this object") - - newPausedCondition := &clusterv1.Condition{ - Type: clusterv1.PausedCondition, - Status: corev1.ConditionTrue, - Severity: clusterv1.ConditionSeverityInfo, - } - - if cluster.Spec.Paused { - newPausedCondition.Reason = clusterv1.ClusterPausedReason - newPausedCondition.Message = fmt.Sprintf("The cluster %s is paused, pausing this object until the cluster is unpaused", cluster.Name) - } else { - newPausedCondition.Reason = clusterv1.AnnotationPausedReason - newPausedCondition.Message = fmt.Sprintf("The machine %s is paused, pausing this object until the annotation is removed", m.Name) - - } - - conditions.Set(m, newPausedCondition) - return ctrl.Result{}, nil - } - - conditions.MarkFalseWithNegativePolarity(m, clusterv1.PausedCondition) diff --git a/hack/verify-capi-book-summary.sh b/hack/verify-capi-book-summary.sh index eb760792198d..f59923db3aed 100755 --- a/hack/verify-capi-book-summary.sh +++ b/hack/verify-capi-book-summary.sh @@ -26,7 +26,7 @@ RESULT=0 SUMMARY=$(cat ./docs/book/src/SUMMARY.md) pushd ./docs/book/src > /dev/null -FILES=$(find -- * -name "*.md" ! -name "SUMMARY.md" ! -name "code-examples.md") +FILES=$(find -- * -name "*.md" ! -name "SUMMARY.md") while read -r file; do if ! [[ $SUMMARY == *"${file}"* ]]; then RESULT=1 @@ -35,4 +35,4 @@ while read -r file; do done <<< "${FILES}" popd > /dev/null -exit ${RESULT} +exit ${RESULT} \ No newline at end of file