Merge pull request #12774 from obnoxxx/multus-validation-job-autogen

Multus validation job automated update
This commit is contained in:
Blaine Gardner
2023-08-25 11:51:40 -06:00
committed by GitHub
4 changed files with 70 additions and 11 deletions
+3 -3
View File
@@ -33,12 +33,12 @@ jobs:
with:
python-version: 3.9
- name: Run helm-docs
- name: Run docs
run: |
make helm-docs
make docs
DIFF=$(git diff)
if [ ! -z "$DIFF" ]; then
echo "Please run 'make helm-docs' locally, commit the updated docs, and push the change. See https://rook.io/docs/rook/latest/Contributing/documentation/#running-helm-docs"
echo "Please run 'make docs' locally, commit the updated docs, and push the change. See https://rook.io/docs/rook/latest/Contributing/documentation/#running-helm-docs"
fi
git diff --exit-code
+3
View File
@@ -190,6 +190,9 @@ csv: csv-clean crds ## Generate a CSV file for OLM.
csv-clean: ## Remove existing OLM files.
@$(MAKE) -C images/ceph csv-clean
docs: helm-docs
@build/deploy/generate-deploy-examples.sh
crds: $(CONTROLLER_GEN) $(YQ)
@echo Updating CRD manifests
@build/crds/build-crds.sh $(CONTROLLER_GEN) $(YQ)
+24
View File
@@ -0,0 +1,24 @@
#! /usr/bin/env bash
set -e
SCRIPT_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)
MANIFEST_FILE=../../deploy/examples/multus-validation.yaml
SED=${SCRIPT_ROOT}/../../build/sed-in-place
if [[ ${SKIP_GEN} = true ]]; then
echo "SKIP_GEN is set, skipping manifest generation"
exit
fi
OUT_FILE="${SCRIPT_ROOT}/${MANIFEST_FILE}"
TMP_FILE="$(mktemp)"
START_MARKER='# THE BELOW HELP TEXT IS AUTO-GENERATED BY `make docs`$'
END_MARKER='# THE ABOVE HELP TEXT IS AUTO-GENERATED BY `make docs`$'
go run ${SCRIPT_ROOT}/../../cmd/rook/*.go multus validation run --help | awk '{print "# "$0}' | sed -e 's/[ \t]*$//' > ${TMP_FILE}
${SED} -e "/$START_MARKER/,/$END_MARKER/{ /$START_MARKER/{ p ; r $TMP_FILE
}; /$END_MARKER/p; d; }" ${OUT_FILE}
rm -f ${TMP_FILE}
+40 -8
View File
@@ -1,11 +1,43 @@
#################################################################################################################
# We highly recommend validating your Multus configuration before you install Rook.
# This job aims to automate that operation by using the validation tool. Run this job after
# installing the rook operator and before installing any Custom Resources.
# Insert the NAD name for public network and cluster network in the Job definition below.
# If you want to use any other flags along with the basic command in the Job,
# add the `--help` flag in the end to see the list of flags available, and use accordingly.
#################################################################################################################
####################################################################################################
# This manifest contains a Kubernetes Job and supporting definitions for running Rook's Multus
# validation tool. The Multus validation tool's help text is copied below. Modify the Job
# definition in this manifest based on the needs of your cluster.
####################################################################################################
# THE BELOW HELP TEXT IS AUTO-GENERATED BY `make docs`
#
# Run a validation test that determines whether the current Multus and system
# configurations will support Rook with Multus.
#
# This should be run BEFORE Rook is installed.
#
# This is a fairly long-running test. It starts up a web server and many
# clients to verify that Multus network communication works properly.
#
# It does *not* perform any load testing. Networks that cannot support high
# volumes of Ceph traffic may still encounter runtime issues. This may be
# particularly noticeable with high I/O load or during OSD rebalancing
# (see: https://docs.ceph.com/en/latest/architecture/#rebalancing).
# For example, during Rook or Ceph cluster upgrade.
#
# Override the kube config file location by setting the KUBECONFIG environment variable.
#
# Usage:
# rook multus validation run [--public-network=<nad-name>] [--cluster-network=<nad-name>] [flags]
#
# Flags:
# --cluster-network string The name of the Network Attachment Definition (NAD) that will be used for Ceph's cluster network. This should be a namespaced name in the form <namespace>/<name> if the NAD is defined in a different namespace from the cluster namespace.
# -c, --config string The validation test config file to use. This cannot be used with other flags.
# --daemons-per-node int The number of validation test daemons to run per node. It is recommended to set this to the maximum number of Ceph daemons that can run on any node in the worst case of node failure(s). The default value is set to the worst-case value for a Rook Ceph cluster with 3 portable OSDs, 3 portable monitors, and where all optional child resources have been created with 1 daemon such that they all might run on a single node in a failure scenario. If you aren't sure what to choose for this value, add 1 for each additional OSD beyond 3. (default 16)
# -h, --help help for run
# -n, --namespace string The namespace for validation test resources. It is recommended to set this to the namespace in which Rook's Ceph cluster will be installed. (default "rook-ceph")
# --nginx-image string The Nginx image used for the validation server and clients. (default "nginxinc/nginx-unprivileged:stable-alpine")
# --public-network string The name of the Network Attachment Definition (NAD) that will be used for Ceph's public network. This should be a namespaced name in the form <namespace>/<name> if the NAD is defined in a different namespace from the cluster namespace.
# --timeout-minutes timeoutMinutes The time to wait for resources to change to the expected state. For example, for the test web server to start, for test clients to become ready, or for test resources to be deleted. At longest, this may need to reflect the time it takes for client pods to to pull images, get address assignments, and then for each client to determine that its network connection is stable. Minimum: 1 minute. Recommended: 2 minutes or more. (default 3m0s)
#
# Global Flags:
# --log-level string logging level for logging/tracing output (valid values: ERROR,WARNING,INFO,DEBUG) (default "INFO")
# THE ABOVE HELP TEXT IS AUTO-GENERATED BY `make docs`
####################################################################################################
---
# Service account for job that validates multus configuration
apiVersion: v1