Created
August 24, 2023 09:08
-
-
Save jgato/8e992487f6808a5c62d3be5e9ef4cf27 to your computer and use it in GitHub Desktop.
very simple template to create a ZTP CGU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: ./script.sh <CGU-NAME> <CLUSTER-NAME>" | |
exit 1 | |
fi | |
export CGUNAME=$1 | |
export CLUSTERNAME=$2 | |
cat <<"EOF" | envsubst | |
apiVersion: ran.openshift.io/v1alpha1 | |
kind: ClusterGroupUpgrade | |
metadata: | |
name: ${CGUNAME} | |
namespace: ztp-install | |
spec: | |
backup: false | |
clusters: | |
- ${CLUSTERNAME} | |
enable: true | |
managedPolicies: | |
- | |
preCaching: false | |
remediationStrategy: | |
maxConcurrency: 1 | |
timeout: 240 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment