Skip to content

Commit

Permalink
feat: add OpenShift definition for Valkey
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Focko <[email protected]>
  • Loading branch information
mfocko committed Sep 20, 2024
1 parent 21f696c commit 6d6d60a
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 2 deletions.
79 changes: 79 additions & 0 deletions openshift/valkey.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT

---
kind: Deployment
apiVersion: apps/v1
metadata:
name: valkey
spec:
selector:
matchLabels:
component: valkey
template:
metadata:
labels:
component: valkey
{% if managed_platform %}
paas.redhat.com/appcode: {{ appcode }}
{% endif %}
spec:
containers:
- name: valkey
image: valkey/valkey:8.0.0
ports:
- containerPort: 6379
volumeMounts:
- mountPath: /data
name: valkey-pv
resources:
# requests and limits have to be the same to have Guaranteed QoS
requests:
memory: "128Mi"
cpu: "10m"
limits:
memory: "256Mi"
cpu: "10m"
volumes:
- name: valkey-pv
persistentVolumeClaim:
claimName: valkey-pvc
replicas: 1
strategy:
type: Recreate
---
apiVersion: v1
kind: Service
metadata:
name: valkey
{% if managed_platform %}
labels:
paas.redhat.com/appcode: {{ appcode }}
{% endif %}
spec:
ports:
- name: "6379"
port: 6379
targetPort: 6379
selector:
component: valkey
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: valkey-pvc
{% if managed_platform %}
labels:
paas.redhat.com/appcode: {{ appcode }}
annotations:
kubernetes.io/reclaimPolicy: Delete
{% endif %}
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
{% if managed_platform %}
storageClassName: aws-ebs
{% endif %}
2 changes: 1 addition & 1 deletion vars/packit/prod_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ api_key: ""
# edit the queue name in secrets/*/fedora.toml
# with_fedmsg: true

# kv_database: redict
# kv_database: valkey
# with_kv_database: true

# with_redis_commander: false
Expand Down
2 changes: 1 addition & 1 deletion vars/packit/stg_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ api_key: ""
# edit the queue name in secrets/*/fedora.toml
# with_fedmsg: true

# kv_database: redict
# kv_database: valkey
# with_kv_database: true

# with_redis_commander: false
Expand Down

0 comments on commit 6d6d60a

Please sign in to comment.