Skip to content

Commit

Permalink
Update miniflux to use cnpg
Browse files Browse the repository at this point in the history
Can't use cockroachdb because of lack of `setweight`.
See: cockroachdb/cockroach#41288
  • Loading branch information
ansg191 committed Nov 19, 2024
1 parent 4378791 commit 9eeb6cf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 52 deletions.
2 changes: 1 addition & 1 deletion k8s/miniflux-ai/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
app: miniflux-ai
spec:
replicas: 1
replicas: 0
selector:
matchLabels:
app: miniflux-ai
Expand Down
1 change: 1 addition & 0 deletions k8s/miniflux/backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: CronJob
metadata:
name: miniflux-backup
spec:
suspend: true
schedule: "0 22 * * *"
concurrencyPolicy: Forbid
jobTemplate:
Expand Down
33 changes: 10 additions & 23 deletions k8s/miniflux/database.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
apiVersion: crdb.cockroachlabs.com/v1alpha1
kind: CrdbCluster
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: cockroachdb
name: miniflux-cluster
spec:
dataStore:
pvc:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "8Gi"
volumeMode: Filesystem
resources:
requests:
cpu: 100m
memory: 512Mi
limits:
cpu: 500m
memory: 1Gi
tlsEnabled: true
image:
name: cockroachdb/cockroach:v24.2.5
nodes: 3
instances: 3
bootstrap:
initdb:
database: miniflux
owner: miniflux
storage:
size: 8Gi
31 changes: 3 additions & 28 deletions k8s/miniflux/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
app: miniflux
spec:
replicas: 2
replicas: 0
selector:
matchLabels:
app: miniflux
Expand All @@ -27,8 +27,8 @@ spec:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
key: databaseUrl
name: miniflux-secret
key: uri
name: miniflux-cluster-app
# - name: RUN_MIGRATIONS
# value: "1"
# - name: CREATE_ADMIN
Expand Down Expand Up @@ -72,32 +72,7 @@ spec:
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
volumeMounts:
- mountPath: /cockroach/cockroach-certs/
name: client-certs
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
restartPolicy: Always
serviceAccountName: cockroachdb-sa
volumes:
- name: client-certs
projected:
sources:
- secret:
name: cockroachdb-node
items:
- key: ca.crt
path: ca.crt
- secret:
name: cockroachdb-root
items:
- key: tls.crt
path: client.root.crt
- key: tls.key
path: client.root.key
defaultMode: 0640
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
Expand Down

0 comments on commit 9eeb6cf

Please sign in to comment.