-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add OpenShift definition for Valkey
Signed-off-by: Matej Focko <[email protected]>
- Loading branch information
Showing
3 changed files
with
81 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters