forked from packit/deployment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(redis): move away from redis to redict
Multiple options available: - KeyDB (multithreaded open-source fork maintained by Snapchat) - Valkey (fork keeping the former BSD license) - Redict (fork switching to LGPL license) For now switch to the Redict as our needs seem to be satisfied: - they have a wide variety of containers (scratch, alpine, debian) - as it has been tested (on prod), it works smooth as a drop-in replacement - it is also present in the Fedora and EPEL repos As for the switch itself: - introduce new Kubernetes definition for Redict deployment - introduce new variables ‹with_redis› and ‹with_redict› to allow customizable deployment, in case we decide to revert, or switch - introduce ‹redis_hostname› that is deduced from the ‹with_*› variables; also »FAIL« for neither of them being set Fixes packit#561 Signed-off-by: Matej Focko <[email protected]>
- Loading branch information
Showing
11 changed files
with
123 additions
and
9 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
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
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: redict | ||
spec: | ||
selector: | ||
matchLabels: | ||
component: redict | ||
template: | ||
metadata: | ||
labels: | ||
component: redict | ||
{% if managed_platform %} | ||
paas.redhat.com/appcode: {{ appcode }} | ||
{% endif %} | ||
spec: | ||
containers: | ||
- name: redict | ||
image: registry.redict.io/redict:7 | ||
ports: | ||
- containerPort: 6379 | ||
volumeMounts: | ||
- mountPath: /data | ||
name: redict-pv | ||
resources: | ||
# requests and limits have to be the same to have Guaranteed QoS | ||
requests: | ||
memory: "64Mi" | ||
cpu: "10m" | ||
limits: | ||
memory: "64Mi" | ||
cpu: "10m" | ||
volumes: | ||
- name: redict-pv | ||
persistentVolumeClaim: | ||
claimName: redict-pvc | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: redict | ||
{% if managed_platform %} | ||
labels: | ||
paas.redhat.com/appcode: {{ appcode }} | ||
{% endif %} | ||
spec: | ||
ports: | ||
- name: "6379" | ||
port: 6379 | ||
targetPort: 6379 | ||
selector: | ||
component: redict | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: redict-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