Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nodejs 22 to helm charts #115

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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.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
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
14 changes: 9 additions & 5 deletions tests/test_nodejs_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -21,6 +21,8 @@ def teardown_method(self):
@pytest.mark.parametrize(
"version",
[
"22-ubi9",
"22-ubi9-minimal",
"20-ubi9",
"20-ubi9-minimal"
"20-ubi8",
Expand All @@ -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(
Expand All @@ -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",
Expand All @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion tests/test_nodejs_imagestreams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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"),
Expand Down