205 lines
5.3 KiB
YAML
205 lines
5.3 KiB
YAML
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: wallabag
|
|
namespace: wallabag
|
|
annotations:
|
|
kube-1password: 4yogl6yx6t4trrkq7o35tiyj6i
|
|
kube-1password/vault: Kubernetes
|
|
kube-1password/secret-text-parse: "true"
|
|
type: Opaque
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: wallabag
|
|
namespace: wallabag
|
|
labels:
|
|
app.kubernetes.io/name: wallabag
|
|
annotations:
|
|
spec:
|
|
type: ClusterIP
|
|
ports:
|
|
- port: 80
|
|
targetPort: http
|
|
protocol: TCP
|
|
name: http
|
|
selector:
|
|
app.kubernetes.io/name: wallabag
|
|
---
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: wallabag
|
|
namespace: wallabag
|
|
labels:
|
|
app.kubernetes.io/name: wallabag-init
|
|
spec:
|
|
suspend: true
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: wallabag-init
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: db-init
|
|
image: "wallabag/wallabag:latest"
|
|
imagePullPolicy: IfNotPresent
|
|
envFrom:
|
|
- secretRef:
|
|
name: wallabag
|
|
env:
|
|
- name: "SYMFONY__ENV__DATABASE_CHARSET"
|
|
value: "utf8"
|
|
- name: "SYMFONY__ENV__DATABASE_DRIVER"
|
|
value: "pdo_pgsql"
|
|
- name: "SYMFONY__ENV__DATABASE_NAME"
|
|
value: "wallabag"
|
|
- name: "SYMFONY__ENV__DATABASE_TABLE_PREFIX"
|
|
value: "wallabag_"
|
|
- name: "SYMFONY__ENV__DOMAIN_NAME"
|
|
value: "https://wallabag.cluster.fun"
|
|
- name: "SYMFONY__ENV__FOSUSER_REGISTRATION"
|
|
value: "false"
|
|
- name: "SYMFONY__ENV__LOCALE"
|
|
value: "en"
|
|
- name: "TZ"
|
|
value: "UTC"
|
|
command:
|
|
- /var/www/wallabag/bin/console
|
|
- wallabag:install
|
|
- --env=prod
|
|
- --no-interaction
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: wallabag
|
|
namespace: wallabag
|
|
labels:
|
|
app.kubernetes.io/name: wallabag
|
|
spec:
|
|
revisionHistoryLimit: 3
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: wallabag
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: wallabag
|
|
spec:
|
|
initContainers:
|
|
- name: db-migrate
|
|
image: "wallabag/wallabag:2.6.9"
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- /var/www/wallabag/bin/console
|
|
- doctrine:migrations:migrate
|
|
- --env=prod
|
|
- --no-interaction
|
|
envFrom:
|
|
- secretRef:
|
|
name: wallabag
|
|
env:
|
|
- name: "SYMFONY__ENV__DATABASE_CHARSET"
|
|
value: "utf8"
|
|
- name: "SYMFONY__ENV__DATABASE_DRIVER"
|
|
value: "pdo_pgsql"
|
|
- name: "SYMFONY__ENV__DATABASE_NAME"
|
|
value: "wallabag"
|
|
- name: "SYMFONY__ENV__DATABASE_TABLE_PREFIX"
|
|
value: "wallabag_"
|
|
- name: "SYMFONY__ENV__DOMAIN_NAME"
|
|
value: "https://wallabag.cluster.fun"
|
|
- name: "SYMFONY__ENV__FOSUSER_REGISTRATION"
|
|
value: "false"
|
|
- name: "SYMFONY__ENV__LOCALE"
|
|
value: "en"
|
|
- name: "TZ"
|
|
value: "UTC"
|
|
- name: "POPULATE_DATABASE"
|
|
value: "false"
|
|
containers:
|
|
- name: wallabag
|
|
image: "wallabag/wallabag:2.6.9"
|
|
imagePullPolicy: IfNotPresent
|
|
envFrom:
|
|
- secretRef:
|
|
name: wallabag
|
|
env:
|
|
- name: "SYMFONY__ENV__DATABASE_CHARSET"
|
|
value: "utf8"
|
|
- name: "SYMFONY__ENV__DATABASE_DRIVER"
|
|
value: "pdo_pgsql"
|
|
- name: "SYMFONY__ENV__DATABASE_NAME"
|
|
value: "wallabag"
|
|
- name: "SYMFONY__ENV__DATABASE_TABLE_PREFIX"
|
|
value: "wallabag_"
|
|
- name: "SYMFONY__ENV__DOMAIN_NAME"
|
|
value: "https://wallabag.cluster.fun"
|
|
- name: "SYMFONY__ENV__FOSUSER_REGISTRATION"
|
|
value: "false"
|
|
- name: "SYMFONY__ENV__LOCALE"
|
|
value: "en"
|
|
- name: "TZ"
|
|
value: "UTC"
|
|
- name: "POPULATE_DATABASE"
|
|
value: "false"
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: 80
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 3
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 80
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 3
|
|
timeoutSeconds: 1
|
|
periodSeconds: 10
|
|
startupProbe:
|
|
tcpSocket:
|
|
port: 80
|
|
initialDelaySeconds: 0
|
|
failureThreshold: 30
|
|
timeoutSeconds: 1
|
|
periodSeconds: 5
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: wallabag
|
|
namespace: wallabag
|
|
labels:
|
|
app.kubernetes.io/name: wallabag
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt
|
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- "wallabag.cluster.fun"
|
|
secretName: "wallabag-ingress"
|
|
rules:
|
|
- host: "wallabag.cluster.fun"
|
|
http:
|
|
paths:
|
|
- path: "/"
|
|
pathType: ImplementationSpecific
|
|
backend:
|
|
service:
|
|
name: wallabag
|
|
port:
|
|
number: 80
|