From 9d847c7692734a00762171b9043a3b69df77ffe6 Mon Sep 17 00:00:00 2001 From: craig Date: Mon, 2 Oct 2023 12:18:18 +0100 Subject: [PATCH] allow channel to be overridden --- cmd/ocm/addon-manager/manifests/subscription.yaml | 2 +- cmd/ocm/main.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/ocm/addon-manager/manifests/subscription.yaml b/cmd/ocm/addon-manager/manifests/subscription.yaml index fdac6755d..8a3ed1a0b 100644 --- a/cmd/ocm/addon-manager/manifests/subscription.yaml +++ b/cmd/ocm/addon-manager/manifests/subscription.yaml @@ -4,7 +4,7 @@ metadata: name: kuadrant-operator namespace: kuadrant-system spec: - channel: alpha + channel: {{.Channel}} installPlanApproval: Automatic name: kuadrant-operator source: {{.CatalogSource}} diff --git a/cmd/ocm/main.go b/cmd/ocm/main.go index b4243b1b7..bcbe10085 100644 --- a/cmd/ocm/main.go +++ b/cmd/ocm/main.go @@ -37,6 +37,7 @@ func GetDefaultValues(cluster *clusterv1.ManagedCluster, defaultIstioConfigMap := "istio" defaultCatalog := "operatorhubio-catalog" defaultCatalogNS := "olm" + defaultChannel := "alpha" manifestConfig := struct { IstioOperator string @@ -45,6 +46,7 @@ func GetDefaultValues(cluster *clusterv1.ManagedCluster, ClusterName string CatalogSource string CatalogSourceNS string + Channel string }{ ClusterName: cluster.Name, IstioOperator: defaultIstioOperator, @@ -52,6 +54,7 @@ func GetDefaultValues(cluster *clusterv1.ManagedCluster, IstioOperatorNamespace: defaultIstioOperatorNS, CatalogSource: defaultCatalog, CatalogSourceNS: defaultCatalogNS, + Channel: defaultChannel, } return addonfactory.StructToValues(manifestConfig), nil