Skip to content

Commit

Permalink
apps/paperless: increse psql PVC size and format code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Dec 4, 2023
1 parent ba31501 commit 3da68c3
Show file tree
Hide file tree
Showing 22 changed files with 243 additions and 258 deletions.
22 changes: 6 additions & 16 deletions apps/paperless/jsonnet/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"subdir": "grafonnet"
}
},
"version": "6db00c292d3a1c71661fc875f90e0ec7caa538c2",
"sum": "gF8foHByYcB25jcUOBqP6jxk0OPifQMjPvKY0HaCk6w="
"version": "a1d61cce1da59c71409b99b5c7568511fec661ea",
"sum": "342u++/7rViR/zj2jeJOjshzglkZ1SY+hFNuyCBFMdc="
},
{
"source": {
Expand All @@ -26,8 +26,8 @@
"subdir": "grafana-builder"
}
},
"version": "9e9d5cddd4f02a25b9dec09a5910878a8ba8e045",
"sum": "TieGrr7GyKjURk1+wXHFpdoCiwNaIVfZvyc5mbI9OM0="
"version": "931f6b1139bb3694b06f2261279ba3dc01aca5b8",
"sum": "VmOxvg9FuY9UYr3lN6ZJe2HhuIErJoWimPybQr3S3yQ="
},
{
"source": {
Expand All @@ -36,18 +36,8 @@
"subdir": ""
}
},
"version": "3422a511bf8f645e3e684632785b27864ee5dc0c",
"sum": "tpgokDM1s/6CL4p+tlq3Nu54r62/kPfGnLUKRgYIC4k="
},
{
"source": {
"git": {
"remote": "https://github.com/prometheus-community/postgres_exporter.git",
"subdir": "postgres_mixin"
}
},
"version": "1b492a6c59d7967112e53a71a45fb9127f025206",
"sum": "H+okh0mBSyJSyvkCadCXck1ouZUhdokidsoDGA9h25c="
"version": "2dbe4f9625a811b8b89f0495e74509c74779da82",
"sum": "Fe7bN9E6qeKNUdENjQvYttgf4S1DDqXRVB80wdmQgHQ="
},
{
"source": {
Expand Down
12 changes: 6 additions & 6 deletions apps/paperless/manifests/broker/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ metadata:
spec:
clusterIP: None
ports:
- name: redis
port: 6379
targetPort: redis
- name: metrics
port: 9121
targetPort: metrics
- name: redis
port: 6379
targetPort: redis
- name: metrics
port: 9121
targetPort: metrics
selector:
app.kubernetes.io/component: broker
app.kubernetes.io/name: redis
4 changes: 2 additions & 2 deletions apps/paperless/manifests/broker/serviceMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ metadata:
namespace: paperless
spec:
endpoints:
- interval: 30s
port: metrics
- interval: 30s
port: metrics
selector:
matchLabels:
app.kubernetes.io/component: broker
Expand Down
82 changes: 41 additions & 41 deletions apps/paperless/manifests/broker/statefulSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,50 +24,50 @@ spec:
app.kubernetes.io/version: "6.0"
spec:
containers:
- image: redis:6.0
name: redis
ports:
- containerPort: 6379
- image: redis:6.0
name: redis
resources:
limits:
cpu: 20m
memory: 30Mi
requests:
cpu: 4m
memory: 7Mi
securityContext:
privileged: false
volumeMounts:
- mountPath: /data
name: broker-data
- args:
- --redis.addr
- 127.0.0.1
image: oliver006/redis_exporter:latest
name: exporter
ports:
- containerPort: 9121
name: metrics
resources:
limits:
memory: 20Mi
requests:
cpu: 2m
memory: 13Mi
securityContext:
privileged: false
ports:
- containerPort: 6379
name: redis
resources:
limits:
cpu: 20m
memory: 30Mi
requests:
cpu: 4m
memory: 7Mi
securityContext:
privileged: false
volumeMounts:
- mountPath: /data
name: broker-data
- args:
- --redis.addr
- 127.0.0.1
image: oliver006/redis_exporter:latest
name: exporter
ports:
- containerPort: 9121
name: metrics
resources:
limits:
memory: 20Mi
requests:
cpu: 2m
memory: 13Mi
securityContext:
privileged: false
nodeSelector:
kubernetes.io/arch: amd64
restartPolicy: Always
serviceAccountName: redis
volumeClaimTemplates:
- metadata:
name: broker-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 300Mi
storageClassName: qnap-nfs
- metadata:
name: broker-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 300Mi
storageClassName: qnap-nfs
2 changes: 1 addition & 1 deletion apps/paperless/manifests/postgres/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
cpu: 50m
memory: 200Mi
storage:
size: 2Gi
size: 4Gi
storageClass: lvm-secondary
superuserSecret:
name: postgres-admin
6 changes: 3 additions & 3 deletions apps/paperless/manifests/postgres/credentialsAdmin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ metadata:
namespace: paperless
spec:
data:
- remoteRef:
key: PAPERLESS_DB_ADMIN_PASS
secretKey: password
- remoteRef:
key: PAPERLESS_DB_ADMIN_PASS
secretKey: password
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
Expand Down
12 changes: 6 additions & 6 deletions apps/paperless/manifests/postgres/credentialsBackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ metadata:
namespace: paperless
spec:
data:
- remoteRef:
key: POSTGRES_S3_ACCESS_KEY
secretKey: S3_ACCESS_KEY
- remoteRef:
key: POSTGRES_S3_SECRET_KEY
secretKey: S3_SECRET_KEY
- remoteRef:
key: POSTGRES_S3_ACCESS_KEY
secretKey: S3_ACCESS_KEY
- remoteRef:
key: POSTGRES_S3_SECRET_KEY
secretKey: S3_SECRET_KEY
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
Expand Down
6 changes: 3 additions & 3 deletions apps/paperless/manifests/postgres/credentialsUser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ metadata:
namespace: paperless
spec:
data:
- remoteRef:
key: PAPERLESS_DB_PASS
secretKey: password
- remoteRef:
key: PAPERLESS_DB_PASS
secretKey: password
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
Expand Down
86 changes: 43 additions & 43 deletions apps/paperless/manifests/web/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,51 @@ spec:
app.kubernetes.io/version: 1.17.4
spec:
containers:
- args:
- --use-folder-prefix
- --zip
- --no-color
- --skip-checks
- /mnt/backups
command:
- /usr/local/bin/document_exporter
env: []
envFrom:
- configMapRef:
name: paperless-config
- secretRef:
name: paperless-secrets
- secretRef:
name: paperless-db
image: ghcr.io/paperless-ngx/paperless-ngx:1.17.4
name: backup
ports: []
resources: {}
securityContext:
privileged: false
volumeMounts:
- mountPath: /usr/src/paperless/data
name: data
- mountPath: /usr/src/paperless/media
name: media
- mountPath: /usr/src/paperless/consume
name: consume
- mountPath: /mnt/backups
name: backups
- args:
- --use-folder-prefix
- --zip
- --no-color
- --skip-checks
- /mnt/backups
command:
- /usr/local/bin/document_exporter
env: []
envFrom:
- configMapRef:
name: paperless-config
- secretRef:
name: paperless-secrets
- secretRef:
name: paperless-db
image: ghcr.io/paperless-ngx/paperless-ngx:1.17.4
name: backup
ports: []
resources: {}
securityContext:
privileged: false
volumeMounts:
- mountPath: /usr/src/paperless/data
name: data
- mountPath: /usr/src/paperless/media
name: media
- mountPath: /usr/src/paperless/consume
name: consume
- mountPath: /mnt/backups
name: backups
restartPolicy: Never
serviceAccountName: paperless
volumes:
- name: data
persistentVolumeClaim:
claimName: data
- name: media
persistentVolumeClaim:
claimName: media
- name: consume
persistentVolumeClaim:
claimName: consume
- name: backups
persistentVolumeClaim:
claimName: backups
- name: data
persistentVolumeClaim:
claimName: data
- name: media
persistentVolumeClaim:
claimName: media
- name: consume
persistentVolumeClaim:
claimName: consume
- name: backups
persistentVolumeClaim:
claimName: backups
schedule: 36 22 * * *
successfulJobsHistoryLimit: 1
12 changes: 6 additions & 6 deletions apps/paperless/manifests/web/databaseSecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ metadata:
namespace: paperless
spec:
data:
- remoteRef:
key: PAPERLESS_DB_PASS
secretKey: PAPERLESS_DBPASS
- remoteRef:
key: PAPERLESS_DB_USER
secretKey: PAPERLESS_DBUSER
- remoteRef:
key: PAPERLESS_DB_PASS
secretKey: PAPERLESS_DBPASS
- remoteRef:
key: PAPERLESS_DB_USER
secretKey: PAPERLESS_DBUSER
refreshInterval: 1h
secretStoreRef:
kind: ClusterSecretStore
Expand Down
26 changes: 13 additions & 13 deletions apps/paperless/manifests/web/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ metadata:
spec:
ingressClassName: traefik
rules:
- host: papers.krupa.net.pl
http:
paths:
- backend:
service:
name: paperless
port:
name: http
path: /
pathType: Prefix
- host: papers.krupa.net.pl
http:
paths:
- backend:
service:
name: paperless
port:
name: http
path: /
pathType: Prefix
tls:
- hosts:
- papers.krupa.net.pl
secretName: paperless-tls
- hosts:
- papers.krupa.net.pl
secretName: paperless-tls
8 changes: 4 additions & 4 deletions apps/paperless/manifests/web/podMonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ metadata:
namespace: paperless
spec:
podMetricsEndpoints:
- interval: 30s
path: /metrics
port: metrics
scheme: http
- interval: 30s
path: /metrics
port: metrics
scheme: http
selector:
matchLabels:
app.kubernetes.io/component: webservice
Expand Down
Loading

0 comments on commit 3da68c3

Please sign in to comment.