Skip to content

Commit

Permalink
Merge pull request #43 from fgharo/rhoai-2.10-gitops-acceleration
Browse files Browse the repository at this point in the history
Rhoai 2.10 gitops acceleration
  • Loading branch information
strangiato authored Sep 25, 2024
2 parents 00c096c + a942e9c commit ab84c03
Show file tree
Hide file tree
Showing 23 changed files with 273 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bootstrap/overlays/rhoai-stable-2.10/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
- ../../../clusters/overlays/rhoai-stable-2.10
56 changes: 56 additions & 0 deletions clusters/overlays/rhoai-stable-2.10/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: openshift-gitops

resources:
- ../../base
- ../../../components/argocd/apps/overlays/rhoai-stable-2.10

patches:
# set the repo and branch for applications
- path: patch-application-repo-revision.yaml
target:
group: argoproj.io
kind: Application
# Uncomment patches to disable automatic sync
# - path: patch-applicationset-manual-sync.yaml
# target:
# group: argoproj.io
# version: v1alpha1
# kind: ApplicationSet
# - path: patch-application-manual-sync.yaml
# target:
# group: argoproj.io
# kind: Application
# version: v1alpha1

replacements:
# copy the repo from the application to the applicationsets
- source:
kind: Application
fieldPath: spec.source.repoURL
targets:
- select:
kind: ApplicationSet
fieldPaths:
- spec.template.spec.source.repoURL
- select:
kind: ApplicationSet
name: tenants
fieldPaths:
- spec.generators.*.git.repoURL
# copy the branch from the application to the applicationsets
- source:
kind: Application
fieldPath: spec.source.targetRevision
targets:
- select:
kind: ApplicationSet
fieldPaths:
- spec.template.spec.source.targetRevision
- select:
kind: ApplicationSet
name: tenants
fieldPaths:
- spec.generators.*.git.revision
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- op: remove
path: /spec/syncPolicy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- op: replace
path: /spec/source/repoURL
value: 'https://github.com/redhat-ai-services/ai-accelerator.git'
- op: replace
path: /spec/source/targetRevision
value: main
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- op: remove
path: /spec/template/spec/syncPolicy
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base

patches:
- path: patch-cluster-config-app-of-apps.yaml
target:
kind: Application
name: cluster-config-app-of-apps
- path: patch-operators-list.yaml
target:
kind: ApplicationSet
name: cluster-operators
- path: patch-configs-list.yaml
target:
kind: ApplicationSet
name: cluster-configs
- path: patch-tenants-applicationset.yaml
target:
kind: ApplicationSet
name: tenants
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: cluster-config-app-of-apps
spec:
source:
path: clusters/overlays/rhoai-stable-2.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-configs
spec:
generators:
- list:
elements:
- cluster: local
url: https://kubernetes.default.svc
values:
name: user-workload-monitoring
path: components/cluster-configs/user-workload-monitoring/overlays/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: cluster-operators
spec:
generators:
- list:
elements:
- cluster: local
url: https://kubernetes.default.svc
values:
name: openshift-ai-operator
path: components/operators/openshift-ai/aggregate/overlays/stable-2.10
- cluster: local
url: https://kubernetes.default.svc
values:
name: openshift-gitops-operator
path: components/operators/openshift-gitops/aggregate/overlays/rhdp
- cluster: local
url: https://kubernetes.default.svc
values:
name: openshift-pipelines-operator
path: components/operators/openshift-pipelines/operator/overlays/latest
- cluster: local
url: https://kubernetes.default.svc
values:
name: openshift-serverless-operator
path: components/operators/openshift-serverless/operator/overlays/stable
- cluster: local
url: https://kubernetes.default.svc
values:
name: openshift-servicemesh-operator
path: components/operators/openshift-servicemesh/operator/overlays/stable

# - cluster: local
# url: https://kubernetes.default.svc
# values:
# name: openshift-logging-operator
# path: components/operators/openshift-logging/aggregate/overlays/default
# - cluster: local
# url: https://kubernetes.default.svc
# values:
# name: web-terminal-operator
# path: components/operators/web-terminal-operator/operator/overlays/fast
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /spec/generators/0/git/directories/0/path
value: tenants/*/*/overlays/rhoai-stable-2.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonAnnotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true

resources:
- ../../../operator/overlays/stable-2.10
- ../../../instance/overlays/stable-2.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: redhat-ods-applications

resources:
- ../../base

components:
- ../../components/components-serving
- ../../components/components-training
- ../../components/default-notebook-pvc-size
- ../../components/idle-notebook-culling
- ../../components/notebook-pod-sizes
- ../../components/make-kubeadmin-cluster-admin
- ../../components/model-server-pod-sizes
- ../../components/rhoai-dashboard-access
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base

patches:
- target:
kind: Subscription
name: rhods-operator
path: patch-channel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- op: replace
path: /spec/channel
value: stable-2.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base

patches:
- target:
kind: DataSciencePipelinesApplication
path: patch-dspa-for-2.10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- op: remove
path: /spec/dspVersion
- op: remove
path: /spec/objectStorage/enableExternalRoute
- op: remove
path: /spec/objectStorage/externalStorage/basePath
- op: remove
path: /spec/objectStorage/externalStorage/region
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base/
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../base

images:
- name: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/s2i-minimal-notebook
newTag: "2023.2"

replacements:
- source:
kind: Notebook
group: kubeflow.org
name: example-workbench
fieldPath: spec.template.spec.containers.[name=example-workbench].image
targets:
- select:
kind: Notebook
group: kubeflow.org
name: example-workbench
fieldPaths:
- spec.template.spec.containers.[name=example-workbench].env.[name=JUPYTER_IMAGE].value

0 comments on commit ab84c03

Please sign in to comment.