From f3795900319a5a51f66b9b8efde823bd39f64dce Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Tue, 29 Oct 2024 18:28:11 -0500 Subject: [PATCH 01/28] cleanup --- .../overlays/2.6/datasciencecluster.yaml | 34 ------------------ .../instance/overlays/2.6/kustomization.yaml | 6 ---- .../overlays/2.8+/datasciencecluster.yaml | 36 ------------------- .../instance/overlays/2.8+/kustomization.yaml | 6 ---- 4 files changed, 82 deletions(-) delete mode 100644 components/operators/rhods-operator/instance/overlays/2.6/datasciencecluster.yaml delete mode 100644 components/operators/rhods-operator/instance/overlays/2.6/kustomization.yaml delete mode 100644 components/operators/rhods-operator/instance/overlays/2.8+/datasciencecluster.yaml delete mode 100644 components/operators/rhods-operator/instance/overlays/2.8+/kustomization.yaml diff --git a/components/operators/rhods-operator/instance/overlays/2.6/datasciencecluster.yaml b/components/operators/rhods-operator/instance/overlays/2.6/datasciencecluster.yaml deleted file mode 100644 index eaec283b..00000000 --- a/components/operators/rhods-operator/instance/overlays/2.6/datasciencecluster.yaml +++ /dev/null @@ -1,34 +0,0 @@ -kind: DataScienceCluster -apiVersion: datasciencecluster.opendatahub.io/v1 -metadata: - name: default-dsc - labels: - app.kubernetes.io/name: datasciencecluster - app.kubernetes.io/instance: default - app.kubernetes.io/part-of: rhods-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: rhods-operator -spec: - components: - codeflare: - managementState: Managed - dashboard: - managementState: Managed - datasciencepipelines: - managementState: Managed - kserve: - managementState: Managed - serving: - ingressGateway: - certificate: - type: SelfSigned - managementState: Managed - name: knative-serving - modelmeshserving: - managementState: Managed - ray: - managementState: Managed - trustyai: - managementState: Managed - workbenches: - managementState: Managed diff --git a/components/operators/rhods-operator/instance/overlays/2.6/kustomization.yaml b/components/operators/rhods-operator/instance/overlays/2.6/kustomization.yaml deleted file mode 100644 index d2784ad7..00000000 --- a/components/operators/rhods-operator/instance/overlays/2.6/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - ../../base - - datasciencecluster.yaml diff --git a/components/operators/rhods-operator/instance/overlays/2.8+/datasciencecluster.yaml b/components/operators/rhods-operator/instance/overlays/2.8+/datasciencecluster.yaml deleted file mode 100644 index dc86a3c2..00000000 --- a/components/operators/rhods-operator/instance/overlays/2.8+/datasciencecluster.yaml +++ /dev/null @@ -1,36 +0,0 @@ -apiVersion: datasciencecluster.opendatahub.io/v1 -kind: DataScienceCluster -metadata: - name: default-dsc - labels: - app.kubernetes.io/name: datasciencecluster - app.kubernetes.io/instance: default-dsc - app.kubernetes.io/part-of: rhods-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: rhods-operator -spec: - components: - codeflare: - managementState: Managed - dashboard: - managementState: Managed - datasciencepipelines: - managementState: Managed - kserve: - managementState: Managed - serving: - ingressGateway: - certificate: - type: SelfSigned - managementState: Managed - name: knative-serving - kueue: - managementState: Managed - modelmeshserving: - managementState: Managed - ray: - managementState: Managed - trustyai: - managementState: Managed - workbenches: - managementState: Managed diff --git a/components/operators/rhods-operator/instance/overlays/2.8+/kustomization.yaml b/components/operators/rhods-operator/instance/overlays/2.8+/kustomization.yaml deleted file mode 100644 index d2784ad7..00000000 --- a/components/operators/rhods-operator/instance/overlays/2.8+/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - ../../base - - datasciencecluster.yaml From fb80278b8603bf63890150e0b38d59d4cc44202c Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Tue, 29 Oct 2024 18:28:57 -0500 Subject: [PATCH 02/28] update: resources --- .../patch-datasciencecluster.yaml | 2 ++ .../instance/overlays/minimal/kustomization.yaml | 10 ++++++++++ demos/base/rhoai/kustomization.yaml | 1 - demos/rhoai-demo-ready/kustomization.yaml | 14 +++++--------- demos/rhoai-minimal/kustomization.yaml | 2 +- 5 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml diff --git a/components/operators/rhods-operator/instance/components/components-training/patch-datasciencecluster.yaml b/components/operators/rhods-operator/instance/components/components-training/patch-datasciencecluster.yaml index 54feb45c..7014fa9d 100644 --- a/components/operators/rhods-operator/instance/components/components-training/patch-datasciencecluster.yaml +++ b/components/operators/rhods-operator/instance/components/components-training/patch-datasciencecluster.yaml @@ -8,3 +8,5 @@ spec: managementState: Managed workbenches: managementState: Managed + trainingoperator: + managementState: Managed diff --git a/components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml b/components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml new file mode 100644 index 00000000..7ebda4df --- /dev/null +++ b/components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +components: + - ../../components/disable-telemetry + - ../../components/fix-kubeadmin-cluster-admin + - ../../components/rhoai-dashboard-access diff --git a/demos/base/rhoai/kustomization.yaml b/demos/base/rhoai/kustomization.yaml index fba847f3..c8462c1c 100644 --- a/demos/base/rhoai/kustomization.yaml +++ b/demos/base/rhoai/kustomization.yaml @@ -3,4 +3,3 @@ kind: Kustomization resources: - ../../../components/operators/rhods-operator/operator/overlays/stable - - ../../../components/operators/servicemeshoperator/operator/overlays/stable diff --git a/demos/rhoai-demo-ready/kustomization.yaml b/demos/rhoai-demo-ready/kustomization.yaml index 444e91fa..5578888b 100644 --- a/demos/rhoai-demo-ready/kustomization.yaml +++ b/demos/rhoai-demo-ready/kustomization.yaml @@ -7,10 +7,13 @@ resources: - ../../components/operators/authorino-operator/operator/overlays/managed-services - ../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest - # - ../../components/app-configs/rhoai-config - # TODO: reconcile issues with item above + - ../../components/operators/servicemeshoperator/operator/overlays/stable + - ../../components/operators/rhods-operator/instance/overlays/all - ../../components/operators/serverless-operator/operator/overlays/stable + + # - ../../components/app-configs/rhoai-config + # TODO: reconcile issues with item above # - ../../components/operators/serverless-operator/instance/knative-eventing/overlays/default # - ../../components/operators/serverless-operator/instance/knative-serving/overlays/default @@ -29,13 +32,6 @@ resources: # - ../../components/app-configs/rhoai-rbac # - ../../components/app-configs/rhoai-rbac-notebooks - # service mesh optional - # - ../../components/operators/kiali-ossm/operator/overlays/stable - - # service mesh deprecated - https://docs.openshift.com/container-platform/4.15/service_mesh/v2x/installing-ossm.html#installing-ossm - # - ../../components/operators/jaeger-product/operator/overlays/stable - # - ../../components/operators/elasticsearch-operator/operator/overlays/stable - patches: - target: kind: ConsoleNotification diff --git a/demos/rhoai-minimal/kustomization.yaml b/demos/rhoai-minimal/kustomization.yaml index c288bc2a..cb14982f 100644 --- a/demos/rhoai-minimal/kustomization.yaml +++ b/demos/rhoai-minimal/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization resources: - ../base - ../base/rhoai - - ../../components/operators/openshift-ai/instance/overlays/2.8+ + - ../../components/operators/rhods-operator/instance/overlays/minimal patches: - target: From 884229e377642c3d7e6785ecbca956c95de52c2e Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Tue, 29 Oct 2024 18:35:11 -0500 Subject: [PATCH 03/28] update: authorino --- .../operators/authorino-operator/INFO.md | 236 +++++++++++++++++- .../operators/authorino-operator/README.md | 14 +- .../kustomization.yaml | 0 .../patch-channel.yaml | 2 +- 4 files changed, 243 insertions(+), 9 deletions(-) rename components/operators/authorino-operator/operator/overlays/{managed-services => tech-preview-v1}/kustomization.yaml (100%) rename components/operators/authorino-operator/operator/overlays/{managed-services => tech-preview-v1}/patch-channel.yaml (58%) diff --git a/components/operators/authorino-operator/INFO.md b/components/operators/authorino-operator/INFO.md index 9dd83ad1..aa4d9ab0 100644 --- a/components/operators/authorino-operator/INFO.md +++ b/components/operators/authorino-operator/INFO.md @@ -1,3 +1,237 @@ # authorino-operator -The operator to manage instances of Authorino \ No newline at end of file +[Authorino](https://docs.kuadrant.io/authorino/) is Red Hat's Kubernetes-native lightweight external authorization service for tailor-made Zero Trust API security. + +Install this Red Hat official distribution of [Authorino Operator](https://docs.kuadrant.io/authorino-operator/) to manage instances of Authorino in this cluster. + +The current state of this distribution of the operator is: **_Technical Preview_**. + +The Community version of Authorino Operator, based on upstream public images, is available in [OperatorHub.io](https://operatorhub.io/operator/authorino-operator). + +## Getting started + +After installing the Operator, request an instance of the external authorization service by creating an `Authorino` custom resource. + +**Minimal example (namespaced)** + +```yaml +apiVersion: operator.authorino.kuadrant.io/v1beta1 +kind: Authorino +metadata: + name: authorino +spec: + listener: + tls: + enabled: false + oidcServer: + tls: + enabled: false +``` + +**Extended example** + +```yaml +apiVersion: operator.authorino.kuadrant.io/v1beta1 +kind: Authorino +metadata: + name: authorino +spec: + clusterWide: true + authConfigLabelSelectors: environment=production + secretLabelSelectors: authorino.kuadrant.io/component=authorino,environment=production + + replicas: 2 + + evaluatorCacheSize: 2 # mb + + logLevel: info + logMode: production + + listener: + ports: + grpc: 50001 + http: 5001 + tls: + certSecretRef: + name: authorino-server-cert # secret must contain `tls.crt` and `tls.key` entries + timeout: 2 + + oidcServer: + port: 8083 + tls: + certSecretRef: + name: authorino-oidc-server-cert # secret must contain `tls.crt` and `tls.key` entries + + metrics: + port: 8080 + deep: true + + healthz: + port: 8081 + + tracing: + endpoint: rpc://otel-collector.observability.svc.cluster.local:4317 + insecure: true + + volumes: + items: + - name: keycloak-tls-cert + mountPath: /etc/ssl/certs + configMaps: + - keycloak-tls-cert + items: # details to mount the k8s configmap in the authorino pods + - key: keycloak.crt + path: keycloak.crt + defaultMode: 420 +``` + +### Cluster-wide vs Namespaced + +Namespaced instances only watch auth resources (`AuthConfig` and `Secrets`) created in the same namespace as the Authorino service. Use this mode for dedicated instances that do not require elevated privileges. + +Cluster-wide instances watch resources across the entire cluster (all namespaces.) Deploying and running Authorino in this mode requires elevated privileges. + +### Multi-tenancy + +Use the `authConfigLabelSelectors` field of the `Authorino` custom resource to narrow the scope of the Authorino instance. + +Only `AuthConfig` custom resources whose labels match the value of this field will be handled by the Authorino instance. + +## Protect a host + +To protect a host, create an `AuthConfig` custom resource for the host. E.g.: + +```yaml +apiVersion: authorino.kuadrant.io/v1beta2 +kind: AuthConfig +metadata: + name: my-api-protection +spec: + hosts: + - my-api.io + + authentication: + "keycloak": + jwt: + issuerUrl: https://keycloak.keycloak.svc.cluster.local:8080/realms/my-realm + + authorization: + "k8s-rbac": + kubernetesSubjectAccessReview: + user: + selector: auth.identity.user.username + resourceAttributes: + resource: + value: my-api + verb: + selector: request.method + cache: + key: + selector: auth.identity.user.username + ttl: 30 + "after-2am-only": + rego: | + allow { + [hour, _, _] := time.clock(time.now_ns()) + hour >= 2 + } +``` + +Make sure all requests to the host are fisrt checked with the Authorino instance, by configuring an Envoy proxy for external authz: + +```yaml +clusters: +- name: my-api + … +- name: authorino + connect_timeout: 0.25s + type: STRICT_DNS + lb_policy: ROUND_ROBIN + http2_protocol_options: {} + load_assignment: + cluster_name: authorino + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: authorino-authorino-authorization + port_value: 50051 +listeners: +- filter_chains: + - filters: + name: envoy.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + use_remote_address: true + route_config: + name: my-api-config + virtual_hosts: + - name: my-api-vs + domains: + - my-api.io + routes: + - match: + prefix: / + route: + cluster: my-api + http_filters: + - name: envoy.filters.http.ext_authz + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz + transport_api_version: V3 + failure_mode_allow: false + include_peer_certificate: true + grpc_service: + envoy_grpc: + cluster_name: authorino + timeout: 1s +``` + +...or, if using Istio, by creating an [`AuthorizationPolicy`](https://istio.io/latest/docs/reference/config/security/authorization-policy/#AuthorizationPolicy) custom resource. Use `action: CUSTOM` in the resource and the Authorino authorization service configured in the mesh extension provider settings. + +## Features + +**Authentication** + +* JWT validation (with OpenID Connect Discovery) +* OAuth 2.0 Token Introspection (opaque tokens) +* Kubernetes TokenReview (ServiceAccount tokens) +* API key authentication +* X.509 client certificate authentication +* Anonymous access +* Proxy-handled (authentication performed by the proxy) + +**Authorization** + +* Built-in simple pattern matching (e.g. JWT claims, request attributes checking) +* OPA policies (inline Rego and fetch from external registry) +* Kubernetes SubjectAccessReview (resource and non-resource attributes) +* Authzed SpiceDB + +**External metadata** + +* HTTP request +* OpenID Connect User Info +* UMA-protected resource attributes + +**Custom responses** + +* Header injection (Festival Wristbands tokens, JSON, plain text) +* Envoy Dynamic Metadata +* Custom HTTP response (status code, headers, messages, body, etc) + +**Callbacks** + +* HTTP webhooks + +**Caching** + +* OpenID Connect and User-Managed Access configs +* JSON Web Keys (JWKs) and JSON Web Key Sets (JWKS) +* Access tokens +* External metadata +* Precompiled Rego policies +* Policy evaluation + +Check out the full [Feature Specification](https://docs.kuadrant.io/authorino/docs/features/) and how-to guides in the [Kuadrant Docs](https://docs.kuadrant.io) website. \ No newline at end of file diff --git a/components/operators/authorino-operator/README.md b/components/operators/authorino-operator/README.md index 549dec02..e7292bd1 100644 --- a/components/operators/authorino-operator/README.md +++ b/components/operators/authorino-operator/README.md @@ -1,30 +1,30 @@ -# Red Hat - Authorino +# Red Hat - Authorino (Technical Preview) -Install Red Hat - Authorino. +Install Red Hat - Authorino (Technical Preview). 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: -* [managed-services](operator/overlays/managed-services) +* [tech-preview-v1](operator/overlays/tech-preview-v1) ## Usage -If you have cloned the `gitops-catalog` repository, you can install Red Hat - Authorino based on the overlay of your choice by running from the root (`gitops-catalog`) directory. +If you have cloned the `gitops-catalog` repository, you can install Red Hat - Authorino (Technical Preview) based on the overlay of your choice by running from the root (`gitops-catalog`) directory. -``` +```sh oc apply -k authorino-operator/operator/overlays/ ``` Or, without cloning: -``` +```sh oc apply -k https://github.com/redhat-cop/gitops-catalog/authorino-operator/operator/overlays/ ``` As part of a different overlay in your own GitOps repo: -``` +```yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: diff --git a/components/operators/authorino-operator/operator/overlays/managed-services/kustomization.yaml b/components/operators/authorino-operator/operator/overlays/tech-preview-v1/kustomization.yaml similarity index 100% rename from components/operators/authorino-operator/operator/overlays/managed-services/kustomization.yaml rename to components/operators/authorino-operator/operator/overlays/tech-preview-v1/kustomization.yaml diff --git a/components/operators/authorino-operator/operator/overlays/managed-services/patch-channel.yaml b/components/operators/authorino-operator/operator/overlays/tech-preview-v1/patch-channel.yaml similarity index 58% rename from components/operators/authorino-operator/operator/overlays/managed-services/patch-channel.yaml rename to components/operators/authorino-operator/operator/overlays/tech-preview-v1/patch-channel.yaml index b574df41..45fc9c63 100644 --- a/components/operators/authorino-operator/operator/overlays/managed-services/patch-channel.yaml +++ b/components/operators/authorino-operator/operator/overlays/tech-preview-v1/patch-channel.yaml @@ -1,3 +1,3 @@ - op: replace path: /spec/channel - value: managed-services + value: tech-preview-v1 From 750ec2b316240cac5fdb19b627d205a03729b02b Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Tue, 29 Oct 2024 18:35:55 -0500 Subject: [PATCH 04/28] fix: authorino --- demos/rhoai-demo-ready/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/rhoai-demo-ready/kustomization.yaml b/demos/rhoai-demo-ready/kustomization.yaml index 5578888b..b19f3e13 100644 --- a/demos/rhoai-demo-ready/kustomization.yaml +++ b/demos/rhoai-demo-ready/kustomization.yaml @@ -5,7 +5,7 @@ resources: - ../base - ../base/rhoai - - ../../components/operators/authorino-operator/operator/overlays/managed-services + - ../../components/operators/authorino-operator/operator/overlays/tech-preview-v1 - ../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest - ../../components/operators/servicemeshoperator/operator/overlays/stable From 173ad30af83ee90b2a2ebee944cdf68ad7130488 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Tue, 29 Oct 2024 18:53:22 -0500 Subject: [PATCH 05/28] push: all the things --- .../operators/authorino-operator/README.md | 8 +-- .../components/fix-dashboard-bugs/README.md | 20 ++++++ .../components/fix-dashboard-bugs/job.sh | 30 ++++++++ .../components/fix-dashboard-bugs/job.yaml | 69 +++++++++++++++++++ .../fix-dashboard-bugs/kustomization.yaml | 16 +++++ .../instance/overlays/all/kustomization.yaml | 1 + .../operators/serverless-operator/INFO.md | 6 +- .../operators/serverless-operator/README.md | 10 ++- .../overlays/stable-1.31/kustomization.yaml | 11 +++ .../overlays/stable-1.31/patch-channel.yaml | 3 + .../overlays/stable-1.32/kustomization.yaml | 11 +++ .../overlays/stable-1.32/patch-channel.yaml | 3 + .../overlays/stable-1.33/kustomization.yaml | 11 +++ .../overlays/stable-1.33/patch-channel.yaml | 3 + .../overlays/stable-1.34/kustomization.yaml | 11 +++ .../overlays/stable-1.34/patch-channel.yaml | 3 + demos/rhoai-demo-ready/kustomization.yaml | 2 +- 17 files changed, 207 insertions(+), 11 deletions(-) create mode 100644 components/operators/rhods-operator/instance/components/fix-dashboard-bugs/README.md create mode 100755 components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh create mode 100644 components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml create mode 100644 components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.31/kustomization.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.31/patch-channel.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.32/kustomization.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.32/patch-channel.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.33/kustomization.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.33/patch-channel.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.34/kustomization.yaml create mode 100644 components/operators/serverless-operator/operator/overlays/stable-1.34/patch-channel.yaml diff --git a/components/operators/authorino-operator/README.md b/components/operators/authorino-operator/README.md index e7292bd1..1ec14335 100644 --- a/components/operators/authorino-operator/README.md +++ b/components/operators/authorino-operator/README.md @@ -1,16 +1,16 @@ -# Red Hat - Authorino (Technical Preview) +# -Install Red Hat - Authorino (Technical Preview). +Install . 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: -* [tech-preview-v1](operator/overlays/tech-preview-v1) + ## Usage -If you have cloned the `gitops-catalog` repository, you can install Red Hat - Authorino (Technical Preview) based on the overlay of your choice by running from the root (`gitops-catalog`) directory. +If you have cloned the `gitops-catalog` repository, you can install based on the overlay of your choice by running from the root (`gitops-catalog`) directory. ```sh oc apply -k authorino-operator/operator/overlays/ diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/README.md b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/README.md new file mode 100644 index 00000000..6eea9129 --- /dev/null +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/README.md @@ -0,0 +1,20 @@ +# fix-dashboard-bugs + +## Purpose + +This component is designed restart the RHOAI dashboard to avoid issues with features note being detected. + +## Usage + +This component can be added to a base by adding the `components` section to your overlay `kustomization.yaml` file: + +```yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +components: + - ../../components/fix-dashboard-bugs +``` diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh new file mode 100755 index 00000000..720f0f45 --- /dev/null +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh @@ -0,0 +1,30 @@ +#!/usr/bin/bash +set -e + +TIMEOUT_SECONDS=60 + +fix_dashboard_bugs(){ + echo "" + +SERVERLESS_RESOURCES=( + crd/serverlessservices.networking.internal.knative.dev:condition=established \ + ) + + for crd in "${SERVERLESS_RESOURCES[@]}" + do + RESOURCE=$(echo "$crd" | cut -d ":" -f 1) + CONDITION=$(echo "$crd" | cut -d ":" -f 2) + + echo "Waiting for ${RESOURCE} state to be ${CONDITION}..." + oc wait --for="${CONDITION}" "${RESOURCE}" --timeout="${TIMEOUT_SECONDS}s" + done +} + +restart_pods(){ + oc -n redhat-ods-operator \ + delete pods \ + -l deployment=rhods-dashboard +} + +fix_dashboard_bugs +restart_pods \ No newline at end of file diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml new file mode 100644 index 00000000..8c938e09 --- /dev/null +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml @@ -0,0 +1,69 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: fix-dashboard-bugs + namespace: redhat-ods-operator + annotations: + argocd.argoproj.io/hook: PreSync +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: fix-dashboard-bugs + namespace: redhat-ods-operator + annotations: + argocd.argoproj.io/hook: PreSync +rules: + - resources: + - pods + verbs: + - get + - list + - delete +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: fix-dashboard-bugs + annotations: + argocd.argoproj.io/hook: PreSync +subjects: + - kind: ServiceAccount + name: fix-dashboard-bugs + namespace: redhat-ods-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: fix-dashboard-bugs +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: fix-dashboard-bugs + namespace: redhat-ods-operator + annotations: + argocd.argoproj.io/hook: PreSync + argocd.argoproj.io/sync-wave: "11" +spec: + template: + spec: + containers: + - name: minion + image: registry.redhat.io/openshift4/ose-cli + command: + - /bin/bash + - -c + - /scripts/job.sh + volumeMounts: + - name: scripts + mountPath: /scripts + volumes: + - name: scripts + configMap: + name: fix-dashboard-bugs + defaultMode: 0755 + restartPolicy: Never + serviceAccount: fix-dashboard-bugs + serviceAccountName: fix-dashboard-bugs + backoffLimit: 4 diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml new file mode 100644 index 00000000..8ce4645b --- /dev/null +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: +- job.yaml + +generatorOptions: + disableNameSuffixHash: true + annotations: + argocd.argoproj.io/hook: PreSync + +configMapGenerator: + - name: fix-dashboard-bugs + namespace: redhat-ods-operator + files: + - job.sh diff --git a/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml b/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml index 1c8b6751..45060edf 100644 --- a/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml +++ b/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml @@ -11,6 +11,7 @@ components: - ../../components/components-training - ../../components/default-notebook-pvc-size - ../../components/disable-telemetry + - ../../components/components/fix-dashboard-bugs - ../../components/fix-kubeadmin-cluster-admin - ../../components/idle-notebook-culling - ../../components/model-server-pod-sizes diff --git a/components/operators/serverless-operator/INFO.md b/components/operators/serverless-operator/INFO.md index 78977b97..48e1c746 100644 --- a/components/operators/serverless-operator/INFO.md +++ b/components/operators/serverless-operator/INFO.md @@ -14,7 +14,7 @@ automatically created when installing the operator. The components provided with the OpenShift Serverless operator require minimum cluster sizes on OpenShift Container Platform. For more information, see the documentation on [Getting started -with OpenShift Serverless](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.13/html/serverless/installing-serverless#install-serverless-operator). +with OpenShift Serverless](https://docs.redhat.com/en/documentation/red_hat_openshift_serverless/1.34/html/serving/getting-started-with-knative-serving#serverless-applications). # Supported Features - **Easy to get started:** Provides a simplified developer experience to deploy @@ -82,5 +82,5 @@ With its extensive help pages and autocompletion support, it frees you from memo # Further Information For documentation on OpenShift Serverless, see: - [Installation -Guide](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.13/html/serverless/installing-serverless) -- [Develop Serverless Applications](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.13/html/serverless/serving#serverless-applications) \ No newline at end of file +Guide](https://docs.redhat.com/en/documentation/red_hat_openshift_serverless/1.34/html/installing_openshift_serverless/index) +- [Develop Serverless Applications](https://docs.redhat.com/en/documentation/red_hat_openshift_serverless/1.34/html/serving/getting-started-with-knative-serving#serverless-applications) \ No newline at end of file diff --git a/components/operators/serverless-operator/README.md b/components/operators/serverless-operator/README.md index cd75ee33..880086ca 100644 --- a/components/operators/serverless-operator/README.md +++ b/components/operators/serverless-operator/README.md @@ -9,24 +9,28 @@ The current *overlays* available are for the following channels: * [stable](operator/overlays/stable) * [stable-1.29](operator/overlays/stable-1.29) * [stable-1.30](operator/overlays/stable-1.30) +* [stable-1.31](operator/overlays/stable-1.31) +* [stable-1.32](operator/overlays/stable-1.32) +* [stable-1.33](operator/overlays/stable-1.33) +* [stable-1.34](operator/overlays/stable-1.34) ## Usage If you have cloned the `gitops-catalog` repository, you can install Red Hat OpenShift Serverless based on the overlay of your choice by running from the root (`gitops-catalog`) directory. -``` +```sh oc apply -k serverless-operator/operator/overlays/ ``` Or, without cloning: -``` +```sh oc apply -k https://github.com/redhat-cop/gitops-catalog/serverless-operator/operator/overlays/ ``` As part of a different overlay in your own GitOps repo: -``` +```yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.31/kustomization.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.31/kustomization.yaml new file mode 100644 index 00000000..7204e481 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.31/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +patches: + - target: + kind: Subscription + name: serverless-operator + path: patch-channel.yaml diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.31/patch-channel.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.31/patch-channel.yaml new file mode 100644 index 00000000..c842dd93 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.31/patch-channel.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/channel + value: stable-1.31 diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.32/kustomization.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.32/kustomization.yaml new file mode 100644 index 00000000..7204e481 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.32/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +patches: + - target: + kind: Subscription + name: serverless-operator + path: patch-channel.yaml diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.32/patch-channel.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.32/patch-channel.yaml new file mode 100644 index 00000000..02322d27 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.32/patch-channel.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/channel + value: stable-1.32 diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.33/kustomization.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.33/kustomization.yaml new file mode 100644 index 00000000..7204e481 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.33/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +patches: + - target: + kind: Subscription + name: serverless-operator + path: patch-channel.yaml diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.33/patch-channel.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.33/patch-channel.yaml new file mode 100644 index 00000000..d07dbca7 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.33/patch-channel.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/channel + value: stable-1.33 diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.34/kustomization.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.34/kustomization.yaml new file mode 100644 index 00000000..7204e481 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.34/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +patches: + - target: + kind: Subscription + name: serverless-operator + path: patch-channel.yaml diff --git a/components/operators/serverless-operator/operator/overlays/stable-1.34/patch-channel.yaml b/components/operators/serverless-operator/operator/overlays/stable-1.34/patch-channel.yaml new file mode 100644 index 00000000..7a647e70 --- /dev/null +++ b/components/operators/serverless-operator/operator/overlays/stable-1.34/patch-channel.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/channel + value: stable-1.34 diff --git a/demos/rhoai-demo-ready/kustomization.yaml b/demos/rhoai-demo-ready/kustomization.yaml index b19f3e13..606ca981 100644 --- a/demos/rhoai-demo-ready/kustomization.yaml +++ b/demos/rhoai-demo-ready/kustomization.yaml @@ -7,10 +7,10 @@ resources: - ../../components/operators/authorino-operator/operator/overlays/tech-preview-v1 - ../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest + - ../../components/operators/serverless-operator/operator/overlays/stable - ../../components/operators/servicemeshoperator/operator/overlays/stable - ../../components/operators/rhods-operator/instance/overlays/all - - ../../components/operators/serverless-operator/operator/overlays/stable # - ../../components/app-configs/rhoai-config # TODO: reconcile issues with item above From 73a4581af3145978c54950640154d99b854aaa33 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 11:15:35 -0500 Subject: [PATCH 06/28] refactor: dump --- {dump => components/dump}/airflow/Chart.yaml | 0 {dump => components/dump}/airflow/README.md | 0 {dump => components/dump}/airflow/app-airflow.yaml | 0 {dump => components/dump}/airflow/kustomization.yaml | 0 {dump => components/dump}/airflow/values.yaml | 0 {dump => components/dump}/machineconfiguration.yml | 0 {dump => components/dump}/mlflow/deployment.yaml | 0 {dump => components/dump}/mlflow/objectbucketclaim.yaml | 0 {dump => components/dump}/mlflow/postgres.yaml | 0 {dump => components/dump}/mlflow/route.yaml | 0 {dump => components/dump}/mlflow/service.yaml | 0 {dump => components/dump}/mlflow/serviceaccount.yaml | 0 {dump => components/dump}/nmstate.yaml | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename {dump => components/dump}/airflow/Chart.yaml (100%) rename {dump => components/dump}/airflow/README.md (100%) rename {dump => components/dump}/airflow/app-airflow.yaml (100%) rename {dump => components/dump}/airflow/kustomization.yaml (100%) rename {dump => components/dump}/airflow/values.yaml (100%) rename {dump => components/dump}/machineconfiguration.yml (100%) rename {dump => components/dump}/mlflow/deployment.yaml (100%) rename {dump => components/dump}/mlflow/objectbucketclaim.yaml (100%) rename {dump => components/dump}/mlflow/postgres.yaml (100%) rename {dump => components/dump}/mlflow/route.yaml (100%) rename {dump => components/dump}/mlflow/service.yaml (100%) rename {dump => components/dump}/mlflow/serviceaccount.yaml (100%) rename {dump => components/dump}/nmstate.yaml (100%) diff --git a/dump/airflow/Chart.yaml b/components/dump/airflow/Chart.yaml similarity index 100% rename from dump/airflow/Chart.yaml rename to components/dump/airflow/Chart.yaml diff --git a/dump/airflow/README.md b/components/dump/airflow/README.md similarity index 100% rename from dump/airflow/README.md rename to components/dump/airflow/README.md diff --git a/dump/airflow/app-airflow.yaml b/components/dump/airflow/app-airflow.yaml similarity index 100% rename from dump/airflow/app-airflow.yaml rename to components/dump/airflow/app-airflow.yaml diff --git a/dump/airflow/kustomization.yaml b/components/dump/airflow/kustomization.yaml similarity index 100% rename from dump/airflow/kustomization.yaml rename to components/dump/airflow/kustomization.yaml diff --git a/dump/airflow/values.yaml b/components/dump/airflow/values.yaml similarity index 100% rename from dump/airflow/values.yaml rename to components/dump/airflow/values.yaml diff --git a/dump/machineconfiguration.yml b/components/dump/machineconfiguration.yml similarity index 100% rename from dump/machineconfiguration.yml rename to components/dump/machineconfiguration.yml diff --git a/dump/mlflow/deployment.yaml b/components/dump/mlflow/deployment.yaml similarity index 100% rename from dump/mlflow/deployment.yaml rename to components/dump/mlflow/deployment.yaml diff --git a/dump/mlflow/objectbucketclaim.yaml b/components/dump/mlflow/objectbucketclaim.yaml similarity index 100% rename from dump/mlflow/objectbucketclaim.yaml rename to components/dump/mlflow/objectbucketclaim.yaml diff --git a/dump/mlflow/postgres.yaml b/components/dump/mlflow/postgres.yaml similarity index 100% rename from dump/mlflow/postgres.yaml rename to components/dump/mlflow/postgres.yaml diff --git a/dump/mlflow/route.yaml b/components/dump/mlflow/route.yaml similarity index 100% rename from dump/mlflow/route.yaml rename to components/dump/mlflow/route.yaml diff --git a/dump/mlflow/service.yaml b/components/dump/mlflow/service.yaml similarity index 100% rename from dump/mlflow/service.yaml rename to components/dump/mlflow/service.yaml diff --git a/dump/mlflow/serviceaccount.yaml b/components/dump/mlflow/serviceaccount.yaml similarity index 100% rename from dump/mlflow/serviceaccount.yaml rename to components/dump/mlflow/serviceaccount.yaml diff --git a/dump/nmstate.yaml b/components/dump/nmstate.yaml similarity index 100% rename from dump/nmstate.yaml rename to components/dump/nmstate.yaml From acedcf291e009a4802505bc9cfd8e6f700fa8b3e Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 11:15:49 -0500 Subject: [PATCH 07/28] update: kubeadmin function --- scripts/library/ocp.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/library/ocp.sh b/scripts/library/ocp.sh index e5080f45..42ec089d 100644 --- a/scripts/library/ocp.sh +++ b/scripts/library/ocp.sh @@ -52,7 +52,16 @@ ocp_kubeadmin_remove(){ oc get secret kubeadmin -n kube-system -o yaml > scratch/kubeadmin.yaml || return 1 oc delete secret kubeadmin -n kube-system else - echo "${RED}WARNING: you must run - ocp_remove_kubeadmin YES${NC}" + echo -e "${RED} + WARNING: you must run - ocp_remove_kubeadmin YES + + WARNING: you will lose access to your cluster if you do not + have a way to login to your cluster without kubeadmin. + + Examples: + - An identity provider with a cluster-admin user setup + - A kubeconfig file + ${NC}" return fi } From 8a3776fd8c998c35c9b375fe51148d71b4d7d6ff Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 11:16:50 -0500 Subject: [PATCH 08/28] fix: lint --- .wordlist-sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.wordlist-sh b/.wordlist-sh index dde4cce2..906cb2b1 100644 --- a/.wordlist-sh +++ b/.wordlist-sh @@ -252,6 +252,7 @@ SCRIPTPATH searchcustomizations searchoperators ServerAliveInterval +serverlessservices servicemeshcontrolplanes servingCertificate servingCerts From c93744d19b952a41962395262f2936e4295ed89f Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 11:18:58 -0500 Subject: [PATCH 09/28] fix: pathes --- .../rhods-operator/instance/overlays/all/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml b/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml index 45060edf..7ae9152a 100644 --- a/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml +++ b/components/operators/rhods-operator/instance/overlays/all/kustomization.yaml @@ -11,7 +11,7 @@ components: - ../../components/components-training - ../../components/default-notebook-pvc-size - ../../components/disable-telemetry - - ../../components/components/fix-dashboard-bugs + - ../../components/fix-dashboard-bugs - ../../components/fix-kubeadmin-cluster-admin - ../../components/idle-notebook-culling - ../../components/model-server-pod-sizes From 7d1be292c6a3e85553b1d1681f9d325575d8ac7b Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 12:19:31 -0500 Subject: [PATCH 10/28] minor cleanup --- clusters/README.md | 2 +- .../cluster-configs/namespaces/instance/sandbox/link-ns.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clusters/README.md b/clusters/README.md index d49576fa..058ad2ce 100644 --- a/clusters/README.md +++ b/clusters/README.md @@ -1,4 +1,4 @@ -## Examples +# Examples - Demos - Workshops diff --git a/components/cluster-configs/namespaces/instance/sandbox/link-ns.yaml b/components/cluster-configs/namespaces/instance/sandbox/link-ns.yaml index 2f4e6341..818094b2 100644 --- a/components/cluster-configs/namespaces/instance/sandbox/link-ns.yaml +++ b/components/cluster-configs/namespaces/instance/sandbox/link-ns.yaml @@ -3,7 +3,7 @@ kind: ConsoleLink metadata: name: sandbox-dashboard spec: - href: '/k8s' + href: 'https://link-goes-here.com' location: NamespaceDashboard # This text will appear in a box called "Launcher" under "namespace" or "project" in the web console text: Custom Link Text From 2a9f4299601d3670ea3b9c79fbb597f208643425 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 12:23:32 -0500 Subject: [PATCH 11/28] update: authorino --- components/operators/authorino-operator/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/operators/authorino-operator/README.md b/components/operators/authorino-operator/README.md index 1ec14335..a23a0d2a 100644 --- a/components/operators/authorino-operator/README.md +++ b/components/operators/authorino-operator/README.md @@ -1,16 +1,16 @@ -# +# Authorino Operator -Install . +Install Authorino Operator. 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: - +* [tech-preview-v1](operator/overlays/tech-preview-v1) ## Usage -If you have cloned the `gitops-catalog` repository, you can install based on the overlay of your choice by running from the root (`gitops-catalog`) directory. +If you have cloned the `gitops-catalog` repository, you can install Authorino Operator based on the overlay of your choice by running from the root (`gitops-catalog`) directory. ```sh oc apply -k authorino-operator/operator/overlays/ From 476d6bb1f374f908a33fd8d8adf1f8e0b3b6d6f6 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 13:05:17 -0500 Subject: [PATCH 12/28] update: patch wait for --- .../components/fix-dashboard-bugs/job.yaml | 11 +++++++- .../components/wait-for-servicemesh/job.sh | 25 +++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml index 8c938e09..944680eb 100644 --- a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml @@ -15,7 +15,16 @@ metadata: annotations: argocd.argoproj.io/hook: PreSync rules: - - resources: + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - apiGroups: + - '' + resources: - pods verbs: - get diff --git a/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh b/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh index c19bdd09..ef6eec3b 100755 --- a/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh +++ b/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh @@ -3,12 +3,20 @@ set -e TIMEOUT_SECONDS=60 +patch_approval(){ + APPROVAL=${1:-Automatic} + + oc -n redhat-ods-operator \ + patch subscription rhods-operator \ + --type=merge --patch '{"spec":{"installPlanApproval":"'"${APPROVAL}"'"}}' +} + wait_for_service_mesh(){ echo "Checking status of all service_mesh pre-reqs" SERVICEMESH_RESOURCES=( - crd/knativeservings.operator.knative.dev:condition=established \ - crd/servicemeshcontrolplanes.maistra.io:condition=established \ + crd/knativeservings.operator.knative.dev:condition=established + crd/servicemeshcontrolplanes.maistra.io:condition=established ) for crd in "${SERVICEMESH_RESOURCES[@]}" @@ -17,16 +25,13 @@ SERVICEMESH_RESOURCES=( CONDITION=$(echo "$crd" | cut -d ":" -f 2) echo "Waiting for ${RESOURCE} state to be ${CONDITION}..." - oc wait --for="${CONDITION}" "${RESOURCE}" --timeout="${TIMEOUT_SECONDS}s" - done -} + oc wait --for="${CONDITION}" "${RESOURCE}" --timeout="1s" 2>/dev/null && continue + patch_approval Manual -approve_install(){ - oc -n redhat-ods-operator \ - patch subscription rhods-operator \ - --type=merge --patch '{"spec":{"installPlanApproval":{"Automatic"}}}' + oc wait --for="${CONDITION}" "${RESOURCE}" --timeout="${TIMEOUT_SECONDS}s" + patch_approval Automatic + done } wait_for_service_mesh -approve_install \ No newline at end of file From 777cd9f0ed05250dd5d4a838e13e3a2f66b02d5d Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 13:44:07 -0500 Subject: [PATCH 13/28] cleanup --- demos/all-the-things/kustomization.yaml | 10 ++++++---- demos/base/README.md | 5 ----- demos/base/all/kustomization.yaml | 6 ------ demos/base/kustomization.yaml | 4 ++-- .../aws-operators/kustomization.yaml | 4 ++-- .../branding}/banner-demo.yaml | 0 demos/components/branding/kustomization.yaml | 6 ++++++ .../branding}/link-github.yaml | 0 .../cpu-autoscale/kustomization.yaml | 4 ++-- .../devspaces/kustomization.yaml | 4 ++-- .../nvidia-gpu-autoscale/kustomization.yaml | 4 ++-- .../components/rhoai-intel/kustomization.yaml | 4 ++-- .../rhoai/kustomization.yaml | 4 ++-- .../kustomization.yaml | 6 ++++-- demos/devspaces/kustomization.yaml | 4 +++- demos/nvidia-gpu-autoscale/kustomization.yaml | 4 +++- demos/rhoai-intel/kustomization.yaml | 4 +++- demos/rhoai-minimal/kustomization.yaml | 4 +++- .../kustomization.yaml | 6 ++++-- .../kustomization.yaml | 19 +++++++++---------- .../patch-workshop-users.yaml | 0 workshop/base/kustomization.yaml | 7 ++----- 22 files changed, 57 insertions(+), 52 deletions(-) delete mode 100644 demos/base/README.md delete mode 100644 demos/base/all/kustomization.yaml rename demos/{base/all => components/branding}/banner-demo.yaml (100%) create mode 100644 demos/components/branding/kustomization.yaml rename demos/{base/all => components/branding}/link-github.yaml (100%) rename demos/{base => components}/devspaces/kustomization.yaml (57%) rename demos/{base => components}/nvidia-gpu-autoscale/kustomization.yaml (85%) rename demos/{base => components}/rhoai/kustomization.yaml (57%) rename demos/{rhoai-demo-ready => rhoai-workshop-ready}/kustomization.yaml (88%) rename demos/{rhoai-demo-ready => rhoai-workshop-ready}/patch-workshop-users.yaml (100%) diff --git a/demos/all-the-things/kustomization.yaml b/demos/all-the-things/kustomization.yaml index 027dca42..3f3a41b8 100644 --- a/demos/all-the-things/kustomization.yaml +++ b/demos/all-the-things/kustomization.yaml @@ -1,12 +1,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: + - ../components/rhoai-intel + - ../components/devspaces + - ../components/nvidia-gpu-autoscale + - ../components/rhoai + resources: - ../base - - ../base/devspaces - - ../base/nvidia-gpu-autoscale - - ../base/rhoai - - ../components/rhoai-intel patches: - target: diff --git a/demos/base/README.md b/demos/base/README.md deleted file mode 100644 index 94bcef8b..00000000 --- a/demos/base/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Info - -This folder containers folders with `kustomizaion.yaml` that will -not have conflicts when combined. The bases / folders can be combined -to create aggregates of a demo. diff --git a/demos/base/all/kustomization.yaml b/demos/base/all/kustomization.yaml deleted file mode 100644 index b3d441d2..00000000 --- a/demos/base/all/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - banner-demo.yaml - - link-github.yaml diff --git a/demos/base/kustomization.yaml b/demos/base/kustomization.yaml index e5bd7959..f4b7d669 100644 --- a/demos/base/kustomization.yaml +++ b/demos/base/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -resources: - - all +components: +- ../components/branding diff --git a/demos/components/aws-operators/kustomization.yaml b/demos/components/aws-operators/kustomization.yaml index 5329301a..ebf70253 100644 --- a/demos/components/aws-operators/kustomization.yaml +++ b/demos/components/aws-operators/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: - ../../../components/operators/ack-system/aggregate/popular diff --git a/demos/base/all/banner-demo.yaml b/demos/components/branding/banner-demo.yaml similarity index 100% rename from demos/base/all/banner-demo.yaml rename to demos/components/branding/banner-demo.yaml diff --git a/demos/components/branding/kustomization.yaml b/demos/components/branding/kustomization.yaml new file mode 100644 index 00000000..fcb6f9ae --- /dev/null +++ b/demos/components/branding/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - banner-demo.yaml + - link-github.yaml diff --git a/demos/base/all/link-github.yaml b/demos/components/branding/link-github.yaml similarity index 100% rename from demos/base/all/link-github.yaml rename to demos/components/branding/link-github.yaml diff --git a/demos/components/cpu-autoscale/kustomization.yaml b/demos/components/cpu-autoscale/kustomization.yaml index fee07caf..cf668fb3 100644 --- a/demos/components/cpu-autoscale/kustomization.yaml +++ b/demos/components/cpu-autoscale/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: - ../../../components/cluster-configs/autoscale/overlays/default diff --git a/demos/base/devspaces/kustomization.yaml b/demos/components/devspaces/kustomization.yaml similarity index 57% rename from demos/base/devspaces/kustomization.yaml rename to demos/components/devspaces/kustomization.yaml index bbd5533d..fc41695c 100644 --- a/demos/base/devspaces/kustomization.yaml +++ b/demos/components/devspaces/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: - ../../../components/operators/devspaces/aggregate/overlays/nvidia-gpu diff --git a/demos/base/nvidia-gpu-autoscale/kustomization.yaml b/demos/components/nvidia-gpu-autoscale/kustomization.yaml similarity index 85% rename from demos/base/nvidia-gpu-autoscale/kustomization.yaml rename to demos/components/nvidia-gpu-autoscale/kustomization.yaml index 0217eb33..ac498691 100644 --- a/demos/base/nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/components/nvidia-gpu-autoscale/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: - ../../../components/cluster-configs/autoscale/overlays/gpus diff --git a/demos/components/rhoai-intel/kustomization.yaml b/demos/components/rhoai-intel/kustomization.yaml index 64a21efa..3f48218a 100644 --- a/demos/components/rhoai-intel/kustomization.yaml +++ b/demos/components/rhoai-intel/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: - ../../../components/operators/aikit-operator/aggregate diff --git a/demos/base/rhoai/kustomization.yaml b/demos/components/rhoai/kustomization.yaml similarity index 57% rename from demos/base/rhoai/kustomization.yaml rename to demos/components/rhoai/kustomization.yaml index c8462c1c..67469d53 100644 --- a/demos/base/rhoai/kustomization.yaml +++ b/demos/components/rhoai/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: - ../../../components/operators/rhods-operator/operator/overlays/stable diff --git a/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml b/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml index b2dc7900..11b72158 100644 --- a/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml @@ -1,10 +1,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: + - ../components/devspaces + - ../components/nvidia-gpu-autoscale + resources: - ../base - - ../base/devspaces - - ../base/nvidia-gpu-autoscale patches: - target: diff --git a/demos/devspaces/kustomization.yaml b/demos/devspaces/kustomization.yaml index 6306fedf..75517adb 100644 --- a/demos/devspaces/kustomization.yaml +++ b/demos/devspaces/kustomization.yaml @@ -1,9 +1,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: + - ../components/devspaces + resources: - ../base - - ../base/devspaces patches: - target: diff --git a/demos/nvidia-gpu-autoscale/kustomization.yaml b/demos/nvidia-gpu-autoscale/kustomization.yaml index ef85ed4d..c5b70c54 100644 --- a/demos/nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/nvidia-gpu-autoscale/kustomization.yaml @@ -1,9 +1,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: + - ../components/nvidia-gpu-autoscale + resources: - ../base - - ../base/nvidia-gpu-autoscale patches: - target: diff --git a/demos/rhoai-intel/kustomization.yaml b/demos/rhoai-intel/kustomization.yaml index b79ad1a7..0152cf47 100644 --- a/demos/rhoai-intel/kustomization.yaml +++ b/demos/rhoai-intel/kustomization.yaml @@ -1,9 +1,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: + - ../components/rhoai-intel + resources: - ../rhoai-minimal - - ../components/rhoai-intel patches: - target: diff --git a/demos/rhoai-minimal/kustomization.yaml b/demos/rhoai-minimal/kustomization.yaml index cb14982f..733924d5 100644 --- a/demos/rhoai-minimal/kustomization.yaml +++ b/demos/rhoai-minimal/kustomization.yaml @@ -1,9 +1,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: +- ../components/rhoai + resources: - ../base - - ../base/rhoai - ../../components/operators/rhods-operator/instance/overlays/minimal patches: diff --git a/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml b/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml index ff88a07f..5ac7da99 100644 --- a/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml @@ -1,10 +1,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: + - ../components/nvidia-gpu-autoscale + - ../components/rhoai + resources: - ../base - - ../base/nvidia-gpu-autoscale - - ../base/rhoai patches: - target: diff --git a/demos/rhoai-demo-ready/kustomization.yaml b/demos/rhoai-workshop-ready/kustomization.yaml similarity index 88% rename from demos/rhoai-demo-ready/kustomization.yaml rename to demos/rhoai-workshop-ready/kustomization.yaml index 606ca981..b92b6205 100644 --- a/demos/rhoai-demo-ready/kustomization.yaml +++ b/demos/rhoai-workshop-ready/kustomization.yaml @@ -2,8 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../base - - ../base/rhoai + - ../rhoai-nvidia-gpu-autoscale - ../../components/operators/authorino-operator/operator/overlays/tech-preview-v1 - ../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest @@ -40,14 +39,14 @@ patches: - op: replace path: /spec/text value: 'DEMO: Red Hat OpenShift AI (RHOAI)' - # kludge: allow servicemesh to install before rhoai - # - target: - # kind: Subscription - # name: rhods-operator - # patch: |- - # - op: replace - # path: /spec/installPlanApproval - # value: Manual + # kludge: allow servicemesh to install before rhoai + - target: + kind: Subscription + name: rhods-operator + patch: |- + - op: replace + path: /spec/installPlanApproval + value: Manual # - target: # group: user.openshift.io # kind: Group diff --git a/demos/rhoai-demo-ready/patch-workshop-users.yaml b/demos/rhoai-workshop-ready/patch-workshop-users.yaml similarity index 100% rename from demos/rhoai-demo-ready/patch-workshop-users.yaml rename to demos/rhoai-workshop-ready/patch-workshop-users.yaml diff --git a/workshop/base/kustomization.yaml b/workshop/base/kustomization.yaml index 4b6f45c8..63ed3632 100644 --- a/workshop/base/kustomization.yaml +++ b/workshop/base/kustomization.yaml @@ -2,15 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../demos/base/rhoai -- ../../components/app-configs/rhoai-config +# - ../../components/app-configs/rhoai-config +- ../../demos/rhoai-workshop-ready - ../../components/cluster-configs/rbac/overlays/workshop - ../../components/cluster-configs/login/overlays/htpasswd -- ../../demos/base/all -- ../../demos/base/nvidia-gpu-autoscale - - htpasswd-secret.yaml - link-github.yaml - minio-rb-view.yaml From 51026dc36af82e18bf7460ad3e9b3d56c8e432c3 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 13:46:37 -0500 Subject: [PATCH 14/28] update: paths --- {workshop => workshops}/base/dashboard-config-cr.yaml | 0 {workshop => workshops}/base/exclude-job.yaml | 0 {workshop => workshops}/base/htpasswd-secret.yaml | 0 {workshop => workshops}/base/kustomization.yaml | 0 {workshop => workshops}/base/link-github.yaml | 0 {workshop => workshops}/base/minio-rb-view.yaml | 0 {workshop => workshops}/base/patch-idp.yaml | 0 {workshop => workshops}/instance/data-connection-secret.yaml | 0 {workshop => workshops}/instance/job-setup-user.yaml | 0 {workshop => workshops}/instance/kustomization.yaml | 0 {workshop => workshops}/instance/notebook.yaml | 0 {workshop => workshops}/instance/ns-rb-admin.yaml | 0 {workshop => workshops}/instance/ns-rb-view.yaml | 0 {workshop => workshops}/instance/ns.yaml | 0 {workshop => workshops}/instance/pvc.yaml | 0 {workshop => workshops}/instance/quota.yaml | 0 {workshop => workshops}/overlays/default/kustomization.yaml | 0 .../wip/parasol-insurance/00-prereqs/kustomization.yaml | 0 .../wip/parasol-insurance/01-setup/exclude-acc-profile.yaml | 0 .../wip/parasol-insurance/01-setup/exclude-cm.yaml | 0 .../wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml | 0 .../wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml | 0 .../wip/parasol-insurance/01-setup/kustomization.yaml | 0 {workshop => workshops}/wip/parasol-insurance/README.md | 0 {workshop => workshops}/wip/parasol-insurance/instance/dspa.yaml | 0 .../wip/parasol-insurance/instance/job-data-connector.yaml | 0 .../wip/parasol-insurance/instance/job-pipeline.yaml | 0 .../wip/parasol-insurance/instance/job-rbac.yaml | 0 .../wip/parasol-insurance/instance/job-repo.yaml | 0 .../wip/parasol-insurance/instance/kustomization.yaml | 0 .../wip/parasol-insurance/instance/notebook.yaml | 0 .../wip/parasol-insurance/instance/ns-rb-admin.yaml | 0 .../wip/parasol-insurance/instance/ns-rb-view.yaml | 0 {workshop => workshops}/wip/parasol-insurance/instance/ns.yaml | 0 {workshop => workshops}/wip/parasol-insurance/instance/pvc.yaml | 0 {workshop => workshops}/wip/parasol-insurance/instance/quota.yaml | 0 {workshop => workshops}/wip/parasol-insurance/setup_users.sh | 0 .../xx-image-cache/image-puller-app/kustomization.yaml | 0 .../xx-image-cache/image-puller-pipelines/kustomization.yaml | 0 .../xx-image-cache/image-puller-workbench/kustomization.yaml | 0 .../wip/parasol-insurance/xx-image-cache/kustomization.yaml | 0 .../wip/parasol-insurance/xx-image-cache/namespace.yaml | 0 42 files changed, 0 insertions(+), 0 deletions(-) rename {workshop => workshops}/base/dashboard-config-cr.yaml (100%) rename {workshop => workshops}/base/exclude-job.yaml (100%) rename {workshop => workshops}/base/htpasswd-secret.yaml (100%) rename {workshop => workshops}/base/kustomization.yaml (100%) rename {workshop => workshops}/base/link-github.yaml (100%) rename {workshop => workshops}/base/minio-rb-view.yaml (100%) rename {workshop => workshops}/base/patch-idp.yaml (100%) rename {workshop => workshops}/instance/data-connection-secret.yaml (100%) rename {workshop => workshops}/instance/job-setup-user.yaml (100%) rename {workshop => workshops}/instance/kustomization.yaml (100%) rename {workshop => workshops}/instance/notebook.yaml (100%) rename {workshop => workshops}/instance/ns-rb-admin.yaml (100%) rename {workshop => workshops}/instance/ns-rb-view.yaml (100%) rename {workshop => workshops}/instance/ns.yaml (100%) rename {workshop => workshops}/instance/pvc.yaml (100%) rename {workshop => workshops}/instance/quota.yaml (100%) rename {workshop => workshops}/overlays/default/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/00-prereqs/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/01-setup/exclude-acc-profile.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/01-setup/exclude-cm.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/01-setup/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/README.md (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/dspa.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/job-data-connector.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/job-pipeline.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/job-rbac.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/job-repo.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/notebook.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/ns-rb-admin.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/ns-rb-view.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/ns.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/pvc.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/instance/quota.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/setup_users.sh (100%) rename {workshop => workshops}/wip/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/xx-image-cache/kustomization.yaml (100%) rename {workshop => workshops}/wip/parasol-insurance/xx-image-cache/namespace.yaml (100%) diff --git a/workshop/base/dashboard-config-cr.yaml b/workshops/base/dashboard-config-cr.yaml similarity index 100% rename from workshop/base/dashboard-config-cr.yaml rename to workshops/base/dashboard-config-cr.yaml diff --git a/workshop/base/exclude-job.yaml b/workshops/base/exclude-job.yaml similarity index 100% rename from workshop/base/exclude-job.yaml rename to workshops/base/exclude-job.yaml diff --git a/workshop/base/htpasswd-secret.yaml b/workshops/base/htpasswd-secret.yaml similarity index 100% rename from workshop/base/htpasswd-secret.yaml rename to workshops/base/htpasswd-secret.yaml diff --git a/workshop/base/kustomization.yaml b/workshops/base/kustomization.yaml similarity index 100% rename from workshop/base/kustomization.yaml rename to workshops/base/kustomization.yaml diff --git a/workshop/base/link-github.yaml b/workshops/base/link-github.yaml similarity index 100% rename from workshop/base/link-github.yaml rename to workshops/base/link-github.yaml diff --git a/workshop/base/minio-rb-view.yaml b/workshops/base/minio-rb-view.yaml similarity index 100% rename from workshop/base/minio-rb-view.yaml rename to workshops/base/minio-rb-view.yaml diff --git a/workshop/base/patch-idp.yaml b/workshops/base/patch-idp.yaml similarity index 100% rename from workshop/base/patch-idp.yaml rename to workshops/base/patch-idp.yaml diff --git a/workshop/instance/data-connection-secret.yaml b/workshops/instance/data-connection-secret.yaml similarity index 100% rename from workshop/instance/data-connection-secret.yaml rename to workshops/instance/data-connection-secret.yaml diff --git a/workshop/instance/job-setup-user.yaml b/workshops/instance/job-setup-user.yaml similarity index 100% rename from workshop/instance/job-setup-user.yaml rename to workshops/instance/job-setup-user.yaml diff --git a/workshop/instance/kustomization.yaml b/workshops/instance/kustomization.yaml similarity index 100% rename from workshop/instance/kustomization.yaml rename to workshops/instance/kustomization.yaml diff --git a/workshop/instance/notebook.yaml b/workshops/instance/notebook.yaml similarity index 100% rename from workshop/instance/notebook.yaml rename to workshops/instance/notebook.yaml diff --git a/workshop/instance/ns-rb-admin.yaml b/workshops/instance/ns-rb-admin.yaml similarity index 100% rename from workshop/instance/ns-rb-admin.yaml rename to workshops/instance/ns-rb-admin.yaml diff --git a/workshop/instance/ns-rb-view.yaml b/workshops/instance/ns-rb-view.yaml similarity index 100% rename from workshop/instance/ns-rb-view.yaml rename to workshops/instance/ns-rb-view.yaml diff --git a/workshop/instance/ns.yaml b/workshops/instance/ns.yaml similarity index 100% rename from workshop/instance/ns.yaml rename to workshops/instance/ns.yaml diff --git a/workshop/instance/pvc.yaml b/workshops/instance/pvc.yaml similarity index 100% rename from workshop/instance/pvc.yaml rename to workshops/instance/pvc.yaml diff --git a/workshop/instance/quota.yaml b/workshops/instance/quota.yaml similarity index 100% rename from workshop/instance/quota.yaml rename to workshops/instance/quota.yaml diff --git a/workshop/overlays/default/kustomization.yaml b/workshops/overlays/default/kustomization.yaml similarity index 100% rename from workshop/overlays/default/kustomization.yaml rename to workshops/overlays/default/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/00-prereqs/kustomization.yaml b/workshops/wip/parasol-insurance/00-prereqs/kustomization.yaml similarity index 100% rename from workshop/wip/parasol-insurance/00-prereqs/kustomization.yaml rename to workshops/wip/parasol-insurance/00-prereqs/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/01-setup/exclude-acc-profile.yaml b/workshops/wip/parasol-insurance/01-setup/exclude-acc-profile.yaml similarity index 100% rename from workshop/wip/parasol-insurance/01-setup/exclude-acc-profile.yaml rename to workshops/wip/parasol-insurance/01-setup/exclude-acc-profile.yaml diff --git a/workshop/wip/parasol-insurance/01-setup/exclude-cm.yaml b/workshops/wip/parasol-insurance/01-setup/exclude-cm.yaml similarity index 100% rename from workshop/wip/parasol-insurance/01-setup/exclude-cm.yaml rename to workshops/wip/parasol-insurance/01-setup/exclude-cm.yaml diff --git a/workshop/wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml b/workshops/wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml similarity index 100% rename from workshop/wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml rename to workshops/wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml diff --git a/workshop/wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml b/workshops/wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml similarity index 100% rename from workshop/wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml rename to workshops/wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml diff --git a/workshop/wip/parasol-insurance/01-setup/kustomization.yaml b/workshops/wip/parasol-insurance/01-setup/kustomization.yaml similarity index 100% rename from workshop/wip/parasol-insurance/01-setup/kustomization.yaml rename to workshops/wip/parasol-insurance/01-setup/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/README.md b/workshops/wip/parasol-insurance/README.md similarity index 100% rename from workshop/wip/parasol-insurance/README.md rename to workshops/wip/parasol-insurance/README.md diff --git a/workshop/wip/parasol-insurance/instance/dspa.yaml b/workshops/wip/parasol-insurance/instance/dspa.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/dspa.yaml rename to workshops/wip/parasol-insurance/instance/dspa.yaml diff --git a/workshop/wip/parasol-insurance/instance/job-data-connector.yaml b/workshops/wip/parasol-insurance/instance/job-data-connector.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/job-data-connector.yaml rename to workshops/wip/parasol-insurance/instance/job-data-connector.yaml diff --git a/workshop/wip/parasol-insurance/instance/job-pipeline.yaml b/workshops/wip/parasol-insurance/instance/job-pipeline.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/job-pipeline.yaml rename to workshops/wip/parasol-insurance/instance/job-pipeline.yaml diff --git a/workshop/wip/parasol-insurance/instance/job-rbac.yaml b/workshops/wip/parasol-insurance/instance/job-rbac.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/job-rbac.yaml rename to workshops/wip/parasol-insurance/instance/job-rbac.yaml diff --git a/workshop/wip/parasol-insurance/instance/job-repo.yaml b/workshops/wip/parasol-insurance/instance/job-repo.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/job-repo.yaml rename to workshops/wip/parasol-insurance/instance/job-repo.yaml diff --git a/workshop/wip/parasol-insurance/instance/kustomization.yaml b/workshops/wip/parasol-insurance/instance/kustomization.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/kustomization.yaml rename to workshops/wip/parasol-insurance/instance/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/instance/notebook.yaml b/workshops/wip/parasol-insurance/instance/notebook.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/notebook.yaml rename to workshops/wip/parasol-insurance/instance/notebook.yaml diff --git a/workshop/wip/parasol-insurance/instance/ns-rb-admin.yaml b/workshops/wip/parasol-insurance/instance/ns-rb-admin.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/ns-rb-admin.yaml rename to workshops/wip/parasol-insurance/instance/ns-rb-admin.yaml diff --git a/workshop/wip/parasol-insurance/instance/ns-rb-view.yaml b/workshops/wip/parasol-insurance/instance/ns-rb-view.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/ns-rb-view.yaml rename to workshops/wip/parasol-insurance/instance/ns-rb-view.yaml diff --git a/workshop/wip/parasol-insurance/instance/ns.yaml b/workshops/wip/parasol-insurance/instance/ns.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/ns.yaml rename to workshops/wip/parasol-insurance/instance/ns.yaml diff --git a/workshop/wip/parasol-insurance/instance/pvc.yaml b/workshops/wip/parasol-insurance/instance/pvc.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/pvc.yaml rename to workshops/wip/parasol-insurance/instance/pvc.yaml diff --git a/workshop/wip/parasol-insurance/instance/quota.yaml b/workshops/wip/parasol-insurance/instance/quota.yaml similarity index 100% rename from workshop/wip/parasol-insurance/instance/quota.yaml rename to workshops/wip/parasol-insurance/instance/quota.yaml diff --git a/workshop/wip/parasol-insurance/setup_users.sh b/workshops/wip/parasol-insurance/setup_users.sh similarity index 100% rename from workshop/wip/parasol-insurance/setup_users.sh rename to workshops/wip/parasol-insurance/setup_users.sh diff --git a/workshop/wip/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml b/workshops/wip/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml similarity index 100% rename from workshop/wip/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml rename to workshops/wip/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml b/workshops/wip/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml similarity index 100% rename from workshop/wip/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml rename to workshops/wip/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml b/workshops/wip/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml similarity index 100% rename from workshop/wip/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml rename to workshops/wip/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/xx-image-cache/kustomization.yaml b/workshops/wip/parasol-insurance/xx-image-cache/kustomization.yaml similarity index 100% rename from workshop/wip/parasol-insurance/xx-image-cache/kustomization.yaml rename to workshops/wip/parasol-insurance/xx-image-cache/kustomization.yaml diff --git a/workshop/wip/parasol-insurance/xx-image-cache/namespace.yaml b/workshops/wip/parasol-insurance/xx-image-cache/namespace.yaml similarity index 100% rename from workshop/wip/parasol-insurance/xx-image-cache/namespace.yaml rename to workshops/wip/parasol-insurance/xx-image-cache/namespace.yaml From db45f835dd81fa8b43cef20cf3bf16d1afd6b502 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 13:49:58 -0500 Subject: [PATCH 15/28] refactor --- .../parasol-insurance/00-prereqs/kustomization.yaml | 3 +-- .../parasol-insurance/01-setup/exclude-acc-profile.yaml | 0 .../parasol-insurance/01-setup/exclude-cm.yaml | 0 .../parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml | 0 .../parasol-insurance/01-setup/exclude-sc-gp3.yaml | 0 .../parasol-insurance/01-setup/kustomization.yaml | 0 workshops/{wip => overlays}/parasol-insurance/README.md | 0 .../{wip => overlays}/parasol-insurance/instance/dspa.yaml | 0 .../parasol-insurance/instance/job-data-connector.yaml | 0 .../parasol-insurance/instance/job-pipeline.yaml | 0 .../{wip => overlays}/parasol-insurance/instance/job-rbac.yaml | 0 .../{wip => overlays}/parasol-insurance/instance/job-repo.yaml | 0 .../parasol-insurance/instance/kustomization.yaml | 0 .../{wip => overlays}/parasol-insurance/instance/notebook.yaml | 0 .../parasol-insurance/instance/ns-rb-admin.yaml | 0 .../parasol-insurance/instance/ns-rb-view.yaml | 0 workshops/{wip => overlays}/parasol-insurance/instance/ns.yaml | 0 .../{wip => overlays}/parasol-insurance/instance/pvc.yaml | 0 .../{wip => overlays}/parasol-insurance/instance/quota.yaml | 0 workshops/{wip => overlays}/parasol-insurance/setup_users.sh | 0 .../xx-image-cache/image-puller-app/kustomization.yaml | 0 .../xx-image-cache/image-puller-pipelines/kustomization.yaml | 0 .../xx-image-cache/image-puller-workbench/kustomization.yaml | 0 .../parasol-insurance/xx-image-cache/kustomization.yaml | 0 .../parasol-insurance/xx-image-cache/namespace.yaml | 0 25 files changed, 1 insertion(+), 2 deletions(-) rename workshops/{wip => overlays}/parasol-insurance/00-prereqs/kustomization.yaml (93%) rename workshops/{wip => overlays}/parasol-insurance/01-setup/exclude-acc-profile.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/01-setup/exclude-cm.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/01-setup/exclude-sc-gp3.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/01-setup/kustomization.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/README.md (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/dspa.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/job-data-connector.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/job-pipeline.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/job-rbac.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/job-repo.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/kustomization.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/notebook.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/ns-rb-admin.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/ns-rb-view.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/ns.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/pvc.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/instance/quota.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/setup_users.sh (100%) rename workshops/{wip => overlays}/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/xx-image-cache/kustomization.yaml (100%) rename workshops/{wip => overlays}/parasol-insurance/xx-image-cache/namespace.yaml (100%) diff --git a/workshops/wip/parasol-insurance/00-prereqs/kustomization.yaml b/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml similarity index 93% rename from workshops/wip/parasol-insurance/00-prereqs/kustomization.yaml rename to workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml index 090bf796..991f3eef 100644 --- a/workshops/wip/parasol-insurance/00-prereqs/kustomization.yaml +++ b/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml @@ -2,8 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../../../../demos/rhoai-nvidia-gpu-autoscale - # - ../../../../components/app-configs/rhoai-config + - ../../../../demos/rhoai-workshop-ready patches: - target: diff --git a/workshops/wip/parasol-insurance/01-setup/exclude-acc-profile.yaml b/workshops/overlays/parasol-insurance/01-setup/exclude-acc-profile.yaml similarity index 100% rename from workshops/wip/parasol-insurance/01-setup/exclude-acc-profile.yaml rename to workshops/overlays/parasol-insurance/01-setup/exclude-acc-profile.yaml diff --git a/workshops/wip/parasol-insurance/01-setup/exclude-cm.yaml b/workshops/overlays/parasol-insurance/01-setup/exclude-cm.yaml similarity index 100% rename from workshops/wip/parasol-insurance/01-setup/exclude-cm.yaml rename to workshops/overlays/parasol-insurance/01-setup/exclude-cm.yaml diff --git a/workshops/wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml b/workshops/overlays/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml similarity index 100% rename from workshops/wip/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml rename to workshops/overlays/parasol-insurance/01-setup/exclude-sc-ceph-rbd.yaml diff --git a/workshops/wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml b/workshops/overlays/parasol-insurance/01-setup/exclude-sc-gp3.yaml similarity index 100% rename from workshops/wip/parasol-insurance/01-setup/exclude-sc-gp3.yaml rename to workshops/overlays/parasol-insurance/01-setup/exclude-sc-gp3.yaml diff --git a/workshops/wip/parasol-insurance/01-setup/kustomization.yaml b/workshops/overlays/parasol-insurance/01-setup/kustomization.yaml similarity index 100% rename from workshops/wip/parasol-insurance/01-setup/kustomization.yaml rename to workshops/overlays/parasol-insurance/01-setup/kustomization.yaml diff --git a/workshops/wip/parasol-insurance/README.md b/workshops/overlays/parasol-insurance/README.md similarity index 100% rename from workshops/wip/parasol-insurance/README.md rename to workshops/overlays/parasol-insurance/README.md diff --git a/workshops/wip/parasol-insurance/instance/dspa.yaml b/workshops/overlays/parasol-insurance/instance/dspa.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/dspa.yaml rename to workshops/overlays/parasol-insurance/instance/dspa.yaml diff --git a/workshops/wip/parasol-insurance/instance/job-data-connector.yaml b/workshops/overlays/parasol-insurance/instance/job-data-connector.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/job-data-connector.yaml rename to workshops/overlays/parasol-insurance/instance/job-data-connector.yaml diff --git a/workshops/wip/parasol-insurance/instance/job-pipeline.yaml b/workshops/overlays/parasol-insurance/instance/job-pipeline.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/job-pipeline.yaml rename to workshops/overlays/parasol-insurance/instance/job-pipeline.yaml diff --git a/workshops/wip/parasol-insurance/instance/job-rbac.yaml b/workshops/overlays/parasol-insurance/instance/job-rbac.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/job-rbac.yaml rename to workshops/overlays/parasol-insurance/instance/job-rbac.yaml diff --git a/workshops/wip/parasol-insurance/instance/job-repo.yaml b/workshops/overlays/parasol-insurance/instance/job-repo.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/job-repo.yaml rename to workshops/overlays/parasol-insurance/instance/job-repo.yaml diff --git a/workshops/wip/parasol-insurance/instance/kustomization.yaml b/workshops/overlays/parasol-insurance/instance/kustomization.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/kustomization.yaml rename to workshops/overlays/parasol-insurance/instance/kustomization.yaml diff --git a/workshops/wip/parasol-insurance/instance/notebook.yaml b/workshops/overlays/parasol-insurance/instance/notebook.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/notebook.yaml rename to workshops/overlays/parasol-insurance/instance/notebook.yaml diff --git a/workshops/wip/parasol-insurance/instance/ns-rb-admin.yaml b/workshops/overlays/parasol-insurance/instance/ns-rb-admin.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/ns-rb-admin.yaml rename to workshops/overlays/parasol-insurance/instance/ns-rb-admin.yaml diff --git a/workshops/wip/parasol-insurance/instance/ns-rb-view.yaml b/workshops/overlays/parasol-insurance/instance/ns-rb-view.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/ns-rb-view.yaml rename to workshops/overlays/parasol-insurance/instance/ns-rb-view.yaml diff --git a/workshops/wip/parasol-insurance/instance/ns.yaml b/workshops/overlays/parasol-insurance/instance/ns.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/ns.yaml rename to workshops/overlays/parasol-insurance/instance/ns.yaml diff --git a/workshops/wip/parasol-insurance/instance/pvc.yaml b/workshops/overlays/parasol-insurance/instance/pvc.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/pvc.yaml rename to workshops/overlays/parasol-insurance/instance/pvc.yaml diff --git a/workshops/wip/parasol-insurance/instance/quota.yaml b/workshops/overlays/parasol-insurance/instance/quota.yaml similarity index 100% rename from workshops/wip/parasol-insurance/instance/quota.yaml rename to workshops/overlays/parasol-insurance/instance/quota.yaml diff --git a/workshops/wip/parasol-insurance/setup_users.sh b/workshops/overlays/parasol-insurance/setup_users.sh similarity index 100% rename from workshops/wip/parasol-insurance/setup_users.sh rename to workshops/overlays/parasol-insurance/setup_users.sh diff --git a/workshops/wip/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml similarity index 100% rename from workshops/wip/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml rename to workshops/overlays/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml diff --git a/workshops/wip/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml similarity index 100% rename from workshops/wip/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml rename to workshops/overlays/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml diff --git a/workshops/wip/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml similarity index 100% rename from workshops/wip/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml rename to workshops/overlays/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml diff --git a/workshops/wip/parasol-insurance/xx-image-cache/kustomization.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/kustomization.yaml similarity index 100% rename from workshops/wip/parasol-insurance/xx-image-cache/kustomization.yaml rename to workshops/overlays/parasol-insurance/xx-image-cache/kustomization.yaml diff --git a/workshops/wip/parasol-insurance/xx-image-cache/namespace.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/namespace.yaml similarity index 100% rename from workshops/wip/parasol-insurance/xx-image-cache/namespace.yaml rename to workshops/overlays/parasol-insurance/xx-image-cache/namespace.yaml From b87523f17253a389a4e589715f8dd636c4c8700f Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 14:00:48 -0500 Subject: [PATCH 16/28] move notebooks --- {notebooks => components/notebooks}/example-Insert-env-vars.ipynb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {notebooks => components/notebooks}/example-Insert-env-vars.ipynb (100%) diff --git a/notebooks/example-Insert-env-vars.ipynb b/components/notebooks/example-Insert-env-vars.ipynb similarity index 100% rename from notebooks/example-Insert-env-vars.ipynb rename to components/notebooks/example-Insert-env-vars.ipynb From 29b02ec042dd2451d68ae2cfba6a40ac5c1dbcb1 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 14:22:49 -0500 Subject: [PATCH 17/28] update: prereqs --- demos/components/rhoai-prereqs/kustomization.yaml | 8 ++++++++ demos/rhoai-workshop-ready/kustomization.yaml | 11 +++-------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 demos/components/rhoai-prereqs/kustomization.yaml diff --git a/demos/components/rhoai-prereqs/kustomization.yaml b/demos/components/rhoai-prereqs/kustomization.yaml new file mode 100644 index 00000000..e7feff51 --- /dev/null +++ b/demos/components/rhoai-prereqs/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - ../../../components/operators/authorino-operator/operator/overlays/tech-preview-v1 + - ../../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest + - ../../../components/operators/serverless-operator/operator/overlays/stable + - ../../../components/operators/servicemeshoperator/operator/overlays/stable \ No newline at end of file diff --git a/demos/rhoai-workshop-ready/kustomization.yaml b/demos/rhoai-workshop-ready/kustomization.yaml index b92b6205..24b1ed2a 100644 --- a/demos/rhoai-workshop-ready/kustomization.yaml +++ b/demos/rhoai-workshop-ready/kustomization.yaml @@ -1,20 +1,15 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: + - ../components/rhoai-prereqs + resources: - ../rhoai-nvidia-gpu-autoscale - - - ../../components/operators/authorino-operator/operator/overlays/tech-preview-v1 - - ../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest - - ../../components/operators/serverless-operator/operator/overlays/stable - - ../../components/operators/servicemeshoperator/operator/overlays/stable - - ../../components/operators/rhods-operator/instance/overlays/all # - ../../components/app-configs/rhoai-config # TODO: reconcile issues with item above - # - ../../components/operators/serverless-operator/instance/knative-eventing/overlays/default - # - ../../components/operators/serverless-operator/instance/knative-serving/overlays/default # - ../../components/app-configs/custom-notebook-images/overlays/rhoai # - ../../components/app-configs/minio/overlays/with-namespace From 4e1b795052f69097da4875e4eeea3f599c45b271 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 14:28:06 -0500 Subject: [PATCH 18/28] rename things --- demos/all-the-things/kustomization.yaml | 4 ++-- .../kustomization.yaml | 0 demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml | 2 +- demos/nvidia-gpu-autoscale/kustomization.yaml | 2 +- demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename demos/components/{nvidia-gpu-autoscale => aws-nvidia-gpu-autoscale}/kustomization.yaml (100%) diff --git a/demos/all-the-things/kustomization.yaml b/demos/all-the-things/kustomization.yaml index 3f3a41b8..0d19997d 100644 --- a/demos/all-the-things/kustomization.yaml +++ b/demos/all-the-things/kustomization.yaml @@ -2,10 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/rhoai-intel + - ../components/aws-nvidia-gpu-autoscale - ../components/devspaces - - ../components/nvidia-gpu-autoscale - ../components/rhoai + - ../components/rhoai-intel resources: - ../base diff --git a/demos/components/nvidia-gpu-autoscale/kustomization.yaml b/demos/components/aws-nvidia-gpu-autoscale/kustomization.yaml similarity index 100% rename from demos/components/nvidia-gpu-autoscale/kustomization.yaml rename to demos/components/aws-nvidia-gpu-autoscale/kustomization.yaml diff --git a/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml b/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml index 11b72158..fbe4aea6 100644 --- a/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml @@ -2,8 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: + - ../components/aws-nvidia-gpu-autoscale - ../components/devspaces - - ../components/nvidia-gpu-autoscale resources: - ../base diff --git a/demos/nvidia-gpu-autoscale/kustomization.yaml b/demos/nvidia-gpu-autoscale/kustomization.yaml index c5b70c54..f83f7621 100644 --- a/demos/nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/nvidia-gpu-autoscale/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/nvidia-gpu-autoscale + - ../components/aws-nvidia-gpu-autoscale resources: - ../base diff --git a/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml b/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml index 5ac7da99..3210b213 100644 --- a/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/nvidia-gpu-autoscale + - ../components/aws-nvidia-gpu-autoscale - ../components/rhoai resources: From 7198c8e41c04ae8543b21d7dc240e374ffa62d12 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 15:01:47 -0500 Subject: [PATCH 19/28] rename functions --- .../cluster-configs/autoscale/base/job.sh | 2 +- .../components/aws-gpu-machineset/job.sh | 6 +-- .../components/aws-gpu-machineset/ocp.sh | 20 ++++---- .../components/aws-odf-machineset/ocp.sh | 6 +-- .../instance/base/aws/job.yaml | 2 +- demos/components/branding/kustomization.yaml | 8 +++ scripts/library/nvidia.sh | 2 +- scripts/library/ocp.sh | 50 ++++++++++++------- .../00-prereqs/kustomization.yaml | 4 +- 9 files changed, 60 insertions(+), 40 deletions(-) diff --git a/components/cluster-configs/autoscale/base/job.sh b/components/cluster-configs/autoscale/base/job.sh index 9b9b2adb..e51166af 100755 --- a/components/cluster-configs/autoscale/base/job.sh +++ b/components/cluster-configs/autoscale/base/job.sh @@ -3,4 +3,4 @@ . /scripts/ocp.sh -ocp_create_machineset_autoscale "${MACHINE_MIN}" "${MACHINE_MAX}" +ocp_machineset_create_autoscale "${MACHINE_MIN}" "${MACHINE_MAX}" diff --git a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh index e47f0c22..a5b74313 100755 --- a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh +++ b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh @@ -6,6 +6,6 @@ INSTANCE_TYPE=${INSTANCE_TYPE:-g4dn.4xlarge} ocp_aws_cluster || exit 0 -ocp_aws_create_gpu_machineset "${INSTANCE_TYPE}" -ocp_create_machineset_autoscale -# ocp_aws_taint_gpu_machineset +ocp_aws_machineset_create_gpu "${INSTANCE_TYPE}" +ocp_machineset_create_autoscale +# ocp_aws_machineset_taint_gpu diff --git a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh index 54827216..2b4621e8 100644 --- a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh +++ b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh @@ -4,10 +4,10 @@ # See https://github.com/redhat-na-ssa/demo-ai-gitops-catalog # FUNCTIONS=' # ocp_aws_cluster -# ocp_aws_create_gpu_machineset -# ocp_aws_clone_worker_machineset -# ocp_aws_taint_gpu_machineset -# ocp_create_machineset_autoscale +# ocp_aws_machineset_create_gpu +# ocp_aws_machineset_clone_worker +# ocp_aws_machineset_taint_gpu +# ocp_machineset_create_autoscale # ' # for function in ${FUNCTIONS} @@ -24,7 +24,7 @@ ocp_aws_cluster(){ echo "AWS cluster detected" } -ocp_aws_create_gpu_machineset(){ +ocp_aws_machineset_create_gpu(){ # https://aws.amazon.com/ec2/instance-types/g4 # single gpu: g4dn.{2,4,8,16}xlarge # multi gpu: g4dn.12xlarge @@ -37,7 +37,7 @@ ocp_aws_create_gpu_machineset(){ INSTANCE_TYPE=${1:-g4dn.4xlarge} - ocp_aws_clone_worker_machineset "${INSTANCE_TYPE}" + ocp_aws_machineset_clone_worker "${INSTANCE_TYPE}" MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) @@ -67,10 +67,10 @@ ocp_aws_create_gpu_machineset(){ --type=merge --patch '{"spec":{"template":{"spec":{"providerSpec":{"value":{"instanceType":"'"${INSTANCE_TYPE}"'"}}}}}}' } -ocp_aws_clone_worker_machineset(){ +ocp_aws_machineset_clone_worker(){ [ -z "${1}" ] && \ echo " - usage: ocp_aws_clone_worker_machineset < instance type, default g4dn.4xlarge > < machine set name > + usage: ocp_aws_machineset_clone_worker < instance type, default g4dn.4xlarge > < machine set name > " INSTANCE_TYPE=${1:-g4dn.4xlarge} @@ -105,7 +105,7 @@ ocp_aws_clone_worker_machineset(){ --type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"node-role.kubernetes.io/'"${SHORT_NAME}"'":""}}}}}}' } -ocp_aws_taint_gpu_machineset(){ +ocp_aws_machineset_taint_gpu(){ INSTANCE_TYPE=${1:-g4dn.4xlarge} MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) @@ -117,7 +117,7 @@ ocp_aws_taint_gpu_machineset(){ --type=merge --patch '{"spec":{"template":{"spec":{"taints":[{"key":"nvidia.com/gpu","value":"","effect":"NoSchedule"}]}}}}' } -ocp_create_machineset_autoscale(){ +ocp_machineset_create_autoscale(){ MACHINE_MIN=${1:-0} MACHINE_MAX=${2:-4} MACHINE_SETS=${3:-$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | sed 's@.*/@@' )} diff --git a/components/operators/odf-operator/components/aws-odf-machineset/ocp.sh b/components/operators/odf-operator/components/aws-odf-machineset/ocp.sh index 1187af82..602c9870 100644 --- a/components/operators/odf-operator/components/aws-odf-machineset/ocp.sh +++ b/components/operators/odf-operator/components/aws-odf-machineset/ocp.sh @@ -9,10 +9,10 @@ ocp_aws_cluster(){ echo "AWS cluster detected" } -ocp_aws_clone_worker_machineset(){ +ocp_aws_machineset_clone_worker(){ [ -z "${1}" ] && \ echo " - usage: ocp_aws_clone_worker_machineset < instance type, default g4dn.4xlarge > < machine set name > + usage: ocp_aws_machineset_clone_worker < instance type, default g4dn.4xlarge > < machine set name > " INSTANCE_TYPE=${1:-g4dn.4xlarge} @@ -47,7 +47,7 @@ ocp_aws_create_odf_machineset(){ INSTANCE_TYPE=${1:-m6a.2xlarge} SHORT_NAME=${2:-odf-infra} - ocp_aws_clone_worker_machineset "${INSTANCE_TYPE}" "${SHORT_NAME}" + ocp_aws_machineset_clone_worker "${INSTANCE_TYPE}" "${SHORT_NAME}" MACHINE_SET_NAME=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${SHORT_NAME}" | head -n1) diff --git a/components/operators/sandboxed-containers-operator/instance/base/aws/job.yaml b/components/operators/sandboxed-containers-operator/instance/base/aws/job.yaml index 84441ba7..bdfbfbbb 100644 --- a/components/operators/sandboxed-containers-operator/instance/base/aws/job.yaml +++ b/components/operators/sandboxed-containers-operator/instance/base/aws/job.yaml @@ -112,7 +112,7 @@ spec: --type=merge --patch '{"spec":{"template":{"spec":{"providerSpec":{"value":{"instanceType":"'"${INSTANCE_TYPE}"'"}}}}}}' } - ocp_create_machineset_autoscale(){ + ocp_machineset_create_autoscale(){ MACHINE_MIN=${1:-0} MACHINE_MAX=${2:-4} MACHINE_SETS=${3:-$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | sed 's@.*/@@' )} diff --git a/demos/components/branding/kustomization.yaml b/demos/components/branding/kustomization.yaml index fcb6f9ae..0946246a 100644 --- a/demos/components/branding/kustomization.yaml +++ b/demos/components/branding/kustomization.yaml @@ -1,6 +1,14 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component +commonAnnotations: + source: https://github.com/redhat-na-ssa/demo-ai-catalog.git + +labels: +- includeSelectors: false + pairs: + demo: catalog + resources: - banner-demo.yaml - link-github.yaml diff --git a/scripts/library/nvidia.sh b/scripts/library/nvidia.sh index 29b28014..568abeb7 100644 --- a/scripts/library/nvidia.sh +++ b/scripts/library/nvidia.sh @@ -72,7 +72,7 @@ nvidia_setup_mig_config(){ MIG_CONFIG=${2:-all-1g.5gb} INSTANCE_TYPE=p4d.24xlarge - ocp_aws_create_gpu_machineset "${INSTANCE_TYPE}" + ocp_aws_machineset_create_gpu "${INSTANCE_TYPE}" oc apply -k "${GIT_ROOT}"/components/operators/gpu-operator-certified/instance/overlays/mig-"${MIG_MODE}" diff --git a/scripts/library/ocp.sh b/scripts/library/ocp.sh index 42ec089d..15365492 100644 --- a/scripts/library/ocp.sh +++ b/scripts/library/ocp.sh @@ -118,10 +118,10 @@ ocp_aws_setup_ack_system(){ done } -ocp_aws_clone_worker_machineset(){ +ocp_aws_machineset_clone_worker(){ [ -z "${1}" ] && \ echo " - usage: ocp_aws_clone_worker_machineset < instance type, default g4dn.4xlarge > < machine set name > + usage: ocp_aws_machineset_clone_worker < instance type, default g4dn.4xlarge > < machine set name > " INSTANCE_TYPE=${1:-g4dn.4xlarge} @@ -159,11 +159,23 @@ ocp_aws_clone_worker_machineset(){ --type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"node-role.kubernetes.io/'"${SHORT_NAME}"'":""}}}}}}' } +ocp_aws_machineset_fix_storage(){ + MACHINE_SETS=${1:-$(oc -n openshift-machine-api get machineset -o name)} + HD_SIZE=200 + + echo "Patching storage for machineset: ${SHORT_NAME}" + oc -n openshift-machine-api \ + get "${MACHINE_SET_WORKER}" -o yaml | \ + sed 's/volumeSize: 100/volumeSize: '"${HD_SIZE}"'/ + s/volumeType: gp2/volumeType: gp3/' | \ + oc apply -f - + fi + ocp_aws_create_odf_machineset(){ INSTANCE_TYPE=${1:-m6a.2xlarge} SHORT_NAME=${2:-odf-infra} - ocp_aws_clone_worker_machineset "${INSTANCE_TYPE}" "${SHORT_NAME}" + ocp_aws_machineset_clone_worker "${INSTANCE_TYPE}" "${SHORT_NAME}" MACHINE_SET_NAME=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${SHORT_NAME}" | head -n1) @@ -209,14 +221,14 @@ YAML } -ocp_aws_create_metal_machineset(){ +ocp_aws_machineset_create_metal(){ # https://aws.amazon.com/ec2/instance-types/m5zn # m5.metal # m5n.metal INSTANCE_TYPE=${1:-m5n.metal} - ocp_aws_clone_worker_machineset "${INSTANCE_TYPE}" + ocp_aws_machineset_clone_worker "${INSTANCE_TYPE}" MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) @@ -232,7 +244,7 @@ ocp_aws_create_metal_machineset(){ --type=merge --patch '{"spec":{"template":{"spec":{"providerSpec":{"value":{"instanceType":"'"${INSTANCE_TYPE}"'"}}}}}}' } -ocp_aws_create_gpu_machineset(){ +ocp_aws_machineset_create_gpu(){ # https://aws.amazon.com/ec2/instance-types/g4 # single gpu: g4dn.{2,4,8,16}xlarge # multi gpu: g4dn.12xlarge @@ -245,7 +257,7 @@ ocp_aws_create_gpu_machineset(){ INSTANCE_TYPE=${1:-g4dn.4xlarge} - ocp_aws_clone_worker_machineset "${INSTANCE_TYPE}" + ocp_aws_machineset_clone_worker "${INSTANCE_TYPE}" MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) @@ -293,19 +305,19 @@ ocp_aws_create_gpu_machineset(){ # --type=merge --patch "$(cat /tmp/patch.yaml)" } -ocp_aws_taint_gpu_machineset(){ - INSTANCE_TYPE=${1:-g4dn.4xlarge} - MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) +ocp_machineset_taint_gpu(){ + SHORT_NAME=${1:-g4dn} + MACHINE_SET=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) - echo "Patching: ${MACHINE_SET_TYPE}" + echo "Patching: ${MACHINE_SET}" # taint nodes for gpu-only workloads oc -n openshift-machine-api \ - patch "${MACHINE_SET_TYPE}" \ + patch "${MACHINE_SET}" \ --type=merge --patch '{"spec":{"template":{"spec":{"taints":[{"key":"nvidia.com/gpu","value":"","effect":"NoSchedule"}]}}}}' } -ocp_create_machineset_autoscale(){ +ocp_machineset_create_autoscale(){ MACHINE_MIN=${1:-0} MACHINE_MAX=${2:-4} MACHINE_SETS=${3:-$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | sed 's@.*/@@' )} @@ -332,17 +344,17 @@ YAML ocp_aws_cluster_autoscaling(){ oc apply -k https://github.com/redhat-na-ssa/demo-ai-gitops-catalog/components/cluster-configs/autoscale/overlays/gpus - ocp_aws_create_gpu_machineset g4dn.4xlarge - ocp_create_machineset_autoscale 0 3 + ocp_aws_machineset_create_gpu g4dn.4xlarge + ocp_machineset_create_autoscale 0 3 # scale workers to 1 WORKER_MS="$(oc -n openshift-machine-api get machineset -o name | grep worker | head -n1)" - ocp_scale_machineset 1 "${WORKER_MS}" + ocp_machineset_scale 1 "${WORKER_MS}" ocp_control_nodes_schedulable } -ocp_scale_machineset(){ +ocp_machineset_scale(){ REPLICAS=${1:-1} MACHINE_SETS=${2:-$(oc -n openshift-machine-api get machineset -o name)} @@ -379,7 +391,7 @@ ocp_save_money(){ ocp_control_nodes_schedulable # scale to zero - ocp_scale_machineset 0 + ocp_machineset_scale 0 # place as many pods on as few nodes as possible ocp_set_scheduler_profile HighNodeUtilization @@ -453,7 +465,7 @@ ocp_gpu_untaint_nodes(){ oc adm taint node -l node-role.kubernetes.io/gpu nvidia.com/gpu=:NoSchedule- } -ocp_gpu_label_nodes_from_nfd(){ +ocp_gpu_pretty_label(){ oc label node -l nvidia.com/gpu.machine node-role.kubernetes.io/gpu='' } diff --git a/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml b/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml index 991f3eef..5357fa5e 100644 --- a/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml +++ b/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml @@ -60,5 +60,5 @@ patches: # . /scripts/ocp.sh # ocp_aws_cluster || exit 0 - # ocp_aws_create_gpu_machineset g5.2xlarge - # ocp_create_machineset_autoscale + # ocp_aws_machineset_create_gpu g5.2xlarge + # ocp_machineset_create_autoscale From 29f59e8ff51e98ad038869ab751e6be35a7158c4 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 15:32:33 -0500 Subject: [PATCH 20/28] fix: linting --- .wordlist-sh | 1 + .../instance/components/aws-gpu-machineset/job.sh | 3 ++- demos/components/rhoai-prereqs/kustomization.yaml | 2 +- scripts/library/ocp.sh | 15 +++++++++------ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.wordlist-sh b/.wordlist-sh index 906cb2b1..a51a88ee 100644 --- a/.wordlist-sh +++ b/.wordlist-sh @@ -120,6 +120,7 @@ HighNodeUtilization HOSTNAME hou httpd +ic iid ingresscontrollers initalize diff --git a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh index a5b74313..e0413a94 100755 --- a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh +++ b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/job.sh @@ -8,4 +8,5 @@ INSTANCE_TYPE=${INSTANCE_TYPE:-g4dn.4xlarge} ocp_aws_cluster || exit 0 ocp_aws_machineset_create_gpu "${INSTANCE_TYPE}" ocp_machineset_create_autoscale -# ocp_aws_machineset_taint_gpu +ocp_aws_machineset_fix_storage +# ocp_machineset_taint_gpu diff --git a/demos/components/rhoai-prereqs/kustomization.yaml b/demos/components/rhoai-prereqs/kustomization.yaml index e7feff51..be5962e3 100644 --- a/demos/components/rhoai-prereqs/kustomization.yaml +++ b/demos/components/rhoai-prereqs/kustomization.yaml @@ -5,4 +5,4 @@ resources: - ../../../components/operators/authorino-operator/operator/overlays/tech-preview-v1 - ../../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest - ../../../components/operators/serverless-operator/operator/overlays/stable - - ../../../components/operators/servicemeshoperator/operator/overlays/stable \ No newline at end of file + - ../../../components/operators/servicemeshoperator/operator/overlays/stable diff --git a/scripts/library/ocp.sh b/scripts/library/ocp.sh index 15365492..94077b94 100644 --- a/scripts/library/ocp.sh +++ b/scripts/library/ocp.sh @@ -126,7 +126,6 @@ ocp_aws_machineset_clone_worker(){ INSTANCE_TYPE=${1:-g4dn.4xlarge} SHORT_NAME=${2:-${INSTANCE_TYPE/./-}} - HD_SIZE=200 MACHINE_SET_NAME=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${SHORT_NAME}" | head -n1) MACHINE_SET_WORKER=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep worker | head -n1) @@ -142,8 +141,6 @@ ocp_aws_machineset_clone_worker(){ /^ name:/ s/'"${MACHINE_SET_WORKER##*/}"'/'"${SHORT_NAME}"'/g /name/ s/'"${MACHINE_SET_WORKER##*/}"'/'"${SHORT_NAME}"'/g s/instanceType.*/instanceType: '"${INSTANCE_TYPE}"'/ - s/volumeSize: 100/volumeSize: '"${HD_SIZE}"'/ - s/volumeType: gp2/volumeType: gp3/ /cluster-api-autoscaler/d /uid:/d /generation:/d @@ -153,6 +150,9 @@ ocp_aws_machineset_clone_worker(){ oc apply -f - fi + # fix aws storage + ocp_aws_machineset_fix_storage "${MACHINE_SET_NAME}" + # cosmetic pretty oc -n openshift-machine-api \ patch "${MACHINE_SET_NAME}" \ @@ -163,13 +163,16 @@ ocp_aws_machineset_fix_storage(){ MACHINE_SETS=${1:-$(oc -n openshift-machine-api get machineset -o name)} HD_SIZE=200 - echo "Patching storage for machineset: ${SHORT_NAME}" + for machine_set in ${MACHINE_SETS} + do + echo "Patching aws storage for machineset: ${machine_set}" oc -n openshift-machine-api \ - get "${MACHINE_SET_WORKER}" -o yaml | \ + get "${machine_set}" -o yaml | \ sed 's/volumeSize: 100/volumeSize: '"${HD_SIZE}"'/ s/volumeType: gp2/volumeType: gp3/' | \ oc apply -f - - fi + done +} ocp_aws_create_odf_machineset(){ INSTANCE_TYPE=${1:-m6a.2xlarge} From 966490653c91601f861fbe6c8e123ac8acc4159a Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 15:32:45 -0500 Subject: [PATCH 21/28] fix: linting --- scripts/library/ocp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/library/ocp.sh b/scripts/library/ocp.sh index 94077b94..d17fc758 100644 --- a/scripts/library/ocp.sh +++ b/scripts/library/ocp.sh @@ -310,7 +310,7 @@ ocp_aws_machineset_create_gpu(){ ocp_machineset_taint_gpu(){ SHORT_NAME=${1:-g4dn} - MACHINE_SET=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) + MACHINE_SET=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${SHORT_NAME}" | head -n1) echo "Patching: ${MACHINE_SET}" From 8b09881ab90df92b712d2b001bbd0169e1bc7923 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 15:34:07 -0500 Subject: [PATCH 22/28] fix: linting --- .../components/aws-gpu-machineset/ocp.sh | 63 +++++++++++++++---- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh index 2b4621e8..1e83b5e9 100644 --- a/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh +++ b/components/operators/gpu-operator-certified/instance/components/aws-gpu-machineset/ocp.sh @@ -6,8 +6,9 @@ # ocp_aws_cluster # ocp_aws_machineset_create_gpu # ocp_aws_machineset_clone_worker -# ocp_aws_machineset_taint_gpu +# ocp_aws_machineset_fix_storage # ocp_machineset_create_autoscale +# ocp_machineset_taint_gpu # ' # for function in ${FUNCTIONS} @@ -47,7 +48,7 @@ ocp_aws_machineset_create_gpu(){ oc -n openshift-machine-api \ patch "${MACHINE_SET_TYPE}" \ --type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"node-role.kubernetes.io/gpu":""}}}}}}' - + # should use the default profile # oc -n openshift-machine-api \ # patch "${MACHINE_SET_TYPE}" \ @@ -57,14 +58,32 @@ ocp_aws_machineset_create_gpu(){ oc -n openshift-machine-api \ patch "${MACHINE_SET_TYPE}" \ --type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"cluster-api/accelerator":"nvidia-gpu"}}}}}}' - + oc -n openshift-machine-api \ patch "${MACHINE_SET_TYPE}" \ --type=merge --patch '{"metadata":{"labels":{"cluster-api/accelerator":"nvidia-gpu"}}}' - + oc -n openshift-machine-api \ patch "${MACHINE_SET_TYPE}" \ --type=merge --patch '{"spec":{"template":{"spec":{"providerSpec":{"value":{"instanceType":"'"${INSTANCE_TYPE}"'"}}}}}}' + +# # fix storage + +# cat << YAML > /tmp/patch.yaml +# spec: +# template: +# spec: +# providerSpec: +# value: +# blockDevices: +# - ebs: +# volumeSize: 120 +# volumeType: gp3 +# YAML + +# oc -n openshift-machine-api \ +# patch "${MACHINE_SET_TYPE}" \ +# --type=merge --patch "$(cat /tmp/patch.yaml)" } ocp_aws_machineset_clone_worker(){ @@ -99,22 +118,28 @@ ocp_aws_machineset_clone_worker(){ oc apply -f - fi + # fix aws storage + ocp_aws_machineset_fix_storage "${MACHINE_SET_NAME}" + # cosmetic pretty oc -n openshift-machine-api \ patch "${MACHINE_SET_NAME}" \ --type=merge --patch '{"spec":{"template":{"spec":{"metadata":{"labels":{"node-role.kubernetes.io/'"${SHORT_NAME}"'":""}}}}}}' } -ocp_aws_machineset_taint_gpu(){ - INSTANCE_TYPE=${1:-g4dn.4xlarge} - MACHINE_SET_TYPE=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${INSTANCE_TYPE%.*}" | head -n1) +ocp_aws_machineset_fix_storage(){ + MACHINE_SETS=${1:-$(oc -n openshift-machine-api get machineset -o name)} + HD_SIZE=200 - echo "Patching: ${MACHINE_SET_TYPE}" - - # taint nodes for gpu-only workloads - oc -n openshift-machine-api \ - patch "${MACHINE_SET_TYPE}" \ - --type=merge --patch '{"spec":{"template":{"spec":{"taints":[{"key":"nvidia.com/gpu","value":"","effect":"NoSchedule"}]}}}}' + for machine_set in ${MACHINE_SETS} + do + echo "Patching aws storage for machineset: ${machine_set}" + oc -n openshift-machine-api \ + get "${machine_set}" -o yaml | \ + sed 's/volumeSize: 100/volumeSize: '"${HD_SIZE}"'/ + s/volumeType: gp2/volumeType: gp3/' | \ + oc apply -f - + done } ocp_machineset_create_autoscale(){ @@ -140,3 +165,15 @@ spec: YAML done } + +ocp_machineset_taint_gpu(){ + SHORT_NAME=${1:-g4dn} + MACHINE_SET=$(oc -n openshift-machine-api get machinesets.machine.openshift.io -o name | grep "${SHORT_NAME}" | head -n1) + + echo "Patching: ${MACHINE_SET}" + + # taint nodes for gpu-only workloads + oc -n openshift-machine-api \ + patch "${MACHINE_SET}" \ + --type=merge --patch '{"spec":{"template":{"spec":{"taints":[{"key":"nvidia.com/gpu","value":"","effect":"NoSchedule"}]}}}}' +} From c714dd7a6b00c59e44c84a805b533331b534d20b Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 15:41:15 -0500 Subject: [PATCH 23/28] cleaning --- .../console-config/overlays/default/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cluster-configs/console-config/overlays/default/kustomization.yaml b/components/cluster-configs/console-config/overlays/default/kustomization.yaml index d123dcf2..0dedfaf4 100644 --- a/components/cluster-configs/console-config/overlays/default/kustomization.yaml +++ b/components/cluster-configs/console-config/overlays/default/kustomization.yaml @@ -15,4 +15,4 @@ patches: patch: |- - op: replace path: /spec/text - value: 'This cluster was deployed via the AI GitOps catalog' + value: 'This cluster was configured via the AI GitOps catalog' From 99784fe68df7bc553ab1930e2fd27d3df7b9d9e1 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 16:30:17 -0500 Subject: [PATCH 24/28] fix: job --- .../instance/components/wait-for-servicemesh/job.sh | 11 ++++++++--- .../instance/components/wait-for-servicemesh/job.yaml | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh b/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh index ef6eec3b..855cbf1d 100755 --- a/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh +++ b/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.sh @@ -7,8 +7,13 @@ patch_approval(){ APPROVAL=${1:-Automatic} oc -n redhat-ods-operator \ - patch subscription rhods-operator \ - --type=merge --patch '{"spec":{"installPlanApproval":"'"${APPROVAL}"'"}}' + patch subscription rhods-operator \ + --type=merge --patch '{"spec":{"installPlanApproval":"'"${APPROVAL}"'"}}' + + INSTALL_PLAN=$(oc -n redhat-ods-operator get installplan -l operators.coreos.com/rhods-operator.redhat-ods-operator -o name) + oc -n redhat-ods-operator \ + patch "${INSTALL_PLAN}" \ + --type=merge --patch '{"spec":{"approved":true}}' } wait_for_service_mesh(){ @@ -30,8 +35,8 @@ SERVICEMESH_RESOURCES=( patch_approval Manual oc wait --for="${CONDITION}" "${RESOURCE}" --timeout="${TIMEOUT_SECONDS}s" - patch_approval Automatic done } wait_for_service_mesh +patch_approval diff --git a/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.yaml b/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.yaml index 6b523779..e4467e62 100644 --- a/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.yaml +++ b/components/operators/rhods-operator/instance/components/wait-for-servicemesh/job.yaml @@ -25,6 +25,7 @@ rules: - operators.coreos.com resources: - subscriptions + - installplans verbs: - get - list From d8f94d70a569ceae7eae1c04a2699df0afaf60b1 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 17:53:44 -0500 Subject: [PATCH 25/28] fix: rhoai --- .../components/fix-dashboard-bugs/job.sh | 37 +++++++++---------- .../components/fix-dashboard-bugs/job.yaml | 19 ++++++---- .../fix-dashboard-bugs/kustomization.yaml | 2 +- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh index 720f0f45..8b45372b 100755 --- a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh @@ -1,30 +1,27 @@ #!/usr/bin/bash -set -e +set -ex TIMEOUT_SECONDS=60 -fix_dashboard_bugs(){ - echo "" - -SERVERLESS_RESOURCES=( - crd/serverlessservices.networking.internal.knative.dev:condition=established \ - ) - - for crd in "${SERVERLESS_RESOURCES[@]}" - do - RESOURCE=$(echo "$crd" | cut -d ":" -f 1) - CONDITION=$(echo "$crd" | cut -d ":" -f 2) - - echo "Waiting for ${RESOURCE} state to be ${CONDITION}..." - oc wait --for="${CONDITION}" "${RESOURCE}" --timeout="${TIMEOUT_SECONDS}s" - done -} - restart_pods(){ - oc -n redhat-ods-operator \ + oc -n redhat-ods-applications \ delete pods \ -l deployment=rhods-dashboard } +fix_dashboard_bugs(){ + sleep "${TIMEOUT_SECONDS}" + restart_pods +} + +scale_down_dashboard_madness(){ + oc -n redhat-ods-applications \ + get deployment \ + + oc -n redhat-ods-applications \ + scale deployment/rhods-dashboard \ + --replicas=2 +} + +scale_down_dashboard_madness fix_dashboard_bugs -restart_pods \ No newline at end of file diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml index 944680eb..e05ebfa7 100644 --- a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: fix-dashboard-bugs - namespace: redhat-ods-operator + namespace: redhat-ods-applications annotations: argocd.argoproj.io/hook: PreSync --- @@ -11,17 +11,20 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: fix-dashboard-bugs - namespace: redhat-ods-operator + namespace: redhat-ods-applications annotations: argocd.argoproj.io/hook: PreSync rules: - apiGroups: - - apiextensions.k8s.io + - apps resources: - - customresourcedefinitions + - deployments + - deployments/scale verbs: - - get + # - get - list + - patch + # - update - apiGroups: - '' resources: @@ -40,17 +43,17 @@ metadata: subjects: - kind: ServiceAccount name: fix-dashboard-bugs - namespace: redhat-ods-operator + namespace: redhat-ods-applications roleRef: apiGroup: rbac.authorization.k8s.io - kind: ClusterRole + kind: Role name: fix-dashboard-bugs --- apiVersion: batch/v1 kind: Job metadata: name: fix-dashboard-bugs - namespace: redhat-ods-operator + namespace: redhat-ods-applications annotations: argocd.argoproj.io/hook: PreSync argocd.argoproj.io/sync-wave: "11" diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml index 8ce4645b..ac65e2ee 100644 --- a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/kustomization.yaml @@ -11,6 +11,6 @@ generatorOptions: configMapGenerator: - name: fix-dashboard-bugs - namespace: redhat-ods-operator + namespace: redhat-ods-applications files: - job.sh From b6d96d4bed0920cab0697bb4f532719e29bf2055 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 30 Oct 2024 18:02:21 -0500 Subject: [PATCH 26/28] fix: rhods --- .../instance/components/fix-dashboard-bugs/job.sh | 5 +---- .../instance/components/fix-dashboard-bugs/job.yaml | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh index 8b45372b..6f084544 100755 --- a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.sh @@ -1,5 +1,5 @@ #!/usr/bin/bash -set -ex +set -e TIMEOUT_SECONDS=60 @@ -15,9 +15,6 @@ fix_dashboard_bugs(){ } scale_down_dashboard_madness(){ - oc -n redhat-ods-applications \ - get deployment \ - oc -n redhat-ods-applications \ scale deployment/rhods-dashboard \ --replicas=2 diff --git a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml index e05ebfa7..46c791d0 100644 --- a/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml +++ b/components/operators/rhods-operator/instance/components/fix-dashboard-bugs/job.yaml @@ -21,10 +21,11 @@ rules: - deployments - deployments/scale verbs: - # - get + - get - list - patch - # - update + resourceNames: + - rhods-dashboard - apiGroups: - '' resources: From b1bac743bbee66c70d62c5a0c0fdd1bd1d70a300 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Thu, 31 Oct 2024 07:39:07 -0500 Subject: [PATCH 27/28] cleanup --- clusters/default/kustomization.yaml | 14 +++++++++----- .../autoscale/base/kustomization.yaml | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/clusters/default/kustomization.yaml b/clusters/default/kustomization.yaml index 45a7fb28..ddfcc4f9 100644 --- a/clusters/default/kustomization.yaml +++ b/clusters/default/kustomization.yaml @@ -2,13 +2,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- ../../components/operators/web-terminal/operator/overlays/fast -- ../../components/operators/web-terminal/instance/overlays/enhanced +- ../../components/app-configs/ubi-images/overlays/cluster - ../../components/cluster-configs/autoscale/overlays/default -# - ../../components/cluster-configs/etcd-backup/overlays/default -# - ../../components/cluster-configs/namespace-cleanup/overlays/sandbox - ../../components/cluster-configs/console-config/overlays/default - ../../components/cluster-configs/console-samples + +# - ../../components/cluster-configs/etcd-backup/overlays/default +# - ../../components/cluster-configs/namespace-cleanup/overlays/sandbox + - ../../components/cluster-configs/namespaces/overlays/default - ../../components/cluster-configs/rbac/overlays/no-self-provisioner -- ../../components/app-configs/ubi-images/overlays/cluster + +- ../../components/operators/web-terminal/operator/overlays/fast +- ../../components/operators/web-terminal/instance/overlays/enhanced + diff --git a/components/cluster-configs/autoscale/base/kustomization.yaml b/components/cluster-configs/autoscale/base/kustomization.yaml index 4dc137ec..03f68f19 100644 --- a/components/cluster-configs/autoscale/base/kustomization.yaml +++ b/components/cluster-configs/autoscale/base/kustomization.yaml @@ -21,4 +21,4 @@ configMapGenerator: - job.sh # - ../../../../../../scripts/library/ocp.sh # kludge: refer to source - - https://raw.githubusercontent.com/redhat-na-ssa/demo-ai-gitops-catalog/main/scripts/library/ocp.sh + - https://raw.githubusercontent.com/redhat-na-ssa/demo-ai-gitops-catalog/v0.08/scripts/library/ocp.sh From 15a09e83338bc1c366c0369f4b70bcce364e55f0 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Thu, 31 Oct 2024 07:40:27 -0500 Subject: [PATCH 28/28] cleanup --- clusters/default/kustomization.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/clusters/default/kustomization.yaml b/clusters/default/kustomization.yaml index ddfcc4f9..7f0469bc 100644 --- a/clusters/default/kustomization.yaml +++ b/clusters/default/kustomization.yaml @@ -15,4 +15,3 @@ resources: - ../../components/operators/web-terminal/operator/overlays/fast - ../../components/operators/web-terminal/instance/overlays/enhanced -