-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
METADATA_FILE="${1:-/root/cnf-features-deploy/ztp/kube-compare-reference/metadata.yaml}" | ||
|
||
if [ "$(which kubectl-cluster_compare)" == "" ] ; then | ||
curl -L https://github.com/openshift/kube-compare/releases/download/v0.0.1/kube-compare_linux_amd64.tar.gz > kube-compare_linux_amd64.tar.gz | ||
tar zxvf kube-compare_linux_amd64.tar.gz | ||
mv kubectl-cluster_compare /usr/local/bin | ||
podman create --name kca registry.redhat.io/openshift4/kube-compare-artifacts-rhel9:latest | ||
podman cp kca:/usr/share/openshift/linux_amd64/kube-compare.rhel9 /usr/local/bin/kubectl_cluster-compare | ||
podman rm -f kca | ||
chmod u+x /usr/local/bin/kubectl-cluster_compare | ||
fi | ||
if [ ! -d /root/reference ] ; then | ||
cd /root | ||
# MINOR=$(openshift-install version | head -1 | cut -d' ' -f2 | cut -d. -f1,2) | ||
# git clone --depth 1 --branch release-$MINOR https://github.com/openshift-kni/cnf-features-deploy | ||
git clone https://github.com/openshift-kni/cnf-features-deploy | ||
mkdir reference | ||
cp -r cnf-features-deploy/ztp/source-crs/* reference | ||
cp $METADATA_FILE reference/metadata.yaml | ||
MINOR=$(openshift-install version | head -1 | cut -d' ' -f2 | cut -d. -f1,2) | ||
{% if kubecompare_ran|default(true) %} | ||
podman run -it registry.redhat.io/openshift4/openshift-telco-core-rds-rhel9:v$MINOR | base64 -d | tar xv -C /root/reference | ||
{% else %} | ||
podman run --rm --log-driver=none registry.redhat.io/openshift4/ztp-site-generate-rhel8:v$MINOR extract /home/ztp --tar | tar xv -C /root/reference | ||
{% endif %} | ||
fi | ||
kubectl cluster-compare -r /root/reference/metadata.yaml |