creation de nextcloud-kustom

This commit is contained in:
2023-08-30 11:35:31 +02:00
parent d3e895d0f3
commit 17b00068c4
53 changed files with 2034 additions and 0 deletions

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: cm-redis-config
data:
redis-config: |
maxmemory 2mb
maxmemory-policy allkeys-lru

View 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

View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
namespace: nextcloud
resources:
- deployment.yaml
- redis-service.yaml
- ConfigMap-redis.yaml

View 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/

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: redis
labels:
app: redis
spec:
ports:
- port: 6379
selector:
app: redis