creation de nextcloud-kustom
This commit is contained in:
8
base/components/one-redis/ConfigMap-redis.yaml
Normal file
8
base/components/one-redis/ConfigMap-redis.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cm-redis-config
|
||||
data:
|
||||
redis-config: |
|
||||
maxmemory 2mb
|
||||
maxmemory-policy allkeys-lru
|
39
base/components/one-redis/deployment.yaml
Normal file
39
base/components/one-redis/deployment.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- redis-server
|
||||
- /redis-master/redis.conf
|
||||
image: redis:alpine
|
||||
name: redis
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
volumeMounts:
|
||||
- mountPath: /redis-master-data
|
||||
name: data
|
||||
- mountPath: /redis-master
|
||||
name: config
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
- name: config
|
||||
configMap:
|
||||
name: cm-redis-config
|
||||
items:
|
||||
- key: redis-config
|
||||
path: redis.conf
|
8
base/components/one-redis/kustomization.yaml
Normal file
8
base/components/one-redis/kustomization.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1alpha1
|
||||
kind: Component
|
||||
namespace: nextcloud
|
||||
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- redis-service.yaml
|
||||
- ConfigMap-redis.yaml
|
5
base/components/one-redis/readme.md
Normal file
5
base/components/one-redis/readme.md
Normal file
@ -0,0 +1,5 @@
|
||||
# README
|
||||
|
||||
Pour configurer facilement et rapidement le redis passer par le fichier ConfigMap-redis.yaml !!!
|
||||
|
||||
- cf https://kubernetes.io/docs/tutorials/configuration/configure-redis-using-configmap/
|
11
base/components/one-redis/redis-service.yaml
Normal file
11
base/components/one-redis/redis-service.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
ports:
|
||||
- port: 6379
|
||||
selector:
|
||||
app: redis
|
Reference in New Issue
Block a user