From 7754aa09a92b7635f3d2a88ff7c53b7c2006f660 Mon Sep 17 00:00:00 2001 From: Andrew Block Date: Sun, 10 Dec 2023 12:43:06 -0600 Subject: [PATCH] Update to support OpenShift GitOps 1.11 Signed-off-by: Andrew Block --- openshift-gitops-operator/README.md | 1 + .../openshift-gitops-operator/README.md | 19 +++++++++++++++++++ .../kustomization.yaml | 6 ++++++ .../openshift-gitops-operator/namespace.yaml | 8 ++++++++ .../operatorgroup.yaml | 6 ++++++ .../operator/overlays/gitops-1.11/README.md | 1 + .../overlays/gitops-1.11/kustomization.yaml | 14 ++++++++++++++ .../gitops-1.11/patch-subscription.yaml | 6 ++++++ .../overlays/latest/kustomization.yaml | 5 ++++- .../overlays/latest/patch-channel.yaml | 3 --- .../overlays/latest/patch-subscription.yaml | 6 ++++++ 11 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 openshift-gitops-operator/operator/components/openshift-gitops-operator/README.md create mode 100644 openshift-gitops-operator/operator/components/openshift-gitops-operator/kustomization.yaml create mode 100644 openshift-gitops-operator/operator/components/openshift-gitops-operator/namespace.yaml create mode 100644 openshift-gitops-operator/operator/components/openshift-gitops-operator/operatorgroup.yaml create mode 100644 openshift-gitops-operator/operator/overlays/gitops-1.11/README.md create mode 100644 openshift-gitops-operator/operator/overlays/gitops-1.11/kustomization.yaml create mode 100644 openshift-gitops-operator/operator/overlays/gitops-1.11/patch-subscription.yaml delete mode 100644 openshift-gitops-operator/operator/overlays/latest/patch-channel.yaml create mode 100644 openshift-gitops-operator/operator/overlays/latest/patch-subscription.yaml diff --git a/openshift-gitops-operator/README.md b/openshift-gitops-operator/README.md index c1a8af19..68b82b8e 100644 --- a/openshift-gitops-operator/README.md +++ b/openshift-gitops-operator/README.md @@ -14,6 +14,7 @@ The current *overlays* available are for the following channels: * [gitops-1.8](operator/overlays/gitops-1.8) * [gitops-1.9](operator/overlays/gitops-1.9) * [gitops-1.10](operator/overlays/gitops-1.10) +* [gitops-1.11](operator/overlays/gitops-1.10) * [latest](operator/overlays/latest) * [preview](operator/overlays/preview) diff --git a/openshift-gitops-operator/operator/components/openshift-gitops-operator/README.md b/openshift-gitops-operator/operator/components/openshift-gitops-operator/README.md new file mode 100644 index 00000000..adda1f77 --- /dev/null +++ b/openshift-gitops-operator/operator/components/openshift-gitops-operator/README.md @@ -0,0 +1,19 @@ +# openshift-gitops-operator + +## Purpose +This component is creates a `Namespace` and `OperatorGroup` to enable the installation of the OpenShift GitOps Operator. + +## Usage + +This component can be added to a base by adding the `components` section to your overlay `kustomization.yaml` file: + +``` +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +components: + - ../../components/openshift-gitops-operator +``` \ No newline at end of file diff --git a/openshift-gitops-operator/operator/components/openshift-gitops-operator/kustomization.yaml b/openshift-gitops-operator/operator/components/openshift-gitops-operator/kustomization.yaml new file mode 100644 index 00000000..fa1d2a74 --- /dev/null +++ b/openshift-gitops-operator/operator/components/openshift-gitops-operator/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - namespace.yaml + - operatorgroup.yaml diff --git a/openshift-gitops-operator/operator/components/openshift-gitops-operator/namespace.yaml b/openshift-gitops-operator/operator/components/openshift-gitops-operator/namespace.yaml new file mode 100644 index 00000000..1f06c33a --- /dev/null +++ b/openshift-gitops-operator/operator/components/openshift-gitops-operator/namespace.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: openshift-gitops-operator + annotations: + openshift.io/display-name: "OpenShift GitOps Operator" + labels: + openshift.io/cluster-monitoring: 'true' diff --git a/openshift-gitops-operator/operator/components/openshift-gitops-operator/operatorgroup.yaml b/openshift-gitops-operator/operator/components/openshift-gitops-operator/operatorgroup.yaml new file mode 100644 index 00000000..7efa9c37 --- /dev/null +++ b/openshift-gitops-operator/operator/components/openshift-gitops-operator/operatorgroup.yaml @@ -0,0 +1,6 @@ +apiVersion: operators.coreos.com/v1 +kind: OperatorGroup +metadata: + name: openshift-gitops-operator + namespace: openshift-gitops-operator +spec: {} diff --git a/openshift-gitops-operator/operator/overlays/gitops-1.11/README.md b/openshift-gitops-operator/operator/overlays/gitops-1.11/README.md new file mode 100644 index 00000000..b778b065 --- /dev/null +++ b/openshift-gitops-operator/operator/overlays/gitops-1.11/README.md @@ -0,0 +1 @@ +Installs the *gitops-1.10* channel version of the OpenShift GitOps Operator. This channel tracks updates to OpenShift GitOps 1.10. diff --git a/openshift-gitops-operator/operator/overlays/gitops-1.11/kustomization.yaml b/openshift-gitops-operator/operator/overlays/gitops-1.11/kustomization.yaml new file mode 100644 index 00000000..c7daae2d --- /dev/null +++ b/openshift-gitops-operator/operator/overlays/gitops-1.11/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +components: + - ../../components/openshift-gitops-operator + +patches: + - target: + kind: Subscription + name: openshift-gitops-operator + path: patch-subscription.yaml diff --git a/openshift-gitops-operator/operator/overlays/gitops-1.11/patch-subscription.yaml b/openshift-gitops-operator/operator/overlays/gitops-1.11/patch-subscription.yaml new file mode 100644 index 00000000..68f7bf7e --- /dev/null +++ b/openshift-gitops-operator/operator/overlays/gitops-1.11/patch-subscription.yaml @@ -0,0 +1,6 @@ +- op: replace + path: /spec/channel + value: gitops-1.11 +- op: replace + path: /metadata/namespace + value: openshift-gitops-operator \ No newline at end of file diff --git a/openshift-gitops-operator/operator/overlays/latest/kustomization.yaml b/openshift-gitops-operator/operator/overlays/latest/kustomization.yaml index b84bcd2c..c7daae2d 100644 --- a/openshift-gitops-operator/operator/overlays/latest/kustomization.yaml +++ b/openshift-gitops-operator/operator/overlays/latest/kustomization.yaml @@ -4,8 +4,11 @@ kind: Kustomization resources: - ../../base +components: + - ../../components/openshift-gitops-operator + patches: - target: kind: Subscription name: openshift-gitops-operator - path: patch-channel.yaml + path: patch-subscription.yaml diff --git a/openshift-gitops-operator/operator/overlays/latest/patch-channel.yaml b/openshift-gitops-operator/operator/overlays/latest/patch-channel.yaml deleted file mode 100644 index 4d50d4b1..00000000 --- a/openshift-gitops-operator/operator/overlays/latest/patch-channel.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: /spec/channel - value: latest diff --git a/openshift-gitops-operator/operator/overlays/latest/patch-subscription.yaml b/openshift-gitops-operator/operator/overlays/latest/patch-subscription.yaml new file mode 100644 index 00000000..0cbbbcc2 --- /dev/null +++ b/openshift-gitops-operator/operator/overlays/latest/patch-subscription.yaml @@ -0,0 +1,6 @@ +- op: replace + path: /spec/channel + value: latest +- op: replace + path: /metadata/namespace + value: openshift-gitops-operator \ No newline at end of file