From f91da68107e186ed4ee4cf4459c32d3e676c1bbf Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Tue, 26 Nov 2024 15:15:19 -0600 Subject: [PATCH] update: image puller --- .../app-configs/image-puller/base/ds.yaml | 8 ++--- .../image-puller/base/kustomization.yaml | 6 ++-- .../default => example}/kustomization.yaml | 6 +++- .../{overlays => }/example/namespace.yaml | 0 .../example/ray-image/kustomization.yaml | 17 +++++++++++ .../example/tf-image/kustomization.yaml | 17 +++++++++++ .../overlays/example/kustomization.yaml | 29 ------------------- 7 files changed, 45 insertions(+), 38 deletions(-) rename components/app-configs/image-puller/{overlays/default => example}/kustomization.yaml (51%) rename components/app-configs/image-puller/{overlays => }/example/namespace.yaml (100%) create mode 100644 components/app-configs/image-puller/example/ray-image/kustomization.yaml create mode 100644 components/app-configs/image-puller/example/tf-image/kustomization.yaml delete mode 100644 components/app-configs/image-puller/overlays/example/kustomization.yaml diff --git a/components/app-configs/image-puller/base/ds.yaml b/components/app-configs/image-puller/base/ds.yaml index 6a3a0e4f..97594c2d 100644 --- a/components/app-configs/image-puller/base/ds.yaml +++ b/components/app-configs/image-puller/base/ds.yaml @@ -1,9 +1,7 @@ ---- apiVersion: apps/v1 kind: DaemonSet metadata: name: image-puller - namespace: openshift-config spec: selector: matchLabels: @@ -14,12 +12,12 @@ spec: name: image-puller spec: containers: - - name: tools - imagePullPolicy: Always - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + - name: manchurian command: - sleep - '3600' + imagePullPolicy: Always + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest resources: limits: memory: 20Mi diff --git a/components/app-configs/image-puller/base/kustomization.yaml b/components/app-configs/image-puller/base/kustomization.yaml index 8c9a8cf1..12fc8eb6 100644 --- a/components/app-configs/image-puller/base/kustomization.yaml +++ b/components/app-configs/image-puller/base/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: -- ds.yaml + - ds.yaml diff --git a/components/app-configs/image-puller/overlays/default/kustomization.yaml b/components/app-configs/image-puller/example/kustomization.yaml similarity index 51% rename from components/app-configs/image-puller/overlays/default/kustomization.yaml rename to components/app-configs/image-puller/example/kustomization.yaml index 2b87e6b1..bee0efd4 100644 --- a/components/app-configs/image-puller/overlays/default/kustomization.yaml +++ b/components/app-configs/image-puller/example/kustomization.yaml @@ -1,5 +1,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: image-puller + resources: -- ../../base + - namespace.yaml + - ray-image + - tf-image diff --git a/components/app-configs/image-puller/overlays/example/namespace.yaml b/components/app-configs/image-puller/example/namespace.yaml similarity index 100% rename from components/app-configs/image-puller/overlays/example/namespace.yaml rename to components/app-configs/image-puller/example/namespace.yaml diff --git a/components/app-configs/image-puller/example/ray-image/kustomization.yaml b/components/app-configs/image-puller/example/ray-image/kustomization.yaml new file mode 100644 index 00000000..57a263b0 --- /dev/null +++ b/components/app-configs/image-puller/example/ray-image/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../components/image-puller + +patches: + - target: + kind: DaemonSet + name: image-puller + patch: |- + - op: replace + path: /metadata/name + value: ray-puller + - op: replace + path: /spec/template/spec/containers/0/image + value: quay.io/modh/ray:2.35.0-py39-cu121 diff --git a/components/app-configs/image-puller/example/tf-image/kustomization.yaml b/components/app-configs/image-puller/example/tf-image/kustomization.yaml new file mode 100644 index 00000000..fcc5e354 --- /dev/null +++ b/components/app-configs/image-puller/example/tf-image/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../../components/image-puller + +patches: + - target: + kind: DaemonSet + name: image-puller + patch: |- + - op: replace + path: /metadata/name + value: tf-puller + - op: replace + path: /spec/template/spec/containers/0/image + value: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/tensorflow:2024.1 diff --git a/components/app-configs/image-puller/overlays/example/kustomization.yaml b/components/app-configs/image-puller/overlays/example/kustomization.yaml deleted file mode 100644 index e16d8779..00000000 --- a/components/app-configs/image-puller/overlays/example/kustomization.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: image-puller - -resources: -- ../../base -- namespace.yaml - -patches: - - target: - group: apps - kind: DaemonSet - name: image-puller - patch: |- - - op: add - path: /spec/template/spec/containers - value: - - name: large-app - image: 'quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-app:2.1.2' - command: - - sleep - - infinity - resources: - limits: - memory: 20Mi - requests: - cpu: 10m - memory: 10Mi