k8s: fixes and formating
- Add checkmk secrets example - space-tab fixes (linter) - switcher kener redis to statefulset - disabled netronome voulme mount (not needed). postgres statefulset instead - switched naio to 8888 port (traefik port conflict) - changed nextcloud ips and ports to prod
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: checkmk-secrets
|
||||||
|
namespace: checkmk
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
CMK_PASSWORD: "password"
|
||||||
+35
-35
@@ -7,8 +7,8 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: dockmon
|
app: dockmon
|
||||||
ports:
|
ports:
|
||||||
- port: 443
|
- port: 443
|
||||||
targetPort: 443
|
targetPort: 443
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@@ -26,39 +26,39 @@ spec:
|
|||||||
app: dockmon
|
app: dockmon
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: dockmon
|
- name: dockmon
|
||||||
image: darthnorse/dockmon:latest
|
image: darthnorse/dockmon:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 443
|
- containerPort: 443
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /app/data
|
mountPath: /app/data
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
mountPath: /var/run/docker.sock
|
mountPath: /var/run/docker.sock
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /health
|
path: /health
|
||||||
port: 443
|
port: 443
|
||||||
scheme: HTTPS
|
scheme: HTTPS
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 10
|
||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "512Gi"
|
memory: "512Mi"
|
||||||
cpu: "200m"
|
cpu: "200m"
|
||||||
limits:
|
limits:
|
||||||
memory: "2Gi"
|
memory: "2Gi"
|
||||||
cpu: "1500m "
|
cpu: "1500m "
|
||||||
volumes:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: dockmon-data-pvc
|
claimName: dockmon-data-pvc
|
||||||
- name: docker-sock
|
- name: docker-sock
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
type: Socket
|
type: Socket
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
@@ -67,7 +67,7 @@ metadata:
|
|||||||
namespace: dockmon
|
namespace: dockmon
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 1Gi
|
storage: 1Gi
|
||||||
|
|||||||
+18
-37
@@ -1,21 +1,10 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: kener-redis-service
|
|
||||||
namespace: kener
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: kener-redis
|
|
||||||
ports:
|
|
||||||
- port: 6379
|
|
||||||
targetPort: 6379
|
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: StatefulSet
|
||||||
metadata:
|
metadata:
|
||||||
name: kener-redis-deployment
|
name: kener-redis
|
||||||
namespace: kener
|
namespace: kener
|
||||||
spec:
|
spec:
|
||||||
|
serviceName: kener-redis-service
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -26,26 +15,18 @@ spec:
|
|||||||
app: kener-redis
|
app: kener-redis
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: redis:7-alpine
|
image: redis:7-alpine
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 6379
|
- containerPort: 6379
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: redis-data
|
- name: redis-data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
volumes:
|
volumeClaimTemplates:
|
||||||
- name: redis-data
|
- metadata:
|
||||||
persistentVolumeClaim:
|
name: redis-data
|
||||||
claimName: kener-redis-pvc
|
spec:
|
||||||
---
|
accessModes: ["ReadWriteOnce"]
|
||||||
apiVersion: v1
|
resources:
|
||||||
kind: PersistentVolumeClaim
|
requests:
|
||||||
metadata:
|
storage: 1Gi
|
||||||
name: kener-redis-pvc
|
|
||||||
namespace: kener
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: netronome
|
app: netronome
|
||||||
ports:
|
ports:
|
||||||
- port: 7575
|
- port: 7575
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
targetPort: 7575
|
targetPort: 7575
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@@ -29,49 +29,30 @@ spec:
|
|||||||
app: netronome
|
app: netronome
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: netronome
|
- name: netronome
|
||||||
image: ghcr.io/autobrr/netronome:latest
|
image: ghcr.io/autobrr/netronome:latest
|
||||||
ports:
|
ports:
|
||||||
- name: netronome-port
|
- name: netronome-port
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
containerPort: 7575
|
containerPort: 7575
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: netronome-config
|
name: netronome-config
|
||||||
env:
|
env:
|
||||||
- name: NETRONOME__DB_USER
|
- name: NETRONOME__DB_USER
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: netronome-secret
|
name: netronome-secrets
|
||||||
key: NETRONOME__DB_USER
|
key: NETRONOME__DB_USER
|
||||||
- name: NETRONOME__DB_PASSWORD
|
- name: NETRONOME__DB_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: netronome-secret
|
name: netronome-secrets
|
||||||
key: NETRONOME__DB_PASSWORD
|
key: NETRONOME__DB_PASSWORD
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "512Mi"
|
memory: "512Mi"
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
limits:
|
limits:
|
||||||
memory: "1Gi"
|
memory: "1Gi"
|
||||||
cpu: "1000m"
|
cpu: "1000m"
|
||||||
volumeMounts:
|
|
||||||
- name: netronome-data
|
|
||||||
mountPath: /data
|
|
||||||
volumes:
|
|
||||||
- name: netronome-data
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: netronome-pvc
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: netronome-pvc
|
|
||||||
namespace: netronome
|
|
||||||
spec:
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 1Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
|
|||||||
@@ -0,0 +1,71 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: netronome-postgres-service
|
||||||
|
namespace: netronome
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: netronome-postgres
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 5432
|
||||||
|
targetPort: 5432
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: netronome-postgres
|
||||||
|
namespace: netronome
|
||||||
|
spec:
|
||||||
|
serviceName: "netronome-postgres-service"
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: netronome-postgres
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: netronome-postgres
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: netronome-postgres
|
||||||
|
image: postgres:17-alpine
|
||||||
|
ports:
|
||||||
|
- name: postgres-port
|
||||||
|
protocol: TCP
|
||||||
|
containerPort: 5432
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: netronome-secrets
|
||||||
|
key: NETRONOME__DB_USER
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: netronome-secrets
|
||||||
|
key: NETRONOME__DB_PASSWORD
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: netronome-config
|
||||||
|
key: NETRONOME__DB_NAME
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "500m"
|
||||||
|
limits:
|
||||||
|
memory: "1Gi"
|
||||||
|
cpu: "1000m"
|
||||||
|
volumeMounts:
|
||||||
|
- name: netronome-pg-data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: netronome-pg-data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
@@ -9,7 +9,7 @@ services:
|
|||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- /dev/dri:/dev/dri
|
- /dev/dri:/dev/dri
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8888:8080
|
||||||
networks:
|
networks:
|
||||||
- nextcloud-aio
|
- nextcloud-aio
|
||||||
- proxy # Optional: Connects the mastercontainer to the proxy network in order to make the built-in reverse proxy detection work. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
- proxy # Optional: Connects the mastercontainer to the proxy network in order to make the built-in reverse proxy detection work. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ metadata:
|
|||||||
namespace: nextcloud
|
namespace: nextcloud
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 11000
|
- port: 11000
|
||||||
targetPort: 11000
|
targetPort: 11000
|
||||||
---
|
---
|
||||||
apiVersion: discovery.k8s.io/v1
|
apiVersion: discovery.k8s.io/v1
|
||||||
kind: EndpointSlice
|
kind: EndpointSlice
|
||||||
@@ -17,11 +17,11 @@ metadata:
|
|||||||
kubernetes.io/service-name: nextcloud-apache
|
kubernetes.io/service-name: nextcloud-apache
|
||||||
addressType: IPv4
|
addressType: IPv4
|
||||||
ports:
|
ports:
|
||||||
- port: 11000
|
- port: 11000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
endpoints:
|
endpoints:
|
||||||
- addresses:
|
- addresses:
|
||||||
- "192.168.49.1"
|
- "192.168.88.100"
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
@@ -30,8 +30,8 @@ metadata:
|
|||||||
namespace: nextcloud
|
namespace: nextcloud
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- port: 8080
|
- port: 8080
|
||||||
targetPort: 8080
|
targetPort: 8888
|
||||||
---
|
---
|
||||||
apiVersion: discovery.k8s.io/v1
|
apiVersion: discovery.k8s.io/v1
|
||||||
kind: EndpointSlice
|
kind: EndpointSlice
|
||||||
@@ -42,8 +42,8 @@ metadata:
|
|||||||
kubernetes.io/service-name: nextcloud-aio
|
kubernetes.io/service-name: nextcloud-aio
|
||||||
addressType: IPv4
|
addressType: IPv4
|
||||||
ports:
|
ports:
|
||||||
- port: 8080
|
- port: 8888
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
endpoints:
|
endpoints:
|
||||||
- addresses:
|
- addresses:
|
||||||
- "192.168.49.1"
|
- "192.168.88.100"
|
||||||
|
|||||||
+42
-42
@@ -8,13 +8,13 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`nextcloud.forust.xyz`)
|
- match: Host(`nextcloud.forust.xyz`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
middlewares:
|
middlewares:
|
||||||
- name: nextcloud-chain@file
|
- name: nextcloud-chain@file
|
||||||
services:
|
services:
|
||||||
- name: nextcloud-apache
|
- name: nextcloud-apache
|
||||||
port: 11000
|
port: 11000
|
||||||
tls:
|
tls:
|
||||||
certResolver: letsencrypt
|
certResolver: letsencrypt
|
||||||
---
|
---
|
||||||
@@ -27,13 +27,13 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`nextcloud.workstation.internal`)
|
- match: Host(`nextcloud.workstation.internal`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
middlewares:
|
middlewares:
|
||||||
- name: nextcloud-chain@file
|
- name: nextcloud-chain@file
|
||||||
services:
|
services:
|
||||||
- name: nextcloud-apache
|
- name: nextcloud-apache
|
||||||
port: 11000
|
port: 11000
|
||||||
tls:
|
tls:
|
||||||
secretName: local-tls
|
secretName: local-tls
|
||||||
---
|
---
|
||||||
@@ -46,13 +46,13 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`nextcloud.gigaforust.internal`)
|
- match: Host(`nextcloud.gigaforust.internal`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
middlewares:
|
middlewares:
|
||||||
- name: nextcloud-chain@file
|
- name: nextcloud-chain@file
|
||||||
services:
|
services:
|
||||||
- name: nextcloud-apache
|
- name: nextcloud-apache
|
||||||
port: 11000
|
port: 11000
|
||||||
tls:
|
tls:
|
||||||
secretName: local-tls
|
secretName: local-tls
|
||||||
---
|
---
|
||||||
@@ -66,13 +66,13 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`naio.forust.xyz`)
|
- match: Host(`naio.forust.xyz`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
services:
|
services:
|
||||||
- name: nextcloud-aio
|
- name: nextcloud-aio
|
||||||
port: 8080
|
port: 8888
|
||||||
scheme: https
|
scheme: https
|
||||||
serversTransport: insecureTransport@file
|
serversTransport: insecure-transport # <-- Ссылка на ваш CRD ресурс вместо @file
|
||||||
tls:
|
tls:
|
||||||
certResolver: letsencrypt
|
certResolver: letsencrypt
|
||||||
---
|
---
|
||||||
@@ -85,13 +85,13 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`naio.workstation.internal`)
|
- match: Host(`naio.workstation.internal`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
services:
|
services:
|
||||||
- name: nextcloud-aio
|
- name: nextcloud-aio
|
||||||
port: 8080
|
port: 8888
|
||||||
scheme: https
|
scheme: https
|
||||||
serversTransport: insecureTransport@file
|
serversTransport: insecure-transport
|
||||||
tls:
|
tls:
|
||||||
secretName: local-tls
|
secretName: local-tls
|
||||||
---
|
---
|
||||||
@@ -104,12 +104,12 @@ spec:
|
|||||||
entryPoints:
|
entryPoints:
|
||||||
- websecure
|
- websecure
|
||||||
routes:
|
routes:
|
||||||
- match: Host(`naio.gigaforust.internal`)
|
- match: Host(`naio.gigaforust.internal`)
|
||||||
kind: Rule
|
kind: Rule
|
||||||
services:
|
services:
|
||||||
- name: nextcloud-aio
|
- name: nextcloud-aio
|
||||||
port: 8080
|
port: 8888
|
||||||
scheme: https
|
scheme: https
|
||||||
serversTransport: insecureTransport@file
|
serversTransport: insecure-transport
|
||||||
tls:
|
tls:
|
||||||
secretName: local-tls
|
secretName: local-tls
|
||||||
|
|||||||
Reference in New Issue
Block a user