diff --git a/redhat-build-of-kueue/README.md b/redhat-build-of-kueue/README.md new file mode 100644 index 00000000..b73807b2 --- /dev/null +++ b/redhat-build-of-kueue/README.md @@ -0,0 +1,32 @@ +# Red Hat Build of Kueue + +Install Red Hat Build of Kueue. + +Do not use the `base` directory directly, as you will need to patch the `channel` based on the version of OpenShift you are using, or the version of the operator you want to use. + +The current *overlays* available are for the following channels: + +* [stable-v1.1](operator/overlays/stable-v1.1) + +## Usage + +If you have cloned the `gitops-catalog` repository, you can install Red Hat OpenShift GitOps based on the overlay of your choice by running from the root (`gitops-catalog`) directory. + +``` +oc apply -k redhat-build-of-kueue/operator/overlays/ +``` + +Or, without cloning: + +``` +oc apply -k https://github.com/redhat-cop/gitops-catalog/redhat-build-of-kueue/operator/overlays/ +``` + +As part of a different overlay in your own GitOps repo: + +``` +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - https://github.com/redhat-cop/gitops-catalog/redhat-build-of-kueue/operator/overlays/?ref=main +``` diff --git a/redhat-build-of-kueue/aggregate/overlays/stable-v1.1/kustomization.yaml b/redhat-build-of-kueue/aggregate/overlays/stable-v1.1/kustomization.yaml new file mode 100644 index 00000000..bbebb3d3 --- /dev/null +++ b/redhat-build-of-kueue/aggregate/overlays/stable-v1.1/kustomization.yaml @@ -0,0 +1,10 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonAnnotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + +resources: + - ../../../instance/overlays/default + - ../../../operator/overlays/stable-v1.1 diff --git a/redhat-build-of-kueue/instance/base/kueue.yaml b/redhat-build-of-kueue/instance/base/kueue.yaml new file mode 100644 index 00000000..6a4e1936 --- /dev/null +++ b/redhat-build-of-kueue/instance/base/kueue.yaml @@ -0,0 +1,10 @@ +apiVersion: kueue.openshift.io/v1 +kind: Kueue +metadata: + name: cluster +spec: + config: + integrations: + frameworks: + - BatchJob + managementState: Managed diff --git a/redhat-build-of-kueue/instance/base/kustomization.yaml b/redhat-build-of-kueue/instance/base/kustomization.yaml new file mode 100644 index 00000000..2b53e355 --- /dev/null +++ b/redhat-build-of-kueue/instance/base/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - kueue.yaml diff --git a/redhat-build-of-kueue/instance/overlays/default/kustomization.yaml b/redhat-build-of-kueue/instance/overlays/default/kustomization.yaml new file mode 100644 index 00000000..ef6e263c --- /dev/null +++ b/redhat-build-of-kueue/instance/overlays/default/kustomization.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base diff --git a/redhat-build-of-kueue/operator/base/kustomization.yaml b/redhat-build-of-kueue/operator/base/kustomization.yaml new file mode 100644 index 00000000..549c6be2 --- /dev/null +++ b/redhat-build-of-kueue/operator/base/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: openshift-kueue-operator + +resources: + - namespace.yaml + - operatorgroup.yaml + - subscription.yaml diff --git a/redhat-build-of-kueue/operator/base/namespace.yaml b/redhat-build-of-kueue/operator/base/namespace.yaml new file mode 100644 index 00000000..5e2d173a --- /dev/null +++ b/redhat-build-of-kueue/operator/base/namespace.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: openshift-kueue-operator + annotations: + openshift.io/display-name: "Red Hat Kueue Operator" + labels: + openshift.io/cluster-monitoring: 'true' diff --git a/redhat-build-of-kueue/operator/base/operatorgroup.yaml b/redhat-build-of-kueue/operator/base/operatorgroup.yaml new file mode 100644 index 00000000..e2b07ec3 --- /dev/null +++ b/redhat-build-of-kueue/operator/base/operatorgroup.yaml @@ -0,0 +1,6 @@ +apiVersion: operators.coreos.com/v1 +kind: OperatorGroup +metadata: + name: openshift-kueue-operator + namespace: openshift-kueue-operator +spec: {} diff --git a/redhat-build-of-kueue/operator/base/subscription.yaml b/redhat-build-of-kueue/operator/base/subscription.yaml new file mode 100644 index 00000000..ed802bba --- /dev/null +++ b/redhat-build-of-kueue/operator/base/subscription.yaml @@ -0,0 +1,10 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: kueue-operator +spec: + channel: patch-me-see-overlays-dir + installPlanApproval: Automatic + name: kueue-operator + source: redhat-operators + sourceNamespace: openshift-marketplace diff --git a/redhat-build-of-kueue/operator/overlays/stable-v1.1/kustomization.yaml b/redhat-build-of-kueue/operator/overlays/stable-v1.1/kustomization.yaml new file mode 100644 index 00000000..5d8ddc19 --- /dev/null +++ b/redhat-build-of-kueue/operator/overlays/stable-v1.1/kustomization.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + + +resources: + - ../../base +patches: + - path: patch-channel.yaml + target: + group: operators.coreos.com + kind: Subscription + version: v1alpha1 diff --git a/redhat-build-of-kueue/operator/overlays/stable-v1.1/patch-channel.yaml b/redhat-build-of-kueue/operator/overlays/stable-v1.1/patch-channel.yaml new file mode 100644 index 00000000..9bf13506 --- /dev/null +++ b/redhat-build-of-kueue/operator/overlays/stable-v1.1/patch-channel.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/channel + value: 'stable-v1.1'