diff --git a/namespaces/nextcloud.yml b/namespaces/nextcloud.yml new file mode 100644 index 0000000..e8c2e8f --- /dev/null +++ b/namespaces/nextcloud.yml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: nextcloud diff --git a/workloads/nextcloud/redis-config.yml b/workloads/nextcloud/redis-config.yml new file mode 100644 index 0000000..71fa606 --- /dev/null +++ b/workloads/nextcloud/redis-config.yml @@ -0,0 +1,50 @@ +# Contains configmap for Redis pod +apiVersion: v1 +kind: ConfigMap +metadata: + name: redis + namespace: nextcloud +data: + redis.conf: | + protected-mode no + port 6379 + tcp-backlog 511 + timeout 0 + tcp-keepalive 300 + daemonize no + supervised no + loglevel notice + logfile "" + databases 16 + always-show-logo no + maxmemory 228mb + maxmemory-policy volatile-lru + maxmemory-samples 5 + lazyfree-lazy-eviction no + lazyfree-lazy-expire no + lazyfree-lazy-server-del no + replica-lazy-flush no + appendonly no + lua-time-limit 5000 + slowlog-log-slower-than 10000 + slowlog-max-len 128 + latency-monitor-threshold 0 + notify-keyspace-events "" + hash-max-ziplist-entries 512 + hash-max-ziplist-value 64 + list-max-ziplist-size -2 + list-compress-depth 0 + set-max-intset-entries 512 + zset-max-ziplist-entries 128 + zset-max-ziplist-value 64 + hll-sparse-max-bytes 3000 + stream-node-max-bytes 4096 + stream-node-max-entries 100 + activerehashing yes + client-output-buffer-limit normal 0 0 0 + client-output-buffer-limit replica 256mb 64mb 60 + client-output-buffer-limit pubsub 32mb 8mb 60 + hz 10 + dynamic-hz yes + aof-rewrite-incremental-fsync yes + rdb-save-incremental-fsync yes diff --git a/workloads/nextcloud/redis-deploy.yml b/workloads/nextcloud/redis-deploy.yml new file mode 100644 index 0000000..f67de44 --- /dev/null +++ b/workloads/nextcloud/redis-deploy.yml @@ -0,0 +1,40 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis + namespace: nextcloud +spec: + replicas: 1 + selector: + matchLabels: + app: redis + template: + metadata: + labels: + app: redis + spec: + containers: + - image: redis:5.0.7-alpine + imagePullPolicy: IfNotPresent + name: redis + command: + - redis-server + args: + - /usr/local/etc/redis/redis.conf + livenessProbe: + tcpSocket: + port: 6379 + initialDelaySeconds: 15 + periodSeconds: 30 + timeoutSeconds: 5 + successThreshold: 1 + failureThreshold: 2 + ports: + - containerPort: 6379 + volumeMounts: + - name: redis-conf + mountPath: /usr/local/etc/redis/ + volumes: + - name: redis-conf + configMap: + name: redis diff --git a/workloads/nextcloud/redis-service.yml b/workloads/nextcloud/redis-service.yml new file mode 100644 index 0000000..0d1a7e6 --- /dev/null +++ b/workloads/nextcloud/redis-service.yml @@ -0,0 +1,12 @@ +kind: Service +apiVersion: v1 +metadata: + name: redis + namespace: nextcloud +spec: + selector: + app: redis + ports: + - protocol: TCP + port: 6379 + targetPort: 6379