Skip to content

Commit

Permalink
Merge pull request #93 from phracek/main
Browse files Browse the repository at this point in the history
Add support for CentOS Stream 10 valkey imagestreams
  • Loading branch information
phracek authored Sep 5, 2024
2 parents 6340d43 + 25351e4 commit bd5dd1b
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test test-httpd test-php test-perl test-mariadb test-mysql test-nginx test-postgresql test-redis test-all test-nodejs test-ruby test-python
.PHONY: test test-httpd test-php test-perl test-mariadb test-mysql test-nginx test-postgresql test-redis test-all test-nodejs test-ruby test-python test-valkey

test:
cd tests && PYTHONPATH=$(CURDIR) python3.12 -m pytest --color=yes -s -rA --verbose -vv --showlocals test_varnish_*.py
Expand Down Expand Up @@ -36,7 +36,10 @@ test-python:
test-ruby:
cd tests && PYTHONPATH=$(CURDIR) python3.12 -m pytest --color=yes -s -rA --verbose -vv --showlocals test_ruby_*.py

test-all: test test-php test-httpd test-mariadb test-mysql test-nginx test-postgresql test-redis test-perl test-python test-ruby test-nodejs
test-valkey:
cd tests && PYTHONPATH=$(CURDIR) python3.12 -m pytest --color=yes -s -rA --verbose -vv --showlocals test_valkey_*.py

test-all: test test-php test-httpd test-mariadb test-mysql test-nginx test-postgresql test-redis test-perl test-python test-ruby test-nodejs test-valkey

test-nons2i: test test-httpd test-mariadb test-mysql test-nginx test-postgresql test-redis

Expand Down
9 changes: 9 additions & 0 deletions charts/centos/valkey-imagestreams/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
chart:
name: valkey-imagestreams
description: This is the CentOS Valkey imagestream chart
publicPgpKey: null
users:
- githubUsername: phracek
vendor:
label: centos
name: Cent OS
13 changes: 13 additions & 0 deletions charts/centos/valkey-imagestreams/src/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: |-
This content is experimental, do not use it in production. Provides a Valkey database on CentOS Stream imagestreams.
For more information about Valkey container see https://github.com/sclorg/valkey-container/.
annotations:
charts.openshift.io/name: Provides a Valkey database on CentOS imagestreams (experimental)
apiVersion: v2
appVersion: 0.0.1
kubeVersion: '>=1.20.0'
name: valkey-imagestreams
tags: builder,valkey
sources:
- https://github.com/sclorg/helm-charts
version: 0.0.1
43 changes: 43 additions & 0 deletions charts/centos/valkey-imagestreams/src/templates/imagestreams.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
annotations:
openshift.io/display-name: Valkey
name: valkey
spec:
tags:
- annotations:
description: >-
Provides a Valkey 7 database on CentOS Stream 10. For more information
about using this database image, including OpenShift considerations, see
https://github.com/sclorg/valkey-container/tree/master/7/README.md.
WARNING: By selecting this tag, your application will automatically
update to use the latest version of Valkey available on OpenShift,
including major version updates.
iconClass: icon-valkey
openshift.io/display-name: Valkey (Latest)
openshift.io/provider-display-name: Red Hat, Inc.
tags: valkey
from:
kind: ImageStreamTag
name: 7-c10s
referencePolicy:
type: Local
name: latest
- annotations:
description: >-
Provides a Valkey 7 database on CentOS Stream 10. For more information about
using this database image, including OpenShift considerations, see
https://github.com/sclorg/valkey-container/tree/master/6/README.md.
iconClass: icon-valkey
openshift.io/display-name: Valkey 7 (CentOS Stream 10)
openshift.io/provider-display-name: Red Hat, Inc.
tags: valkey
version: "7"
from:
kind: DockerImage
name: quay.io/sclorg/valkey-7-c10s:latest
referencePolicy:
type: Local
name: 7-el10
29 changes: 29 additions & 0 deletions tests/test_valkey_imagestreams.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import os

import pytest
from pathlib import Path

from container_ci_suite.helm import HelmChartsAPI

test_dir = Path(os.path.abspath(os.path.dirname(__file__)))

class TestHelmCentOSValkeyImageStreams:

def setup_method(self):
package_name = "valkey-imagestreams"
path = test_dir / "../charts/centos"
self.hc_api = HelmChartsAPI(path=path, package_name=package_name, tarball_dir=test_dir)

def teardown_method(self):
self.hc_api.delete_project()

@pytest.mark.parametrize(
"version,registry,expected",
[
("7-el10", "quay.io/sclorg/valkey-7-c10s:latest", True),
],
)
def test_package_imagestream(self, version, registry, expected):
assert self.hc_api.helm_package()
assert self.hc_api.helm_installation()
assert self.hc_api.check_imagestreams(version=version, registry=registry) == expected

0 comments on commit bd5dd1b

Please sign in to comment.