From ea1824d67ff1d1c84dd33cfeea36d5cdd5e5eded Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Fri, 15 Nov 2024 12:19:46 +0100 Subject: [PATCH 1/3] Rename nodejs-application -> redhat-nodejs-application Rename nodejs-imagestreams -> redhat-nodejs-imagestreams The same charts are used in openshift-helm-charts/charts repository Signed-off-by: Petr "Stone" Hracek --- .../OWNERS | 0 .../src/Chart.yaml | 4 +-- .../src/templates/buildconfig.yaml | 0 .../src/templates/deployment.yaml | 0 .../src/templates/imagestream.yaml | 0 .../src/templates/route.yaml | 0 .../src/templates/service.yaml | 0 .../tests/test-nodejs-connection.yaml | 0 .../src/values.schema.json | 0 .../src/values.yaml | 0 .../OWNERS | 2 +- .../src/Chart.yaml | 8 ++--- .../src/templates/nodejs-imagestream.yaml | 35 +++++++++++++++++-- 13 files changed, 40 insertions(+), 9 deletions(-) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/OWNERS (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/Chart.yaml (94%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/templates/buildconfig.yaml (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/templates/deployment.yaml (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/templates/imagestream.yaml (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/templates/route.yaml (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/templates/service.yaml (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/templates/tests/test-nodejs-connection.yaml (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/values.schema.json (100%) rename charts/redhat/{nodejs-application => redhat-nodejs-application}/src/values.yaml (100%) rename charts/redhat/{nodejs-imagestreams => redhat-nodejs-imagestreams}/OWNERS (83%) rename charts/redhat/{nodejs-imagestreams => redhat-nodejs-imagestreams}/src/Chart.yaml (69%) rename charts/redhat/{nodejs-imagestreams => redhat-nodejs-imagestreams}/src/templates/nodejs-imagestream.yaml (81%) diff --git a/charts/redhat/nodejs-application/OWNERS b/charts/redhat/redhat-nodejs-application/OWNERS similarity index 100% rename from charts/redhat/nodejs-application/OWNERS rename to charts/redhat/redhat-nodejs-application/OWNERS diff --git a/charts/redhat/nodejs-application/src/Chart.yaml b/charts/redhat/redhat-nodejs-application/src/Chart.yaml similarity index 94% rename from charts/redhat/nodejs-application/src/Chart.yaml rename to charts/redhat/redhat-nodejs-application/src/Chart.yaml index dfe0624..8a3be3f 100644 --- a/charts/redhat/nodejs-application/src/Chart.yaml +++ b/charts/redhat/redhat-nodejs-application/src/Chart.yaml @@ -2,13 +2,13 @@ description: This content is experimental, do not use it in production. An examp about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md. name: nodejs-application tags: quickstart,nodejs -version: 0.0.2 +version: 0.0.3 kubeVersion: '>=1.20.0' annotations: charts.openshift.io/name: Red Hat Apache Rails application with no database (experimental) charts.openshift.io/provider: Red Hat charts.openshift.io/providerType: redhat apiVersion: v2 -appVersion: 0.0.2 +appVersion: 0.0.3 sources: - https://github.com/sclorg/helm-charts diff --git a/charts/redhat/nodejs-application/src/templates/buildconfig.yaml b/charts/redhat/redhat-nodejs-application/src/templates/buildconfig.yaml similarity index 100% rename from charts/redhat/nodejs-application/src/templates/buildconfig.yaml rename to charts/redhat/redhat-nodejs-application/src/templates/buildconfig.yaml diff --git a/charts/redhat/nodejs-application/src/templates/deployment.yaml b/charts/redhat/redhat-nodejs-application/src/templates/deployment.yaml similarity index 100% rename from charts/redhat/nodejs-application/src/templates/deployment.yaml rename to charts/redhat/redhat-nodejs-application/src/templates/deployment.yaml diff --git a/charts/redhat/nodejs-application/src/templates/imagestream.yaml b/charts/redhat/redhat-nodejs-application/src/templates/imagestream.yaml similarity index 100% rename from charts/redhat/nodejs-application/src/templates/imagestream.yaml rename to charts/redhat/redhat-nodejs-application/src/templates/imagestream.yaml diff --git a/charts/redhat/nodejs-application/src/templates/route.yaml b/charts/redhat/redhat-nodejs-application/src/templates/route.yaml similarity index 100% rename from charts/redhat/nodejs-application/src/templates/route.yaml rename to charts/redhat/redhat-nodejs-application/src/templates/route.yaml diff --git a/charts/redhat/nodejs-application/src/templates/service.yaml b/charts/redhat/redhat-nodejs-application/src/templates/service.yaml similarity index 100% rename from charts/redhat/nodejs-application/src/templates/service.yaml rename to charts/redhat/redhat-nodejs-application/src/templates/service.yaml diff --git a/charts/redhat/nodejs-application/src/templates/tests/test-nodejs-connection.yaml b/charts/redhat/redhat-nodejs-application/src/templates/tests/test-nodejs-connection.yaml similarity index 100% rename from charts/redhat/nodejs-application/src/templates/tests/test-nodejs-connection.yaml rename to charts/redhat/redhat-nodejs-application/src/templates/tests/test-nodejs-connection.yaml diff --git a/charts/redhat/nodejs-application/src/values.schema.json b/charts/redhat/redhat-nodejs-application/src/values.schema.json similarity index 100% rename from charts/redhat/nodejs-application/src/values.schema.json rename to charts/redhat/redhat-nodejs-application/src/values.schema.json diff --git a/charts/redhat/nodejs-application/src/values.yaml b/charts/redhat/redhat-nodejs-application/src/values.yaml similarity index 100% rename from charts/redhat/nodejs-application/src/values.yaml rename to charts/redhat/redhat-nodejs-application/src/values.yaml diff --git a/charts/redhat/nodejs-imagestreams/OWNERS b/charts/redhat/redhat-nodejs-imagestreams/OWNERS similarity index 83% rename from charts/redhat/nodejs-imagestreams/OWNERS rename to charts/redhat/redhat-nodejs-imagestreams/OWNERS index 48489bb..27a6eff 100644 --- a/charts/redhat/nodejs-imagestreams/OWNERS +++ b/charts/redhat/redhat-nodejs-imagestreams/OWNERS @@ -1,5 +1,5 @@ chart: - name: nodejs-imagestreams + name: redhat-nodejs-imagestreams description: This is the Red Hat NodeJS applications imagestream chart publicPgpKey: null users: diff --git a/charts/redhat/nodejs-imagestreams/src/Chart.yaml b/charts/redhat/redhat-nodejs-imagestreams/src/Chart.yaml similarity index 69% rename from charts/redhat/nodejs-imagestreams/src/Chart.yaml rename to charts/redhat/redhat-nodejs-imagestreams/src/Chart.yaml index 5aea9e7..099a67a 100644 --- a/charts/redhat/nodejs-imagestreams/src/Chart.yaml +++ b/charts/redhat/redhat-nodejs-imagestreams/src/Chart.yaml @@ -1,14 +1,14 @@ description: |- - This content is expermental, do not use it in production. Build and run NodeJS applications on UBI. + This content is experimental, do not use it in production. Build and run NodeJS applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/20/README.md. annotations: charts.openshift.io/name: Red Hat NodeJS applications on UBI (experimental) apiVersion: v2 -appVersion: 0.0.5 +appVersion: 0.0.6 kubeVersion: '>=1.20.0' -name: nodejs-imagestreams +name: redhat-nodejs-imagestreams tags: builder,nodejs sources: - https://github.com/sclorg/helm-charts -version: 0.0.5 +version: 0.0.6 diff --git a/charts/redhat/nodejs-imagestreams/src/templates/nodejs-imagestream.yaml b/charts/redhat/redhat-nodejs-imagestreams/src/templates/nodejs-imagestream.yaml similarity index 81% rename from charts/redhat/nodejs-imagestreams/src/templates/nodejs-imagestream.yaml rename to charts/redhat/redhat-nodejs-imagestreams/src/templates/nodejs-imagestream.yaml index 25915ce..1575266 100644 --- a/charts/redhat/nodejs-imagestreams/src/templates/nodejs-imagestream.yaml +++ b/charts/redhat/redhat-nodejs-imagestreams/src/templates/nodejs-imagestream.yaml @@ -12,7 +12,7 @@ spec: openshift.io/display-name: Node.js (Latest) openshift.io/provider-display-name: Red Hat, Inc. description: |- - Build and run Node.js applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/16/README.md. + Build and run Node.js applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/22/README.md. WARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major version updates. iconClass: icon-nodejs @@ -21,7 +21,22 @@ spec: sampleRepo: https://github.com/sclorg/nodejs-ex.git from: kind: ImageStreamTag - name: 20-ubi8 + name: 22-ubi9 + referencePolicy: + type: Local + - name: 22-ubi9 + annotations: + openshift.io/display-name: Node.js 22 (UBI 9) + openshift.io/provider-display-name: Red Hat, Inc. + description: Build and run Node.js 22 applications on UBI 9. For more information + about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/22/README.md. + iconClass: icon-nodejs + tags: builder,nodejs + version: '22' + sampleRepo: https://github.com/sclorg/nodejs-ex.git + from: + kind: DockerImage + name: registry.redhat.io/ubi9/nodejs-22:latest referencePolicy: type: Local - name: 20-ubi9 @@ -70,6 +85,22 @@ spec: name: registry.redhat.io/ubi9/nodejs-20-minimal:latest referencePolicy: type: Local + - name: 22-ubi9-minimal + annotations: + openshift.io/display-name: Node.js 22 (UBI 9 Minimal) + openshift.io/provider-display-name: Red Hat, Inc. + description: Build and run Node.js 22 applications on UBI 9 Minimal. For more + information about using this builder image, including OpenShift considerations, + see https://github.com/sclorg/s2i-nodejs-container/blob/master/22-minimal/README.md. + iconClass: icon-nodejs + tags: builder,nodejs + version: '22' + sampleRepo: https://github.com/sclorg/nodejs-ex.git + from: + kind: DockerImage + name: registry.redhat.io/ubi9/nodejs-22-minimal:latest + referencePolicy: + type: Local - name: 18-ubi9-minimal annotations: openshift.io/display-name: Node.js 18 (UBI 9 Minimal) From 8d74615f7e796d3b77b08204acc4a2dd7f0fde51 Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Fri, 15 Nov 2024 12:20:42 +0100 Subject: [PATCH 2/3] Add also released NodejS22 for RHEL9 Signed-off-by: Petr "Stone" Hracek --- .../src/values.schema.json | 2 +- .../redhat-nodejs-application/src/values.yaml | 2 +- tests/test_nodejs_application.py | 14 +++++++++----- tests/test_nodejs_imagestreams.py | 4 +++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/charts/redhat/redhat-nodejs-application/src/values.schema.json b/charts/redhat/redhat-nodejs-application/src/values.schema.json index 31ecebb..31a1d7d 100644 --- a/charts/redhat/redhat-nodejs-application/src/values.schema.json +++ b/charts/redhat/redhat-nodejs-application/src/values.schema.json @@ -13,7 +13,7 @@ "nodejs_version": { "type": "string", "description": "Version of NodeJS image to be used (18-ubi8, 20-ubi8, or latest).", - "enum": [ "latest", "18-ubi8", "20-ubi8", "18-ubi9", "20-ubi9" ] + "enum": [ "latest", "18-ubi8", "20-ubi8", "18-ubi9", "20-ubi9", "22-ubi9" ] }, "memory_limit": { "type": "string", diff --git a/charts/redhat/redhat-nodejs-application/src/values.yaml b/charts/redhat/redhat-nodejs-application/src/values.yaml index b9e0480..8b0ffbe 100644 --- a/charts/redhat/redhat-nodejs-application/src/values.yaml +++ b/charts/redhat/redhat-nodejs-application/src/values.yaml @@ -5,7 +5,7 @@ github_webhook_secret: "SOMETHING"# TODO: must define a default value for .githu memory_limit: 512Mi name: nodejs-example namespace: openshift -nodejs_version: 20-ubi8 +nodejs_version: 22-ubi9 npm_mirror: "" # TODO: must define a default value for .npm_mirror source_repository_ref: "master" # TODO: must define a default value for .source_repository_ref source_repository_url: https://github.com/sclorg/nodejs-ex.git diff --git a/tests/test_nodejs_application.py b/tests/test_nodejs_application.py index ea59419..18e9468 100644 --- a/tests/test_nodejs_application.py +++ b/tests/test_nodejs_application.py @@ -11,7 +11,7 @@ class TestHelmNodeJSApplication: def setup_method(self): - package_name = "nodejs-application" + package_name = "redhat-nodejs-application" path = test_dir / "../charts/redhat" self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) @@ -21,6 +21,8 @@ def teardown_method(self): @pytest.mark.parametrize( "version", [ + "22-ubi9", + "22-ubi9-minimal", "20-ubi9", "20-ubi9-minimal" "20-ubi8", @@ -34,10 +36,10 @@ def teardown_method(self): def test_curl_connection(self, version): if self.hc_api.oc_api.shared_cluster: pytest.skip("Do NOT test on shared cluster") - self.hc_api.package_name = "nodejs-imagestreams" + self.hc_api.package_name = "redhat-nodejs-imagestreams" self.hc_api.helm_package() assert self.hc_api.helm_installation() - self.hc_api.package_name = "nodejs-application" + self.hc_api.package_name = "redhat-nodejs-application" assert self.hc_api.helm_package() pod_name = f"nodejs-ex-{version}".replace("-minimal", "") assert self.hc_api.helm_installation( @@ -56,6 +58,8 @@ def test_curl_connection(self, version): @pytest.mark.parametrize( "version", [ + "22-ubi9", + "22-ubi9-minimal", "20-ubi9", "20-ubi9-minimal" "20-ubi8", @@ -67,10 +71,10 @@ def test_curl_connection(self, version): ], ) def test_by_helm_test(self, version): - self.hc_api.package_name = "nodejs-imagestreams" + self.hc_api.package_name = "redhat-nodejs-imagestreams" self.hc_api.helm_package() assert self.hc_api.helm_installation() - self.hc_api.package_name = "nodejs-application" + self.hc_api.package_name = "redhat-nodejs-application" assert self.hc_api.helm_package() pod_name = f"nodejs-ex-{version}".replace("-minimal", "") assert self.hc_api.helm_installation( diff --git a/tests/test_nodejs_imagestreams.py b/tests/test_nodejs_imagestreams.py index b707003..1fd66a7 100644 --- a/tests/test_nodejs_imagestreams.py +++ b/tests/test_nodejs_imagestreams.py @@ -11,7 +11,7 @@ class TestHelmRHELNodeJSImageStreams: def setup_method(self): - package_name = "nodejs-imagestreams" + package_name = "redhat-nodejs-imagestreams" path = test_dir / "../charts/redhat" self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir) @@ -21,6 +21,8 @@ def teardown_method(self): @pytest.mark.parametrize( "version,registry", [ + ("22-ubi9", "registry.redhat.io/ubi9/nodejs-22:latest"), + ("22-ubi9-minimal", "registry.redhat.io/ubi9/nodejs-22-minimal:latest"), ("20-ubi9", "registry.redhat.io/ubi9/nodejs-20:latest"), ("20-ubi9-minimal", "registry.redhat.io/ubi9/nodejs-20-minimal:latest"), ("20-ubi8", "registry.redhat.io/ubi8/nodejs-20:latest"), From 99508f61c0ba374184075f93d19120ee553b76fd Mon Sep 17 00:00:00 2001 From: "Petr \"Stone\" Hracek" Date: Tue, 26 Nov 2024 15:43:52 +0100 Subject: [PATCH 3/3] Fix redhat-nodejs-application name Signed-off-by: Petr "Stone" Hracek --- charts/redhat/redhat-nodejs-application/src/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/redhat/redhat-nodejs-application/src/Chart.yaml b/charts/redhat/redhat-nodejs-application/src/Chart.yaml index 8a3be3f..887ba0d 100644 --- a/charts/redhat/redhat-nodejs-application/src/Chart.yaml +++ b/charts/redhat/redhat-nodejs-application/src/Chart.yaml @@ -1,6 +1,6 @@ description: This content is experimental, do not use it in production. An example Node.js application with no database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md. -name: nodejs-application +name: redhat-nodejs-application tags: quickstart,nodejs version: 0.0.3 kubeVersion: '>=1.20.0'