Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing loki < 6.0 with the stable channel on OCP < 4.14 #654

Open
wants to merge 1 commit into
base: netobserv-perf-tests
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions scripts/loki/loki-released-subscription.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions scripts/loki/loki-subscription-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: loki-subcription-template
objects:
- apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: loki-operator
namespace: openshift-operators-redhat
spec:
channel: "${{LOKI_CHANNEL}}"
name: loki-operator
source: "${{SOURCE}}"
sourceNamespace: openshift-marketplace
parameters:
- name: LOKI_CHANNEL
value: "stable-6.0"
- name: SOURCE
value: "redhat-operators"
10 changes: 0 additions & 10 deletions scripts/loki/loki-unreleased-subscription.yaml

This file was deleted.

16 changes: 14 additions & 2 deletions scripts/netobserv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,24 @@ deploy_lokistack() {
echo "====> Creating openshift-operators-redhat Namespace and OperatorGroup"
oc apply -f $SCRIPTS_DIR/loki/loki-operatorgroup.yaml

echo "====> Check the OCP release version:"
oc_minor_version=$(oc get clusterversion --no-headers | awk '{ print $2 }' | cut -d'.' -f2 -)

if [[ $(($oc_minor_version)) -ge 14 ]];
then
loki_channel="stable-6.0" ; echo "=====> Deploying the Loki with stable-6.0 channel..."
else
loki_channel="stable" ; echo "=====> Deploying the Loki with the stable channel..."
fi

echo "====> Creating netobserv-downstream-testing CatalogSource (if applicable) and Loki Operator Subscription"
if [[ $LOKI_OPERATOR == "Released" ]]; then
oc apply -f $SCRIPTS_DIR/loki/loki-released-subscription.yaml
oc process --ignore-unknown-parameters=true -f $SCRIPTS_DIR/loki/loki-subscription-template.yaml -p LOKI_CHANNEL=$loki_channel -p SOURCE=redhat-operators -o yaml > /tmp/loki-released-subscription.yaml
oc apply -f /tmp/loki-released-subscription.yaml -n openshift-operators-redhat
elif [[ $LOKI_OPERATOR == "Unreleased" ]]; then
deploy_downstream_catalogsource
oc apply -f $SCRIPTS_DIR/loki/loki-unreleased-subscription.yaml
oc process --ignore-unknown-parameters=true -f $SCRIPTS_DIR/loki/loki-subscription-template.yaml -p LOKI_CHANNEL=$loki_channel -p SOURCE=netobserv-downstream-testing -o yaml > /tmp/loki-unreleased-subscription.yaml
oc apply -f /tmp/loki-unreleased-subscription.yaml -n openshift-operators-redhat
else
echo "====> No Loki Operator config was found - using 'Released'"
echo "====> To set config, set LOKI_OPERATOR variable to either 'Released' or 'Unreleased'"
Expand Down