Skip to content

Commit 4b38803

Browse files
committed
RHOAIENG-11679: kustomize 5 warnings removal
This updates our manifests to get rid of the following kustomize 5 warnings: ``` Warning: 'vars' is deprecated. Please use 'replacements' instead. [EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically. Warning: 'commonLabels' is deprecated. Please use 'labels' instead. Run 'kustomize edit fix' to update your Kustomization automatically ``` The first warning is printed by kustomize 5.0.3. The second warning by kustomize 5.6.0. The resulting manifests are still valid to be used with the kustomize 5.0.3 version and the results match what was the generated output before this change. Following commands were used to ease the manual work: ``` kustomize edit fix kustomize edit fix --vars ``` With this update we don't need the commit.yaml and params.yaml files anymore as all is now defined in the kustomization.yaml directly. Also, I kept the original variable values with the additional `_PLACEHOLDER` suffix - reason for keeping the original value is to keep them easily searchable by grep, but truth is that the value doesn't really matter after this change. https://issues.redhat.com/browse/RHOAIENG-11679
1 parent a2d91e6 commit 4b38803

26 files changed

+628
-519
lines changed

ci/check-software-versions.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import json
1515
import logging
1616
import os
17-
import re
1817
import subprocess
1918
import sys
2019
import uuid
@@ -65,10 +64,9 @@ def load_yaml(filepath):
6564

6665

6766
def extract_variable(reference):
68-
"""Extracts a variable name from a string (e.g.: '$(odh-rstudio-notebook-image-commit-n-1)') using regex."""
67+
"""Extracts a variable name from a string (e.g.: 'odh-rstudio-notebook-image-commit-n-1_PLACEHOLDER') using regex."""
6968

70-
match = re.search(r"\((.*?)\)", reference)
71-
return match.group(1) if match else None
69+
return reference.replace("_PLACEHOLDER", "")
7270

7371

7472
def get_variable_value(variable_name, params_file_path=PARAMS_ENV_PATH):

ci/package_versions_selftestdata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
openshift.io/imported-from: quay.io/opendatahub/workbench-images
3131
opendatahub.io/workbench-image-recommended: 'true'
3232
opendatahub.io/default-image: "true"
33-
opendatahub.io/notebook-build-commit: $(odh-minimal-notebook-image-commit-n)
33+
opendatahub.io/notebook-build-commit: odh-minimal-notebook-image-commit-n_PLACEHOLDER
3434
from:
3535
kind: DockerImage
3636
name: $(odh-minimal-notebook-image-n)
@@ -53,7 +53,7 @@
5353
openshift.io/imported-from: quay.io/opendatahub/workbench-images
5454
opendatahub.io/workbench-image-recommended: 'false'
5555
opendatahub.io/default-image: "true"
56-
opendatahub.io/notebook-build-commit: $(odh-minimal-notebook-image-commit-n-1)
56+
opendatahub.io/notebook-build-commit: odh-minimal-notebook-image-commit-n-1_PLACEHOLDER
5757
from:
5858
kind: DockerImage
5959
name: $(odh-minimal-notebook-image-n-1)

jupyter/datascience/ubi9-python-3.11/kustomize/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
namePrefix: jupyter-datascience-ubi9-python-3-11-
5-
commonLabels:
6-
app: jupyter-datascience-ubi9-python-3-11
75
resources:
86
- service.yaml
97
- statefulset.yaml
108
images:
119
- name: quay.io/opendatahub/workbench-images
1210
newName: quay.io/opendatahub/workbench-images
1311
newTag: jupyter-datascience-ubi9-python-3.11
12+
labels:
13+
- includeSelectors: true
14+
pairs:
15+
app: jupyter-datascience-ubi9-python-3-11

jupyter/minimal/ubi9-python-3.11/kustomize/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
namePrefix: jupyter-minimal-ubi9-python-3-11-
5-
commonLabels:
6-
app: jupyter-minimal-ubi9-python-3-11
75
resources:
86
- service.yaml
97
- statefulset.yaml
108
images:
119
- name: quay.io/opendatahub/workbench-images
1210
newName: quay.io/opendatahub/workbench-images
1311
newTag: jupyter-minimal-ubi9-python-3.11
12+
labels:
13+
- includeSelectors: true
14+
pairs:
15+
app: jupyter-minimal-ubi9-python-3-11

jupyter/pytorch/ubi9-python-3.11/kustomize/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
namePrefix: jupyter-pytorch-ubi9-python-3-11-
5-
commonLabels:
6-
app: jupyter-pytorch-ubi9-python-3-11
75
resources:
86
- service.yaml
97
- statefulset.yaml
108
images:
119
- name: quay.io/opendatahub/workbench-images
1210
newName: quay.io/opendatahub/workbench-images
1311
newTag: jupyter-pytorch-ubi9-python-3.11
12+
labels:
13+
- includeSelectors: true
14+
pairs:
15+
app: jupyter-pytorch-ubi9-python-3-11

jupyter/pytorch/ubi9-python-3.11/kustomize/overlays/accelerator/cuda/kustomization.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
24
resources:
35
- ../../../base
46

jupyter/rocm/pytorch/ubi9-python-3.11/kustomize/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
namePrefix: jupyter-rocm-pytorch-ubi9-python-3-11-
5-
commonLabels:
6-
app: jupyter-rocm-pytorch-ubi9-python-3-11
75
resources:
86
- service.yaml
97
- statefulset.yaml
108
images:
119
- name: quay.io/opendatahub/workbench-images
1210
newName: quay.io/opendatahub/workbench-images
1311
newTag: rocm-jupyter-pytorch-ubi9-python-3.11
12+
labels:
13+
- includeSelectors: true
14+
pairs:
15+
app: jupyter-rocm-pytorch-ubi9-python-3-11

jupyter/rocm/tensorflow/ubi9-python-3.11/kustomize/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
namePrefix: jupyter-rocm-tensorflow-ubi9-python-3-11-
5-
commonLabels:
6-
app: jupyter-rocm-tensorflow-ubi9-python-3-11
75
resources:
86
- service.yaml
97
- statefulset.yaml
108
images:
119
- name: quay.io/opendatahub/workbench-images
1210
newName: quay.io/opendatahub/workbench-images
1311
newTag: jupyter-pytorch-ubi9-python-3.11-2023a-20231002-4e9bbb3
12+
labels:
13+
- includeSelectors: true
14+
pairs:
15+
app: jupyter-rocm-tensorflow-ubi9-python-3-11

jupyter/tensorflow/ubi9-python-3.11/kustomize/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
namePrefix: jupyter-tensorflow-ubi9-python-3-11-
5-
commonLabels:
6-
app: jupyter-tensorflow-ubi9-python-3-11
75
resources:
86
- service.yaml
97
- statefulset.yaml
108
images:
119
- name: quay.io/opendatahub/workbench-images
1210
newName: quay.io/opendatahub/workbench-images
1311
newTag: cuda-jupyter-tensorflow-ubi9-python-3.11
12+
labels:
13+
- includeSelectors: true
14+
pairs:
15+
app: jupyter-tensorflow-ubi9-python-3-11

jupyter/trustyai/ubi9-python-3.11/kustomize/base/kustomization.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
namePrefix: jupyter-trustyai-ubi9-python-3-11-
5-
commonLabels:
6-
app: jupyter-trustyai-ubi9-python-3-11
75
resources:
86
- service.yaml
97
- statefulset.yaml
108
images:
119
- name: quay.io/opendatahub/workbench-images
1210
newName: quay.io/opendatahub/workbench-images
1311
newTag: cuda-jupyter-trustyai-ubi9-python-3.11
12+
labels:
13+
- includeSelectors: true
14+
pairs:
15+
app: jupyter-trustyai-ubi9-python-3-11

0 commit comments

Comments
 (0)