Skip to content

Instantly share code, notes, and snippets.

@jgato
Created August 24, 2023 09:08
Show Gist options
  • Save jgato/8e992487f6808a5c62d3be5e9ef4cf27 to your computer and use it in GitHub Desktop.
Save jgato/8e992487f6808a5c62d3be5e9ef4cf27 to your computer and use it in GitHub Desktop.
very simple template to create a ZTP CGU
#! /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