Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit e69602e

Browse files
committed
Not sure how this ever worked!
1 parent af2ae09 commit e69602e

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

etc/scripts/installation-functions.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ function install_olm {
173173
mkdir -p "$REPO_DIR"
174174
rm -rf "$OLM_DIR"
175175
git clone https://github.com/operator-framework/operator-lifecycle-manager "$OLM_DIR"
176-
# pushd $OLM_DIR; git checkout f474ec872ca7b1dd; popd
176+
pushd $OLM_DIR; git checkout f474ec872ca7b1dd; popd
177177

178-
sed -i "s|quay.io/coreos/olm@sha256:995a181839f301585a0e115c083619b6d73812c58a8444d7b13b8e407010325f|quay.io/openshift/origin-operator-lifecycle-manager|g" $OLM_DIR/deploy/upstream/manifests/latest/0000_50_olm_06-olm-operator.deployment.yaml $OLM_DIR/deploy/upstream/manifests/latest/0000_50_olm_07-catalog-operator.deployment.yaml $OLM_DIR/deploy/upstream/manifests/latest/0000_50_olm_10-olm-operators.configmap.yaml
178+
# sed -i "s|quay.io/coreos/olm@sha256:995a181839f301585a0e115c083619b6d73812c58a8444d7b13b8e407010325f|quay.io/openshift/origin-operator-lifecycle-manager|g" $OLM_DIR/deploy/upstream/manifests/latest/0000_50_olm_06-olm-operator.deployment.yaml $OLM_DIR/deploy/upstream/manifests/latest/0000_50_olm_07-catalog-operator.deployment.yaml $OLM_DIR/deploy/upstream/manifests/latest/0000_50_olm_10-olm-operators.configmap.yaml
179179

180180
for i in "$OLM_DIR"/deploy/upstream/manifests/latest/*.crd.yaml; do $CMD apply -f $i; done
181181
for i in $(find "$OLM_DIR/deploy/upstream/manifests/latest/" -type f ! -name "*crd.yaml" | sort); do $CMD create -f $i; done
@@ -263,10 +263,22 @@ function install_istio {
263263
}
264264

265265
function install_knative {
266-
if [[ ! "$1" =~ ^(build|serving|eventing)$ ]]; then
267-
echo "Pass one of 'build', 'serving', or 'eventing'"
268-
return -1
269-
fi
266+
local version
267+
case $1 in
268+
build)
269+
version=$KNATIVE_BUILD_VERSION
270+
;;
271+
serving)
272+
version=$KNATIVE_SERVING_VERSION
273+
;;
274+
eventing)
275+
version=$KNATIVE_EVENTING_VERSION
276+
;;
277+
*)
278+
echo "Pass one of 'build', 'serving', or 'eventing'"
279+
return -1
280+
;;
281+
esac
270282
local COMPONENT="knative-$1"
271283
if $CMD get ns ${COMPONENT} 2>/dev/null 1>&2; then
272284
echo "${COMPONENT} namespace exists - reapplying resources"
@@ -293,7 +305,7 @@ function install_knative {
293305
source: knative-operators
294306
sourceNamespace: $(olm_namespace)
295307
name: ${COMPONENT}
296-
startingCSV: ${COMPONENT}.${KNATIVE_BUILD_VERSION}
308+
startingCSV: ${COMPONENT}.${version}
297309
channel: alpha
298310
EOF
299311
}

0 commit comments

Comments
 (0)