-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feat/valkey support #597
Merged
Merged
Feat/valkey support #597
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4fefa37
feat: make key-value DB deployment generic
mfocko cb0e203
feat: add OpenShift definition for Valkey
mfocko 1596ca4
Fix typo in ephemeral-storage request
majamassarini 64cdcec
feat(kv-db): add default config for redis-like DBs
mfocko 660a23a
fix(valkey): implement remarks from code review
mfocko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,8 @@ | ||
--- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: redis-like-config | ||
data: | ||
redis.conf: | | ||
timeout 1800 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# 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 | ||
args: | ||
- "/etc/redislike/redis.conf" | ||
ports: | ||
- containerPort: 6379 | ||
volumeMounts: | ||
- mountPath: /data | ||
name: valkey-pv | ||
- mountPath: /etc/redislike | ||
name: redis-like-config | ||
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 | ||
- name: redis-like-config | ||
configMap: {name: redis-like-config} | ||
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
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
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need this facts but isn't
valkey
missing here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, must've missed it.
This builds up the
optional_deploymentconfigs
, from that we build thedeploymentconfigs
and finally it's checked heredeployment/playbooks/deploy.yml
Lines 440 to 446 in 2892b42
that they're running. It's a bit flaky though, cause it doesn't work properly if you don't run
oc project ‹packit namespace›
beforehand in the terminal.