Merge branch 'main' of https://github.com/illiumst/kubedeploy
This commit is contained in:
commit
0b38f69702
68
apps/emby/base/deployment.yaml
Normal file
68
apps/emby/base/deployment.yaml
Normal file
@ -0,0 +1,68 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: emby
|
||||
labels:
|
||||
app: emby
|
||||
namespace: emby
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: emby
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: emby
|
||||
spec:
|
||||
containers:
|
||||
- name: emby
|
||||
image: emby/embyserver:latest
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8100
|
||||
- name: https
|
||||
containerPort: 8101
|
||||
- name: http-front
|
||||
containerPort: 8102
|
||||
- name: https-front
|
||||
containerPort: 8103
|
||||
volumeMounts:
|
||||
- mountPath: /config
|
||||
name: config
|
||||
- mountPath: /mnt/share_movie
|
||||
name: media
|
||||
subPath: movie
|
||||
- mountPath: /mnt/share_shows
|
||||
name: media
|
||||
subPath: tvshow
|
||||
- mountPath: /mnt/share_anime
|
||||
name: media
|
||||
subPath: anime
|
||||
- mountPath: /mnt/share_music
|
||||
name: media
|
||||
subPath: music
|
||||
resources:
|
||||
limits:
|
||||
gpu.intel.com/i915: 1 # requesting 1 GPU
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /web/index.html
|
||||
port: 8100
|
||||
timeoutSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /web/index.html
|
||||
port: 8100
|
||||
timeoutSeconds: 30
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: emby
|
||||
readOnly: false
|
||||
- name: media
|
||||
nfs:
|
||||
server: 192.168.178.4
|
||||
path: /mnt/media
|
15
apps/emby/base/ingress.yaml
Normal file
15
apps/emby/base/ingress.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: emby
|
||||
namespace: emby
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure-local
|
||||
tls: {}
|
||||
routes:
|
||||
- match: Host(`emby.steffenillium.de`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: emby
|
||||
port: http
|
12
apps/emby/base/pvc.yaml
Normal file
12
apps/emby/base/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: emby
|
||||
spec:
|
||||
storageClassName: "rook-cephfs"
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 30Gi
|
18
apps/emby/base/service.yaml
Normal file
18
apps/emby/base/service.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: emby
|
||||
namespace: emby
|
||||
annotations:
|
||||
metallb.universe.tf/loadBalancerIPs: 192.168.178.104
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
selector:
|
||||
app: emby
|
||||
sessionAffinity: None
|
||||
type: LoadBalancer
|
||||
|
10
apps/emby/kustomization.yaml
Normal file
10
apps/emby/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: emby
|
||||
|
||||
resources:
|
||||
- base/deployment.yaml
|
||||
- base/ingress.yaml
|
||||
- base/pvc.yaml
|
||||
- base/service.yaml
|
@ -4,11 +4,10 @@ kind: Kustomization
|
||||
namespace: gitea
|
||||
|
||||
resources:
|
||||
- base/gitea-ingress.yaml
|
||||
- base/gitea-service.yaml
|
||||
- base/gitea-deployment.yaml
|
||||
- base/gitea-data-pvc.yaml
|
||||
- base/gitea-namespace.yaml
|
||||
|
||||
- base/ingress.yaml
|
||||
- base/service.yaml
|
||||
- base/deployment.yaml
|
||||
- base/pvc.yaml
|
||||
- base/namespace.yaml
|
||||
components:
|
||||
- ../../components/local-region-selector.yaml
|
39
apps/immich/base/immich-secret-sealed.yaml
Normal file
39
apps/immich/base/immich-secret-sealed.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
{
|
||||
"kind": "SealedSecret",
|
||||
"apiVersion": "bitnami.com/v1alpha1",
|
||||
"metadata": {
|
||||
"name": "immich-secret",
|
||||
"namespace": "immich",
|
||||
"creationTimestamp": null,
|
||||
"annotations": {
|
||||
"sealedsecrets.bitnami.com/namespace-wide": "true"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"template": {
|
||||
"metadata": {
|
||||
"name": "immich-secret",
|
||||
"namespace": "immich",
|
||||
"creationTimestamp": null,
|
||||
"annotations": {
|
||||
"sealedsecrets.bitnami.com/namespace-wide": "true"
|
||||
}
|
||||
},
|
||||
"type": "Opaque"
|
||||
},
|
||||
"encryptedData": {
|
||||
"DB_DATABASE_NAME": "AgAMldRrZmNXJGz+PpBKygu6Got7SeZ+wZ74jjBE/c26GewW4/SAP3pP3adIfIngeftTIOKKxQhYMjN76hp7O3x5vweJygFRjvwECOyn1feE7vq6mVlAydUtP7XkwLKhZL0EfDh8giKIveWlBaYwTSI7tmHw/MSqLL0L7AlEvdE+uOrTPg1D3CFckGvT2TWe//DPnJ2RPpsJtGlwB9nIyAIHOZ+cjDYxo4Akv5u+l3pP2L+PnbhxhGB7nDvnXoX9jfjAjblfGQ8/oPDdv5pIWoBkuooHksy7GdNXGeoLRWX+XgdpTWpNRT2NX7eid4U3Oxmt4Kzb3LMCYiTn03nJF11r1RpOYBk43hdEfxUHDZ1EgiCDzL+gj7Bduoe1bhphXk0KBoKZM1EHU6XzvJ5lW915feg6/GdAji8OiMX8mRMEmAE2VVUf6SiESjgkEKOYDHa/2QyenEcwgbyg4gocWXvjhrYGwcZg9tu4gc0i+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9LbOOTd26H/Q+Xkq2sRb8UOwEfcoB/nVcrcDUlQ45QvMip+cjBMYXUu54vv3A78QFphJZD09F",
|
||||
"TYPESENSE_API_KEY": "AgCNHh6Bs57I11mI3gNlkny1yxqzBzZ5PaftMnQstIBlzTw6hWuGLqFUdbtFjJ8XYYUCZQ7ubcxWMySyr4J9Xqeh6TTTLNv3rAFLoD1qL7o1xpkSqRJe2O2Q80wIYmFOtFKZMnzEJGrLjuDX1DJj1A2O2zI9sHR8hg85QrunvvSTQNz9zYlBLYy6Aa0MoNcZApXKLpLw7+s+oL9jN9BfG723nJhVilCi3z1dWs9Ydjyj0JK05C9VpJuC5tqmOH8TmrM178ZFdWcMBtS1db4T4hIlGehQPtCGyyy2kBjTPOsi9XbYUuq0N+4e/gPciogIibzsCdx8p307r8/aK6f00BGyrbA4YlGVJZYBbSBbgjqZospoWQ48CjnCxR7fYouZISLuXkdRlOsijD8YMosAeMF0cHPje+pw/h5UhDzPeqtLrB3Av34PDFij0brdMiEGOECdFyOUsMcoYzGjLz0b+SANGM9o/Gy2CJwREn2e9dvX8XzpZTbb/91SJZNli7nlFPAX8aENe9AbQpSwMvW38iAqQECtsYgXoR8821q/RG699YLRLKh3xxZZA5qkuE/fIKaq3p+cZuUT4CT/OUL9XQpNW63PiUML+TPN/mhtx+MCFcNuvdZG7kPAjPe0gu4BEMUrch//WxiudYrYpCM2aIuGzws8NeWv4nnc+tQTkxZgBmtgtCHLrTe8vsAtzwfYSW8IqJJn3YWeFcYQWarQs5wjiCNfrJSd6G5X"
|
||||
}
|
||||
}
|
||||
}
|
15
apps/immich/base/ingress.yaml
Normal file
15
apps/immich/base/ingress.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: immich
|
||||
namespace: immich
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure-local
|
||||
tls: {}
|
||||
routes:
|
||||
- match: Host(`photos.steffenillium.de`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: server
|
||||
port: server
|
6
apps/immich/base/kustomization.yaml
Normal file
6
apps/immich/base/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
- immich-secret-sealed.yaml
|
27
apps/immich/base/pvc.yaml
Normal file
27
apps/immich/base/pvc.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: pgdata
|
||||
name: pgdata
|
||||
spec:
|
||||
storageClassName: rook-cephfs
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: model-cache
|
||||
name: model-cache
|
||||
spec:
|
||||
storageClassName: rook-cephfs
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
38
apps/immich/deployment/database.yaml
Normal file
38
apps/immich/deployment/database.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: database
|
||||
name: database
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: database
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: database
|
||||
spec:
|
||||
containers:
|
||||
- image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
|
||||
name: immich-postgres
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: immich-secret
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: pgdata
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 5432
|
||||
hostPort: 5432
|
||||
protocol: TCP
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: pgdata
|
||||
persistentVolumeClaim:
|
||||
claimName: pgdata
|
6
apps/immich/deployment/kustomization.yaml
Normal file
6
apps/immich/deployment/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- database.yaml
|
||||
- redis.yaml
|
||||
- server.yaml
|
35
apps/immich/deployment/machine-learning.yaml
Normal file
35
apps/immich/deployment/machine-learning.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: immich-machine-learning
|
||||
name: immich-machine-learning
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: immich-machine-learning
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: immich-machine-learning
|
||||
spec:
|
||||
containers:
|
||||
- image: ghcr.io/immich-app/immich-machine-learning:release
|
||||
name: immich-machine-learning
|
||||
resources: {}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3003
|
||||
hostPort: 3003
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- mountPath: /cache
|
||||
name: model-cache
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: model-cache
|
||||
persistentVolumeClaim:
|
||||
claimName: model-cache
|
27
apps/immich/deployment/redis.yaml
Normal file
27
apps/immich/deployment/redis.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
strategy: {}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
|
||||
name: immich-redis
|
||||
resources: {}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 6379
|
||||
hostPort: 6379
|
||||
protocol: TCP
|
||||
restartPolicy: Always
|
67
apps/immich/deployment/server.yaml
Normal file
67
apps/immich/deployment/server.yaml
Normal file
@ -0,0 +1,67 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: server
|
||||
name: server
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: server
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: server
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- start.sh
|
||||
- microservices
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: immich-secret
|
||||
image: ghcr.io/immich-app/immich-server:release
|
||||
name: microservices
|
||||
ports:
|
||||
- name: microservices
|
||||
containerPort: 3002
|
||||
hostPort: 3002
|
||||
protocol: TCP
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /usr/src/app/upload
|
||||
name: photos
|
||||
subPath: upload
|
||||
- mountPath: /usr/src/app/external
|
||||
name: photos
|
||||
- args:
|
||||
- start.sh
|
||||
- immich
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: immich-secret
|
||||
image: ghcr.io/immich-app/immich-server:release
|
||||
name: server
|
||||
ports:
|
||||
- name: server
|
||||
containerPort: 3001
|
||||
hostPort: 3001
|
||||
protocol: TCP
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /usr/src/app/upload
|
||||
name: photos
|
||||
subPath: upload
|
||||
- mountPath: /usr/src/app/external
|
||||
name: photos
|
||||
readOnly: true
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: photos
|
||||
nfs:
|
||||
server: 192.168.178.4
|
||||
path: /mnt/photos
|
||||
readOnly: false
|
9
apps/immich/kustomization.yaml
Normal file
9
apps/immich/kustomization.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: immich
|
||||
|
||||
resources:
|
||||
- deployment
|
||||
- base
|
||||
- service
|
13
apps/immich/service/database.yaml
Normal file
13
apps/immich/service/database.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: database
|
||||
name: database
|
||||
spec:
|
||||
ports:
|
||||
- name: "http"
|
||||
port: 5432
|
||||
targetPort: http
|
||||
selector:
|
||||
app: database
|
6
apps/immich/service/kustomization.yaml
Normal file
6
apps/immich/service/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- database.yaml
|
||||
- redis.yaml
|
||||
- server.yaml
|
13
apps/immich/service/machine-learning.yaml
Normal file
13
apps/immich/service/machine-learning.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: machine-learning
|
||||
name: machine-learning
|
||||
spec:
|
||||
ports:
|
||||
- name: "http"
|
||||
port: 3003
|
||||
targetPort: http
|
||||
selector:
|
||||
app: machine-learning
|
13
apps/immich/service/redis.yaml
Normal file
13
apps/immich/service/redis.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
name: redis
|
||||
spec:
|
||||
ports:
|
||||
- name: "http"
|
||||
port: 6379
|
||||
targetPort: http
|
||||
selector:
|
||||
app: redis
|
16
apps/immich/service/server.yaml
Normal file
16
apps/immich/service/server.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: server
|
||||
name: server
|
||||
spec:
|
||||
ports:
|
||||
- name: "server"
|
||||
port: 3001
|
||||
targetPort: server
|
||||
- name: "microservices"
|
||||
port: 3002
|
||||
targetPort: microservices
|
||||
selector:
|
||||
app: server
|
@ -18,11 +18,13 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: cron
|
||||
image: nextcloud
|
||||
image: nextcloud:latest
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: nextcloud-pvc
|
||||
name: nextcloud
|
||||
subPath: html
|
||||
- mountPath: /var/www/html/data
|
||||
name: nextcloud-data
|
||||
command: [ "/cron.sh" ]
|
||||
resources: {}
|
||||
- image: mariadb
|
||||
@ -59,7 +61,7 @@ spec:
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: nextcloud-pvc
|
||||
name: nextcloud
|
||||
subPath: db-storage
|
||||
- image: redis:alpine
|
||||
name: redis
|
||||
@ -98,15 +100,20 @@ spec:
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: nextcloud-pvc
|
||||
name: nextcloud
|
||||
subPath: html
|
||||
- mountPath: /var/www/html/data
|
||||
name: nextcloud-pvc
|
||||
subPath: data
|
||||
name: nextcloud-data
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: nextcloud-pvc
|
||||
- name: nextcloud
|
||||
persistentVolumeClaim:
|
||||
claimName: nextcloud
|
||||
- name: nextcloud-data
|
||||
nfs:
|
||||
server: 192.168.178.4
|
||||
path: /mnt/storage/service/nextcloud
|
||||
readOnly: false
|
||||
path: /mnt/storage/service/nextcloud/data
|
||||
readOnly: false
|
||||
|
||||
|
||||
|
@ -4,7 +4,8 @@ kind: Kustomization
|
||||
namespace: nextcloud
|
||||
|
||||
resources:
|
||||
- nextcloud.yaml
|
||||
- deployment.yaml
|
||||
- pvc.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- middleware.yaml
|
||||
|
12
apps/nextcloud/base/pvc.yaml
Normal file
12
apps/nextcloud/base/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nextcloud
|
||||
spec:
|
||||
storageClassName: "rook-cephfs"
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 40Gi
|
@ -25,7 +25,7 @@ spec:
|
||||
memory: "1Gi"
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/postgresql/data
|
||||
name: paperless-pvc
|
||||
name: paperless
|
||||
subPath: pgdata
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
@ -52,13 +52,12 @@ spec:
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /usr/src/paperless/data
|
||||
name: paperless-pvc
|
||||
name: paperless
|
||||
subPath: app
|
||||
- mountPath: /usr/src/paperless/media
|
||||
name: paperless-pvc
|
||||
subPath: media
|
||||
name: paperless-media
|
||||
- mountPath: /usr/src/paperless/consume
|
||||
name: paperless-pvc
|
||||
name: paperless
|
||||
subPath: consume
|
||||
env:
|
||||
- name: DEBUG
|
||||
@ -103,8 +102,11 @@ spec:
|
||||
memory: "1Gi"
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: paperless-pvc
|
||||
- name: paperless
|
||||
persistentVolumeClaim:
|
||||
claimName: paperless
|
||||
- name: paperless-media
|
||||
nfs:
|
||||
server: 192.168.178.4
|
||||
path: /mnt/storage/service/paperless
|
||||
path: /mnt/storage/service/paperless/media
|
||||
readOnly: false
|
12
apps/paperless/base/pvc.yaml
Normal file
12
apps/paperless/base/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: paperless
|
||||
spec:
|
||||
storageClassName: "rook-cephfs"
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
@ -4,10 +4,11 @@ kind: Kustomization
|
||||
namespace: paperless
|
||||
|
||||
resources:
|
||||
- base/pvc.yaml
|
||||
- base/paperless-secret-sealed.yaml
|
||||
- base/paperless-ingress.yaml
|
||||
- base/paperless-service.yaml
|
||||
- base/paperless.yaml
|
||||
- base/deployment.yaml
|
||||
- base/paperless-namespace.yaml
|
||||
|
||||
components:
|
||||
|
12
apps/vaultwarden/base/pvc.yaml
Normal file
12
apps/vaultwarden/base/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: vaultwarden
|
||||
spec:
|
||||
storageClassName: "rook-cephfs"
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
@ -1,44 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: vaultwarden
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
capacity:
|
||||
storage: 20Gi
|
||||
csi:
|
||||
driver: cephfs.csi.ceph.com
|
||||
nodeStageSecretRef:
|
||||
# node stage secret name
|
||||
name: csi-cephfs-secret
|
||||
# node stage secret namespace where above secret is created
|
||||
namespace: default
|
||||
volumeAttributes:
|
||||
# optional file system to be mounted
|
||||
"fsName": "myfs"
|
||||
# Required options from storageclass parameters need to be added in volumeAttributes
|
||||
"clusterID": "99c133b4-bd71-4eb9-9c00-ced76abf2a40"
|
||||
# "staticVolume": "true"
|
||||
"rootPath": /volumes/csi/vaultwarden/aa82dc92-5ed0-4d99-b156-670f51b05a6b
|
||||
# volumeHandle can be anything, need not to be same
|
||||
# as PV name or volume name. keeping same for brevity
|
||||
volumeHandle: vaultwarden
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
volumeMode: Filesystem
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
labels:
|
||||
app: vaultwarden
|
||||
name: vaultwarden
|
||||
spec:
|
||||
storageClassName: ""
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
volumeName: vaultwarden
|
@ -4,12 +4,12 @@ kind: Kustomization
|
||||
namespace: vaultwarden
|
||||
|
||||
resources:
|
||||
- base/vaultwarden-ingress.yaml
|
||||
- base/vaultwarden-data-pvc.yaml
|
||||
- base/vaultwarden-deployment.yaml
|
||||
- base/vaultwarden-namespace.yaml
|
||||
- base/vaultwarden-secret-sealed.yaml
|
||||
- base/vaultwarden-service.yaml
|
||||
- base/ingress.yaml
|
||||
- base/pvc.yaml
|
||||
- base/deployment.yaml
|
||||
- base/namespace.yaml
|
||||
- base/secret-sealed.yaml
|
||||
- base/service.yaml
|
||||
|
||||
components:
|
||||
- ../../components/local-region-selector.yaml
|
@ -6,3 +6,12 @@ kubectl apply -k ./01-metallb
|
||||
# Install argoCD for deployment and secret management
|
||||
kubectl apply -k ./02-argocd
|
||||
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml
|
||||
|
||||
# Start NFD - if your cluster doesn't have NFD installed yet
|
||||
kubectl apply -k 'https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/nfd?ref=v0.29.0'
|
||||
|
||||
# Create NodeFeatureRules for detecting GPUs on nodes
|
||||
kubectl apply -k 'https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/nfd/overlays/node-feature-rules?ref=v0.29.0'
|
||||
|
||||
# Create GPU plugin daemonset
|
||||
kubectl apply -k 'https://github.com/intel/intel-device-plugins-for-kubernetes/deployments/gpu_plugin/overlays/nfd_labeled_nodes?ref=v0.29.0'
|
@ -5,4 +5,17 @@ metadata:
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.178.103
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: https
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: metrics
|
||||
port: 8083
|
||||
protocol: TCP
|
||||
targetPort: 8083
|
||||
|
||||
|
@ -133,23 +133,17 @@ spec:
|
||||
readOnlyRootFilesystem: true
|
||||
volumeMounts:
|
||||
- mountPath: /certs
|
||||
name: traefik-pvc
|
||||
name: traefik
|
||||
subPath: certs
|
||||
- mountPath: /data
|
||||
name: traefik-pvc
|
||||
name: traefik
|
||||
subPath: data
|
||||
- mountPath: /tmp
|
||||
name: traefik-pvc
|
||||
name: traefik
|
||||
subPath: tmp
|
||||
securityContext:
|
||||
fsGroupChangePolicy: OnRootMismatch
|
||||
runAsGroup: 65532
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65532
|
||||
serviceAccountName: traefik
|
||||
terminationGracePeriodSeconds: 60
|
||||
volumes:
|
||||
- name: traefik-pvc
|
||||
- name: traefik
|
||||
persistentVolumeClaim:
|
||||
claimName: traefik-pvc
|
||||
|
||||
claimName: traefik
|
||||
|
@ -1,12 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: traefik-pvc
|
||||
namespace: traefik
|
||||
name: traefik
|
||||
spec:
|
||||
storageClassName: "rook-cephfs"
|
||||
volumeMode: Filesystem
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-path
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storage: 500Mi
|
||||
|
@ -9,9 +9,8 @@ spec:
|
||||
- websecure-front
|
||||
tls: {}
|
||||
routes:
|
||||
- match: Host(`photos.steffenillium.de`) || Host(`immich.steffenillium.de`)
|
||||
- match: Host(`photos.steffenillium.de`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: immich
|
||||
port: http
|
||||
|
||||
|
@ -3,8 +3,10 @@ kind: Service
|
||||
metadata:
|
||||
name: rook-ceph-nfs-load-balancer
|
||||
namespace: rook-ceph
|
||||
annotations:
|
||||
metallb.universe.tf/loadBalancerIPs: 192.168.178.100
|
||||
spec:
|
||||
ports:
|
||||
ports:
|
||||
- name: nfs
|
||||
port: 2049
|
||||
type: LoadBalancer
|
||||
|
53
infrastructure/07-prometheus/grafana/deployment.yaml
Normal file
53
infrastructure/07-prometheus/grafana/deployment.yaml
Normal file
@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
name: grafana
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 472
|
||||
supplementalGroups:
|
||||
- 0
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /robots.txt
|
||||
port: 3000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 3000
|
||||
timeoutSeconds: 1
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana
|
||||
volumes:
|
||||
- name: grafana
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana
|
14
infrastructure/07-prometheus/grafana/ingress.yaml
Normal file
14
infrastructure/07-prometheus/grafana/ingress.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure-local
|
||||
tls: {}
|
||||
routes:
|
||||
- match: Host(`grafana.steffenillium.de`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: grafana
|
||||
port: http
|
10
infrastructure/07-prometheus/grafana/kustomization.yaml
Normal file
10
infrastructure/07-prometheus/grafana/kustomization.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: default
|
||||
|
||||
resources:
|
||||
- ingress.yaml
|
||||
- deployment.yaml
|
||||
- pvc.yaml
|
||||
- service.yaml
|
12
infrastructure/07-prometheus/grafana/pvc.yaml
Normal file
12
infrastructure/07-prometheus/grafana/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
storageClassName: "rook-cephfs"
|
||||
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
14
infrastructure/07-prometheus/grafana/service.yaml
Normal file
14
infrastructure/07-prometheus/grafana/service.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
ports:
|
||||
- port: 3000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
name: http
|
||||
selector:
|
||||
app: grafana
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
14
infrastructure/07-prometheus/ingress.yaml
Normal file
14
infrastructure/07-prometheus/ingress.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: prometheus-server
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure-local
|
||||
tls: {}
|
||||
routes:
|
||||
- match: Host(`prometheus.steffenillium.de`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: prometheus-server
|
||||
port: http
|
16
infrastructure/07-prometheus/kustomization.yaml
Normal file
16
infrastructure/07-prometheus/kustomization.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: default
|
||||
|
||||
resources:
|
||||
- grafana
|
||||
- ingress.yaml
|
||||
|
||||
helmCharts:
|
||||
- name: prometheus
|
||||
includeCRDs: true
|
||||
version: 25.20.1
|
||||
releaseName: "prometheus"
|
||||
repo: https://prometheus-community.github.io/helm-charts
|
||||
valuesFile: values.yaml
|
763
infrastructure/07-prometheus/values.yaml
Normal file
763
infrastructure/07-prometheus/values.yaml
Normal file
@ -0,0 +1,763 @@
|
||||
|
||||
## env sets environment variables to pass to the container. Can be set as name/value pairs,
|
||||
## read from secrets or configmaps.
|
||||
env: []
|
||||
# - name: SOMEVAR
|
||||
# value: somevalue
|
||||
# - name: PASSWORD
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: mysecret
|
||||
# key: password
|
||||
# optional: false
|
||||
|
||||
prometheus:
|
||||
enabled: true
|
||||
|
||||
## configmap-reload container name
|
||||
##
|
||||
name: configmap-reload
|
||||
|
||||
## configmap-reload container image
|
||||
##
|
||||
image:
|
||||
repository: quay.io/prometheus-operator/prometheus-config-reloader
|
||||
# When digest is set to a non-empty value, images will be pulled by digest (regardless of tag value).
|
||||
digest: "latest"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
server:
|
||||
name: server
|
||||
|
||||
|
||||
# sidecarContainers - add more containers to prometheus server
|
||||
# Key/Value where Key is the sidecar `- name: <Key>`
|
||||
# Example:
|
||||
# sidecarContainers:
|
||||
# oauth-proxy:
|
||||
# image: quay.io/oauth2-proxy/oauth2-proxy:v7.1.2
|
||||
# args:
|
||||
# - --upstream=http://127.0.0.1:9090
|
||||
# - --http-address=0.0.0.0:8081
|
||||
# - ...
|
||||
# ports:
|
||||
# - containerPort: 8081
|
||||
# name: oauth-proxy
|
||||
# protocol: TCP
|
||||
# resources: {}
|
||||
sidecarContainers: {}
|
||||
|
||||
## Prometheus server container image
|
||||
##
|
||||
image:
|
||||
repository: quay.io/prometheus/prometheus
|
||||
# When digest is set to a non-empty value, images will be pulled by digest (regardless of tag value).
|
||||
digest: "latest"
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
## The URL prefix at which the container can be accessed. Useful in the case the '-web.external-url' includes a slug
|
||||
## so that the various internal URLs are still able to access as they are in the default case.
|
||||
## (Optional)
|
||||
prefixURL: "prom.steffenillium.de"
|
||||
|
||||
## External URL which can access prometheus
|
||||
## Maybe same with Ingress host name
|
||||
baseURL: "metrics.steffenillium.de"
|
||||
|
||||
## Additional server container environment variables
|
||||
##
|
||||
## You specify this manually like you would a raw deployment manifest.
|
||||
## This means you can bind in environment variables from secrets.
|
||||
##
|
||||
## e.g. static environment variable:
|
||||
## - name: DEMO_GREETING
|
||||
## value: "Hello from the environment"
|
||||
##
|
||||
## e.g. secret environment variable:
|
||||
## - name: USERNAME
|
||||
## valueFrom:
|
||||
## secretKeyRef:
|
||||
## name: mysecret
|
||||
## key: username
|
||||
env: []
|
||||
|
||||
extraFlags:
|
||||
- web.enable-lifecycle
|
||||
## web.enable-admin-api flag controls access to the administrative HTTP API which includes functionality such as
|
||||
## deleting time series. This is disabled by default.
|
||||
# - web.enable-admin-api
|
||||
##
|
||||
## storage.tsdb.no-lockfile flag controls BD locking
|
||||
# - storage.tsdb.no-lockfile
|
||||
##
|
||||
## storage.tsdb.wal-compression flag enables compression of the write-ahead log (WAL)
|
||||
# - storage.tsdb.wal-compression
|
||||
|
||||
## Path to a configuration file on prometheus server container FS
|
||||
configPath: /etc/config/prometheus.yml
|
||||
|
||||
global:
|
||||
scrape_interval: 1m
|
||||
scrape_timeout: 10s
|
||||
evaluation_interval: 1m
|
||||
|
||||
ingress:
|
||||
## If true, Prometheus server Ingress will be created
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Server Deployment Strategy type
|
||||
strategy:
|
||||
type: Recreate
|
||||
|
||||
persistentVolume:
|
||||
## If true, Prometheus server will create/use a Persistent Volume Claim
|
||||
## If false, use emptyDir
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## If set it will override the name of the created persistent volume claim
|
||||
## generated by the stateful set.
|
||||
##
|
||||
statefulSetNameOverride: ""
|
||||
|
||||
## Prometheus server data Persistent Volume access modes
|
||||
## Must match those of existing PV or dynamic provisioner
|
||||
## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
|
||||
## Prometheus server data Persistent Volume labels
|
||||
##
|
||||
labels: {}
|
||||
|
||||
## Prometheus server data Persistent Volume annotations
|
||||
##
|
||||
annotations: {}
|
||||
|
||||
## Prometheus server data Persistent Volume existing claim name
|
||||
## Requires server.persistentVolume.enabled: true
|
||||
## If defined, PVC must be created manually before volume will be bound
|
||||
existingClaim: ""
|
||||
|
||||
## Prometheus server data Persistent Volume mount root path
|
||||
##
|
||||
mountPath: /data
|
||||
|
||||
## Prometheus server data Persistent Volume size
|
||||
##
|
||||
size: 8Gi
|
||||
|
||||
## Prometheus server data Persistent Volume Storage Class
|
||||
## If defined, storageClassName: <storageClass>
|
||||
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||
## If undefined (the default) or set to null, no storageClassName spec is
|
||||
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||
## GKE, AWS & OpenStack)
|
||||
##
|
||||
storageClass: "rook-cephfs"
|
||||
|
||||
## Prometheus server data Persistent Volume Binding Mode
|
||||
## If defined, volumeBindingMode: <volumeBindingMode>
|
||||
## If undefined (the default) or set to null, no volumeBindingMode spec is
|
||||
## set, choosing the default mode.
|
||||
##
|
||||
volumeBindingMode: "Filesystem"
|
||||
|
||||
## Subdirectory of Prometheus server data Persistent Volume to mount
|
||||
## Useful if the volume's root directory is not empty
|
||||
##
|
||||
subPath: ""
|
||||
|
||||
|
||||
statefulSet:
|
||||
## If true, use a statefulset instead of a deployment for pod management.
|
||||
## This allows to scale replicas to more than 1 pod
|
||||
##
|
||||
enabled: false
|
||||
|
||||
## Security context to be added to server pods
|
||||
##
|
||||
securityContext:
|
||||
runAsUser: 65534
|
||||
runAsNonRoot: true
|
||||
runAsGroup: 65534
|
||||
fsGroup: 65534
|
||||
|
||||
service:
|
||||
## If false, no Service will be created for the Prometheus server
|
||||
##
|
||||
enabled: true
|
||||
type: ClusterIP
|
||||
|
||||
## Enable gRPC port on service to allow auto discovery with thanos-querier
|
||||
gRPC:
|
||||
enabled: true
|
||||
servicePort: 10901
|
||||
# nodePort: 10901
|
||||
|
||||
## Prometheus server pod termination grace period
|
||||
##
|
||||
terminationGracePeriodSeconds: 300
|
||||
|
||||
## Prometheus data retention period (default if not specified is 15 days)
|
||||
##
|
||||
retention: "90d"
|
||||
|
||||
## Prometheus' data retention size. Supported units: B, KB, MB, GB, TB, PB, EB.
|
||||
##
|
||||
retentionSize: "5GB"
|
||||
|
||||
## Prometheus server ConfigMap entries for rule files (allow prometheus labels interpolation)
|
||||
ruleFiles: {}
|
||||
|
||||
## Prometheus server ConfigMap entries for scrape_config_files
|
||||
## (allows scrape configs defined in additional files)
|
||||
##
|
||||
scrapeConfigFiles: []
|
||||
|
||||
## Prometheus server ConfigMap entries
|
||||
##
|
||||
serverFiles:
|
||||
## Alerts configuration
|
||||
## Ref: https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
|
||||
alerting_rules.yml: {}
|
||||
# groups:
|
||||
# - name: Instances
|
||||
# rules:
|
||||
# - alert: InstanceDown
|
||||
# expr: up == 0
|
||||
# for: 5m
|
||||
# labels:
|
||||
# severity: page
|
||||
# annotations:
|
||||
# description: '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.'
|
||||
# summary: 'Instance {{ $labels.instance }} down'
|
||||
## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use alerting_rules.yml
|
||||
alerts: {}
|
||||
|
||||
## Records configuration
|
||||
## Ref: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/
|
||||
recording_rules.yml: {}
|
||||
## DEPRECATED DEFAULT VALUE, unless explicitly naming your files, please use recording_rules.yml
|
||||
rules: {}
|
||||
|
||||
prometheus.yml:
|
||||
rule_files:
|
||||
- /etc/config/recording_rules.yml
|
||||
- /etc/config/alerting_rules.yml
|
||||
## Below two files are DEPRECATED will be removed from this default values file
|
||||
- /etc/config/rules
|
||||
- /etc/config/alerts
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost:9090
|
||||
|
||||
# A scrape configuration for running Prometheus on a Kubernetes cluster.
|
||||
# This uses separate scrape configs for cluster components (i.e. API server, node)
|
||||
# and services to allow each to use different authentication configs.
|
||||
#
|
||||
# Kubernetes labels will be added as Prometheus labels on metrics via the
|
||||
# `labelmap` relabeling action.
|
||||
|
||||
# Scrape config for API servers.
|
||||
#
|
||||
# Kubernetes exposes API servers as endpoints to the default/kubernetes
|
||||
# service so this uses `endpoints` role and uses relabelling to only keep
|
||||
# the endpoints associated with the default/kubernetes service using the
|
||||
# default named port `https`. This works for single API server deployments as
|
||||
# well as HA API server deployments.
|
||||
- job_name: 'kubernetes-apiservers'
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
|
||||
# Default to scraping over https. If required, just disable this or change to
|
||||
# `http`.
|
||||
scheme: https
|
||||
|
||||
# This TLS & bearer token file config is used to connect to the actual scrape
|
||||
# endpoints for cluster components. This is separate to discovery auth
|
||||
# configuration because discovery & scraping are two separate concerns in
|
||||
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
|
||||
# the cluster. Otherwise, more config options have to be provided within the
|
||||
# <kubernetes_sd_config>.
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
# If your node certificates are self-signed or use a different CA to the
|
||||
# master CA, then disable certificate verification below. Note that
|
||||
# certificate verification is an integral part of a secure infrastructure
|
||||
# so this should only be disabled in a controlled environment. You can
|
||||
# disable certificate verification by uncommenting the line below.
|
||||
#
|
||||
insecure_skip_verify: true
|
||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
# Keep only the default/kubernetes service endpoints for the https port. This
|
||||
# will add targets for each API server which Kubernetes adds an endpoint to
|
||||
# the default/kubernetes service.
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name]
|
||||
action: keep
|
||||
regex: default;kubernetes;https
|
||||
|
||||
- job_name: 'kubernetes-nodes'
|
||||
|
||||
# Default to scraping over https. If required, just disable this or change to
|
||||
# `http`.
|
||||
scheme: https
|
||||
|
||||
# This TLS & bearer token file config is used to connect to the actual scrape
|
||||
# endpoints for cluster components. This is separate to discovery auth
|
||||
# configuration because discovery & scraping are two separate concerns in
|
||||
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
|
||||
# the cluster. Otherwise, more config options have to be provided within the
|
||||
# <kubernetes_sd_config>.
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
# If your node certificates are self-signed or use a different CA to the
|
||||
# master CA, then disable certificate verification below. Note that
|
||||
# certificate verification is an integral part of a secure infrastructure
|
||||
# so this should only be disabled in a controlled environment. You can
|
||||
# disable certificate verification by uncommenting the line below.
|
||||
#
|
||||
insecure_skip_verify: true
|
||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: node
|
||||
|
||||
relabel_configs:
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_node_label_(.+)
|
||||
- target_label: __address__
|
||||
replacement: kubernetes.default.svc:443
|
||||
- source_labels: [__meta_kubernetes_node_name]
|
||||
regex: (.+)
|
||||
target_label: __metrics_path__
|
||||
replacement: /api/v1/nodes/$1/proxy/metrics
|
||||
|
||||
|
||||
- job_name: 'kubernetes-nodes-cadvisor'
|
||||
|
||||
# Default to scraping over https. If required, just disable this or change to
|
||||
# `http`.
|
||||
scheme: https
|
||||
|
||||
# This TLS & bearer token file config is used to connect to the actual scrape
|
||||
# endpoints for cluster components. This is separate to discovery auth
|
||||
# configuration because discovery & scraping are two separate concerns in
|
||||
# Prometheus. The discovery auth config is automatic if Prometheus runs inside
|
||||
# the cluster. Otherwise, more config options have to be provided within the
|
||||
# <kubernetes_sd_config>.
|
||||
tls_config:
|
||||
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
# If your node certificates are self-signed or use a different CA to the
|
||||
# master CA, then disable certificate verification below. Note that
|
||||
# certificate verification is an integral part of a secure infrastructure
|
||||
# so this should only be disabled in a controlled environment. You can
|
||||
# disable certificate verification by uncommenting the line below.
|
||||
#
|
||||
insecure_skip_verify: true
|
||||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: node
|
||||
|
||||
# This configuration will work only on kubelet 1.7.3+
|
||||
# As the scrape endpoints for cAdvisor have changed
|
||||
# if you are using older version you need to change the replacement to
|
||||
# replacement: /api/v1/nodes/$1:4194/proxy/metrics
|
||||
# more info here https://github.com/coreos/prometheus-operator/issues/633
|
||||
relabel_configs:
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_node_label_(.+)
|
||||
- target_label: __address__
|
||||
replacement: kubernetes.default.svc:443
|
||||
- source_labels: [__meta_kubernetes_node_name]
|
||||
regex: (.+)
|
||||
target_label: __metrics_path__
|
||||
replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
|
||||
|
||||
# Metric relabel configs to apply to samples before ingestion.
|
||||
# [Metric Relabeling](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs)
|
||||
# metric_relabel_configs:
|
||||
# - action: labeldrop
|
||||
# regex: (kubernetes_io_hostname|failure_domain_beta_kubernetes_io_region|beta_kubernetes_io_os|beta_kubernetes_io_arch|beta_kubernetes_io_instance_type|failure_domain_beta_kubernetes_io_zone)
|
||||
|
||||
# Scrape config for service endpoints.
|
||||
#
|
||||
# The relabeling allows the actual service scrape endpoint to be configured
|
||||
# via the following annotations:
|
||||
#
|
||||
# * `prometheus.io/scrape`: Only scrape services that have a value of
|
||||
# `true`, except if `prometheus.io/scrape-slow` is set to `true` as well.
|
||||
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
|
||||
# to set this to `https` & most likely set the `tls_config` of the scrape config.
|
||||
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
|
||||
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
|
||||
# service then set this appropriately.
|
||||
# * `prometheus.io/param_<parameter>`: If the metrics endpoint uses parameters
|
||||
# then you can set any parameter
|
||||
- job_name: 'kubernetes-service-endpoints'
|
||||
honor_labels: true
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape]
|
||||
action: keep
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow]
|
||||
action: drop
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
|
||||
action: replace
|
||||
target_label: __scheme__
|
||||
regex: (https?)
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
|
||||
action: replace
|
||||
target_label: __metrics_path__
|
||||
regex: (.+)
|
||||
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
|
||||
action: replace
|
||||
target_label: __address__
|
||||
regex: (.+?)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
|
||||
replacement: __param_$1
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_label_(.+)
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
action: replace
|
||||
target_label: namespace
|
||||
- source_labels: [__meta_kubernetes_service_name]
|
||||
action: replace
|
||||
target_label: service
|
||||
- source_labels: [__meta_kubernetes_pod_node_name]
|
||||
action: replace
|
||||
target_label: node
|
||||
|
||||
# Scrape config for slow service endpoints; same as above, but with a larger
|
||||
# timeout and a larger interval
|
||||
#
|
||||
# The relabeling allows the actual service scrape endpoint to be configured
|
||||
# via the following annotations:
|
||||
#
|
||||
# * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true`
|
||||
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
|
||||
# to set this to `https` & most likely set the `tls_config` of the scrape config.
|
||||
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
|
||||
# * `prometheus.io/port`: If the metrics are exposed on a different port to the
|
||||
# service then set this appropriately.
|
||||
# * `prometheus.io/param_<parameter>`: If the metrics endpoint uses parameters
|
||||
# then you can set any parameter
|
||||
- job_name: 'kubernetes-service-endpoints-slow'
|
||||
honor_labels: true
|
||||
|
||||
scrape_interval: 5m
|
||||
scrape_timeout: 30s
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: endpoints
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape_slow]
|
||||
action: keep
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
|
||||
action: replace
|
||||
target_label: __scheme__
|
||||
regex: (https?)
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
|
||||
action: replace
|
||||
target_label: __metrics_path__
|
||||
regex: (.+)
|
||||
- source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port]
|
||||
action: replace
|
||||
target_label: __address__
|
||||
regex: (.+?)(?::\d+)?;(\d+)
|
||||
replacement: $1:$2
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
|
||||
replacement: __param_$1
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_label_(.+)
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
action: replace
|
||||
target_label: namespace
|
||||
- source_labels: [__meta_kubernetes_service_name]
|
||||
action: replace
|
||||
target_label: service
|
||||
- source_labels: [__meta_kubernetes_pod_node_name]
|
||||
action: replace
|
||||
target_label: node
|
||||
|
||||
- job_name: 'prometheus-pushgateway'
|
||||
honor_labels: true
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: service
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
|
||||
action: keep
|
||||
regex: pushgateway
|
||||
|
||||
# Example scrape config for probing services via the Blackbox Exporter.
|
||||
#
|
||||
# The relabeling allows the actual service scrape endpoint to be configured
|
||||
# via the following annotations:
|
||||
#
|
||||
# * `prometheus.io/probe`: Only probe services that have a value of `true`
|
||||
- job_name: 'kubernetes-services'
|
||||
honor_labels: true
|
||||
|
||||
metrics_path: /probe
|
||||
params:
|
||||
module: [http_2xx]
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: service
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe]
|
||||
action: keep
|
||||
regex: true
|
||||
- source_labels: [__address__]
|
||||
target_label: __param_target
|
||||
- target_label: __address__
|
||||
replacement: blackbox
|
||||
- source_labels: [__param_target]
|
||||
target_label: instance
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_service_label_(.+)
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
target_label: namespace
|
||||
- source_labels: [__meta_kubernetes_service_name]
|
||||
target_label: service
|
||||
|
||||
# Example scrape config for pods
|
||||
#
|
||||
# The relabeling allows the actual pod scrape endpoint to be configured via the
|
||||
# following annotations:
|
||||
#
|
||||
# * `prometheus.io/scrape`: Only scrape pods that have a value of `true`,
|
||||
# except if `prometheus.io/scrape-slow` is set to `true` as well.
|
||||
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
|
||||
# to set this to `https` & most likely set the `tls_config` of the scrape config.
|
||||
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
|
||||
# * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
|
||||
- job_name: 'kubernetes-pods'
|
||||
honor_labels: true
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
|
||||
action: keep
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
|
||||
action: drop
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
|
||||
action: replace
|
||||
regex: (https?)
|
||||
target_label: __scheme__
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
|
||||
action: replace
|
||||
target_label: __metrics_path__
|
||||
regex: (.+)
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip]
|
||||
action: replace
|
||||
regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
|
||||
replacement: '[$2]:$1'
|
||||
target_label: __address__
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip]
|
||||
action: replace
|
||||
regex: (\d+);((([0-9]+?)(\.|$)){4})
|
||||
replacement: $2:$1
|
||||
target_label: __address__
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
|
||||
replacement: __param_$1
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_label_(.+)
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
action: replace
|
||||
target_label: namespace
|
||||
- source_labels: [__meta_kubernetes_pod_name]
|
||||
action: replace
|
||||
target_label: pod
|
||||
- source_labels: [__meta_kubernetes_pod_phase]
|
||||
regex: Pending|Succeeded|Failed|Completed
|
||||
action: drop
|
||||
- source_labels: [__meta_kubernetes_pod_node_name]
|
||||
action: replace
|
||||
target_label: node
|
||||
|
||||
# Example Scrape config for pods which should be scraped slower. An useful example
|
||||
# would be stackriver-exporter which queries an API on every scrape of the pod
|
||||
#
|
||||
# The relabeling allows the actual pod scrape endpoint to be configured via the
|
||||
# following annotations:
|
||||
#
|
||||
# * `prometheus.io/scrape-slow`: Only scrape pods that have a value of `true`
|
||||
# * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
|
||||
# to set this to `https` & most likely set the `tls_config` of the scrape config.
|
||||
# * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
|
||||
# * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
|
||||
- job_name: 'kubernetes-pods-slow'
|
||||
honor_labels: true
|
||||
|
||||
scrape_interval: 5m
|
||||
scrape_timeout: 30s
|
||||
|
||||
kubernetes_sd_configs:
|
||||
- role: pod
|
||||
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape_slow]
|
||||
action: keep
|
||||
regex: true
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scheme]
|
||||
action: replace
|
||||
regex: (https?)
|
||||
target_label: __scheme__
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path]
|
||||
action: replace
|
||||
target_label: __metrics_path__
|
||||
regex: (.+)
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip]
|
||||
action: replace
|
||||
regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
|
||||
replacement: '[$2]:$1'
|
||||
target_label: __address__
|
||||
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip]
|
||||
action: replace
|
||||
regex: (\d+);((([0-9]+?)(\.|$)){4})
|
||||
replacement: $2:$1
|
||||
target_label: __address__
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
|
||||
replacement: __param_$1
|
||||
- action: labelmap
|
||||
regex: __meta_kubernetes_pod_label_(.+)
|
||||
- source_labels: [__meta_kubernetes_namespace]
|
||||
action: replace
|
||||
target_label: namespace
|
||||
- source_labels: [__meta_kubernetes_pod_name]
|
||||
action: replace
|
||||
target_label: pod
|
||||
- source_labels: [__meta_kubernetes_pod_phase]
|
||||
regex: Pending|Succeeded|Failed|Completed
|
||||
action: drop
|
||||
- source_labels: [__meta_kubernetes_pod_node_name]
|
||||
action: replace
|
||||
target_label: node
|
||||
|
||||
# adds additional scrape configs to prometheus.yml
|
||||
# must be a string so you have to add a | after extraScrapeConfigs:
|
||||
# example adds prometheus-blackbox-exporter scrape config
|
||||
extraScrapeConfigs: ""
|
||||
# - job_name: 'prometheus-blackbox-exporter'
|
||||
# metrics_path: /probe
|
||||
# params:
|
||||
# module: [http_2xx]
|
||||
# static_configs:
|
||||
# - targets:
|
||||
# - https://example.com
|
||||
# relabel_configs:
|
||||
# - source_labels: [__address__]
|
||||
# target_label: __param_target
|
||||
# - source_labels: [__param_target]
|
||||
# target_label: instance
|
||||
# - target_label: __address__
|
||||
# replacement: prometheus-blackbox-exporter:9115
|
||||
|
||||
# Adds option to add alert_relabel_configs to avoid duplicate alerts in alertmanager
|
||||
# useful in H/A prometheus with different external labels but the same alerts
|
||||
alertRelabelConfigs: {}
|
||||
# alert_relabel_configs:
|
||||
# - source_labels: [dc]
|
||||
# regex: (.+)\d+
|
||||
# target_label: dc
|
||||
|
||||
networkPolicy:
|
||||
## Enable creation of NetworkPolicy resources.
|
||||
##
|
||||
enabled: false
|
||||
|
||||
# Force namespace of namespaced resources
|
||||
forceNamespace: ""
|
||||
|
||||
# Extra manifests to deploy as an array
|
||||
extraManifests: []
|
||||
# - |
|
||||
# apiVersion: v1
|
||||
# kind: ConfigMap
|
||||
# metadata:
|
||||
# labels:
|
||||
# name: prometheus-extra
|
||||
# data:
|
||||
# extra-data: "value"
|
||||
|
||||
# Configuration of subcharts defined in Chart.yaml
|
||||
|
||||
## alertmanager sub-chart configurable values
|
||||
## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/alertmanager
|
||||
##
|
||||
alertmanager:
|
||||
## If false, alertmanager will not be installed
|
||||
##
|
||||
enabled: false
|
||||
|
||||
persistence:
|
||||
size: 2Gi
|
||||
|
||||
podSecurityContext:
|
||||
runAsUser: 65534
|
||||
runAsNonRoot: true
|
||||
runAsGroup: 65534
|
||||
fsGroup: 65534
|
||||
|
||||
## kube-state-metrics sub-chart configurable values
|
||||
## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics
|
||||
##
|
||||
kube-state-metrics:
|
||||
## If false, kube-state-metrics sub-chart will not be installed
|
||||
##
|
||||
enabled: true
|
||||
|
||||
## prometheus-node-exporter sub-chart configurable values
|
||||
## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-node-exporter
|
||||
##
|
||||
prometheus-node-exporter:
|
||||
## If false, node-exporter will not be installed
|
||||
##
|
||||
enabled: true
|
||||
|
||||
rbac:
|
||||
pspEnabled: false
|
||||
|
||||
containerSecurityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
|
||||
## prometheus-pushgateway sub-chart configurable values
|
||||
## Please see https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-pushgateway
|
||||
##
|
||||
prometheus-pushgateway:
|
||||
## If false, pushgateway will not be installed
|
||||
##
|
||||
enabled: true
|
||||
|
||||
# Optional service annotations
|
||||
serviceAnnotations:
|
||||
prometheus.io/probe: pushgateway
|
Loading…
x
Reference in New Issue
Block a user