From be39a2bc799991d601925cb4c3f30aa20cd011dc Mon Sep 17 00:00:00 2001 From: Craig Brookes Date: Thu, 21 Nov 2024 10:44:27 +0000 Subject: [PATCH] add small tweak to install (#1041) Signed-off-by: craig rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED create openshift overlay rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED --- config/install/README.md | 11 +++++++- config/install/openshift/catalog-patch.yaml | 11 ++++++++ .../install/openshift/kuadrant-version.yaml | 6 +++++ config/install/openshift/kustomization.yaml | 19 ++++++++++++++ config/install/openshift/sail-operator.yaml | 26 +++++++++++++++++++ config/install/standard/kuadrant-version.yaml | 6 +++++ config/install/standard/kustomization.yaml | 18 ++++++++----- config/install/standard/sail-operator.yaml | 4 +-- 8 files changed, 92 insertions(+), 9 deletions(-) create mode 100644 config/install/openshift/catalog-patch.yaml create mode 100644 config/install/openshift/kuadrant-version.yaml create mode 100644 config/install/openshift/kustomization.yaml create mode 100644 config/install/openshift/sail-operator.yaml create mode 100644 config/install/standard/kuadrant-version.yaml diff --git a/config/install/README.md b/config/install/README.md index b63eb4270..d9c7a5d85 100644 --- a/config/install/README.md +++ b/config/install/README.md @@ -14,12 +14,21 @@ > Note: for multiple clusters, it would make sense to do the installation via a tool like [argocd](https://argo-cd.readthedocs.io/en/stable/). For other methods of addressing multiple clusters take a look at the [kubectl docs](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/) -## Setup the environment +## Setup the environment + +> Note this uses the community operatorhub catalog. If you are installing on OpenShift and want to use the redhat provided catalog use the second command. + ``` +# community catalog kubectl apply -k config/install/standard ``` +``` +# redhat catalog +kubectl apply -k config/install/openshift +``` + Verify both Kuadrant and sail operators are installed. Note, that this can take a while. You can also take a look at the subscription and installplan resource to help with debugging but the end state should be as below: ``` diff --git a/config/install/openshift/catalog-patch.yaml b/config/install/openshift/catalog-patch.yaml new file mode 100644 index 000000000..891706880 --- /dev/null +++ b/config/install/openshift/catalog-patch.yaml @@ -0,0 +1,11 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: sailoperator + namespace: gateway-system +spec: + channel: candidates + installPlanApproval: Automatic + name: sailoperator + source: community-operators + sourceNamespace: openshift-marketplace diff --git a/config/install/openshift/kuadrant-version.yaml b/config/install/openshift/kuadrant-version.yaml new file mode 100644 index 000000000..c86be4166 --- /dev/null +++ b/config/install/openshift/kuadrant-version.yaml @@ -0,0 +1,6 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: CatalogSource +metadata: + name: kuadrant-operator-catalog +spec: + image: quay.io/kuadrant/kuadrant-operator-catalog:v1.0.0-rc4 #change this to the version you want to install diff --git a/config/install/openshift/kustomization.yaml b/config/install/openshift/kustomization.yaml new file mode 100644 index 000000000..693bab216 --- /dev/null +++ b/config/install/openshift/kustomization.yaml @@ -0,0 +1,19 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../standard + +patches: + - target: + group: operators.coreos.com + version: v1alpha1 + kind: Subscription + name: sailoperator + path: catalog-patch.yaml + - target: + group: operators.coreos.com + version: v1alpha1 + kind: CatalogSource + name: kuadrant-operator-catalog + path: kuadrant-version.yaml diff --git a/config/install/openshift/sail-operator.yaml b/config/install/openshift/sail-operator.yaml new file mode 100644 index 000000000..f1c071534 --- /dev/null +++ b/config/install/openshift/sail-operator.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: Namespace +metadata: + labels: + control-plane: sail + name: gateway-system +--- +kind: OperatorGroup +apiVersion: operators.coreos.com/v1 +metadata: + name: sail + namespace: gateway-system +spec: + upgradeStrategy: Default +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: sailoperator + namespace: gateway-system +spec: + channel: candidates + installPlanApproval: Automatic + name: sailoperator + source: operatorhubio-catalog + sourceNamespace: openshift-marketplace diff --git a/config/install/standard/kuadrant-version.yaml b/config/install/standard/kuadrant-version.yaml new file mode 100644 index 000000000..c86be4166 --- /dev/null +++ b/config/install/standard/kuadrant-version.yaml @@ -0,0 +1,6 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: CatalogSource +metadata: + name: kuadrant-operator-catalog +spec: + image: quay.io/kuadrant/kuadrant-operator-catalog:v1.0.0-rc4 #change this to the version you want to install diff --git a/config/install/standard/kustomization.yaml b/config/install/standard/kustomization.yaml index bc2d521e8..1a8808b0a 100644 --- a/config/install/standard/kustomization.yaml +++ b/config/install/standard/kustomization.yaml @@ -7,10 +7,16 @@ resources: - ../../deploy/olm patches: - - patch: |- - apiVersion: operators.coreos.com/v1alpha1 + - target: + group: operators.coreos.com + version: v1alpha1 kind: CatalogSource - metadata: - name: kuadrant-operator-catalog - spec: - image: quay.io/kuadrant/kuadrant-operator-catalog:v1.0.0-rc4 #change this to the version you want to install + name: kuadrant-operator-catalog + path: kuadrant-version.yaml + # - patch: |- + # apiVersion: operators.coreos.com/v1alpha1 + # kind: CatalogSource + # metadata: + # name: kuadrant-operator-catalog + # spec: + # image: quay.io/kuadrant/kuadrant-operator-catalog:v1.0.0-rc4 #change this to the version you want to install diff --git a/config/install/standard/sail-operator.yaml b/config/install/standard/sail-operator.yaml index 56edd1251..8adc8b216 100644 --- a/config/install/standard/sail-operator.yaml +++ b/config/install/standard/sail-operator.yaml @@ -22,5 +22,5 @@ spec: channel: candidates installPlanApproval: Automatic name: sailoperator - source: community-operators - sourceNamespace: openshift-marketplace + source: operatorhubio-catalog + sourceNamespace: olm