diff --git a/openshift/valkey.yml.j2 b/openshift/valkey.yml.j2 new file mode 100644 index 0000000..1deab4f --- /dev/null +++ b/openshift/valkey.yml.j2 @@ -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 %} diff --git a/vars/packit/prod_template.yml b/vars/packit/prod_template.yml index e91ab23..c4ff4ba 100644 --- a/vars/packit/prod_template.yml +++ b/vars/packit/prod_template.yml @@ -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 diff --git a/vars/packit/stg_template.yml b/vars/packit/stg_template.yml index bc1b143..7040a1e 100644 --- a/vars/packit/stg_template.yml +++ b/vars/packit/stg_template.yml @@ -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