1
0
forked from k-space/kube

Clean up operatorlib related stuff

This commit is contained in:
2023-08-16 10:39:20 +03:00
parent 49412781ea
commit af83e1783b
25 changed files with 301 additions and 282 deletions

@@ -1,7 +1,8 @@
# Redis clusters
This is namespace for Redis clusters managed by
[Codemowers' Operator Bundle](https://github.com/codemowers/operator-bundle)
This is namespace for Redis clusters managed by Codemowers' sample
[redis-operator](https://github.com/codemowers/operatorlib/tree/main/samples/redis-operator)
which is deployed via [ArgoCD](https://argocd.k-space.ee/applications/argocd/redis-operator)
```
kubectl create namespace redis-clusters

@@ -1,43 +0,0 @@
---
apiVersion: codemowers.io/v1alpha1
kind: ClusterRedisClass
metadata:
name: persistent
spec:
targetNamespace: redis-clusters
description: "Persistent Redis instance"
replicas: 3
storageClass: redis
podSpec:
imagePullPolicy: Never
containers:
- name: redis
image: codemowers/keydb:6.3.2
nodeSelector:
dedicated: storage
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: storage
---
apiVersion: codemowers.io/v1alpha1
kind: ClusterRedisClass
metadata:
name: ephemeral
spec:
targetNamespace: redis-clusters
description: "Ephemeral Redis instance"
replicas: 3
podSpec:
imagePullPolicy: Never
containers:
- name: redis
image: codemowers/keydb:6.3.2
nodeSelector:
dedicated: storage
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: storage

18
redis-clusters/cache.yaml Normal file

@@ -0,0 +1,18 @@
---
apiVersion: codemowers.cloud/v1beta1
kind: RedisClass
metadata:
name: cache
annotations:
kubernetes.io/description: "Caching Redis instance"
spec:
reclaimPolicy: Delete
replicas: 1
podSpec:
containers:
- name: redis
image: docker.io/library/redis:7.0.11@sha256:1008c73f08e9f913868e2fa2e843212b62ea5bf3c66435d87bc7a6207bc0f1b4
imagePullPolicy: IfNotPresent
args:
- --maxmemory-policy
- volatile-lfu

@@ -0,0 +1,22 @@
---
apiVersion: codemowers.cloud/v1beta1
kind: RedisClass
metadata:
name: ephemeral
annotations:
kubernetes.io/description: "Ephemeral Redis cluster"
spec:
reclaimPolicy: Delete
replicas: 3
podSpec:
containers:
- name: redis
image: docker.io/library/redis:7.0.11@sha256:1008c73f08e9f913868e2fa2e843212b62ea5bf3c66435d87bc7a6207bc0f1b4
imagePullPolicy: IfNotPresent
nodeSelector:
dedicated: storage
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: storage

@@ -0,0 +1,25 @@
---
apiVersion: codemowers.cloud/v1beta1
kind: RedisClass
metadata:
name: persistent
annotations:
kubernetes.io/description: "Persistent Redis instance"
spec:
reclaimPolicy: Retain
replicas: 3
storageClass: redis
podSpec:
containers:
- name: redis
image: docker.io/library/redis:7.0.11@sha256:1008c73f08e9f913868e2fa2e843212b62ea5bf3c66435d87bc7a6207bc0f1b4
imagePullPolicy: IfNotPresent
args:
- --activedefrag yes
nodeSelector:
dedicated: storage
tolerations:
- effect: NoSchedule
key: dedicated
operator: Equal
value: storage

@@ -0,0 +1,11 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: redis
provisioner: rawfile.csi.openebs.io
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: true
parameters:
fsType: "xfs"