Switched to using yaml for wallabag

This commit is contained in:
Marcus Noble 2022-05-07 07:09:29 +00:00
parent 0f4502310e
commit 0ddef03ab8
2 changed files with 181 additions and 124 deletions

View File

@ -1,32 +1,7 @@
# apiVersion: argoproj.io/v1alpha1
# kind: Application
# metadata:
# name: wallabag
# namespace: argocd
# finalizers:
# - resources-finalizer.argocd.argoproj.io
# spec:
# project: cluster.fun
# destination:
# namespace: wallabag
# name: cluster-fun (scaleway)
# source:
# path: manifests/wallabag
# repoURL: "https://git.cluster.fun/AverageMarcus/cluster.fun.git"
# targetRevision: HEAD
# syncPolicy:
# syncOptions:
# - CreateNamespace=true
# automated: {}
# ignoreDifferences:
# - kind: Secret
# jsonPointers:
# - /data
# ---
apiVersion: argoproj.io/v1alpha1 apiVersion: argoproj.io/v1alpha1
kind: Application kind: Application
metadata: metadata:
name: wallabag-chart name: wallabag
namespace: argocd namespace: argocd
finalizers: finalizers:
- resources-finalizer.argocd.argoproj.io - resources-finalizer.argocd.argoproj.io
@ -36,56 +11,81 @@ spec:
namespace: wallabag namespace: wallabag
name: cluster-fun (scaleway) name: cluster-fun (scaleway)
source: source:
repoURL: 'https://k8s-at-home.com/charts/' path: manifests/wallabag
targetRevision: 4.1.1 repoURL: "https://git.cluster.fun/AverageMarcus/cluster.fun.git"
chart: wallabag targetRevision: HEAD
helm:
version: v3
values: |-
env:
TZ: UTC
MYSQL_ROOT_PASSWORD: wallabag-rootpass
SYMFONY__ENV__DOMAIN_NAME: https://wallabag.cluster.fun
SYMFONY__ENV__FOSUSER_REGISTRATION: false
SYMFONY__ENV__DATABASE_DRIVER: pdo_mysql
SYMFONY__ENV__DATABASE_DRIVER_CLASS: ~
SYMFONY__ENV__DATABASE_HOST: wallabag-chart-mariadb.wallabag.svc
SYMFONY__ENV__DATABASE_PORT: 3306
SYMFONY__ENV__DATABASE_NAME: wallabag
SYMFONY__ENV__DATABASE_USER: wallabag
SYMFONY__ENV__DATABASE_PASSWORD: wallabag-pass
SYMFONY__ENV__DATABASE_PATH: ~
SYMFONY__ENV__DATABASE_TABLE_PREFIX: wallabag_
SYMFONY__ENV__DATABASE_SOCKET: ~
SYMFONY__ENV__DATABASE_CHARSET: utf8mb4
SYMFONY__ENV__LOCALE: en
ingress:
main:
enabled: true
annotations:
cert-manager.io/cluster-issuer: letsencrypt
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
tls:
- hosts:
- wallabag.cluster.fun
secretName: wallabag-ingress
hosts:
- host: wallabag.cluster.fun
paths:
- path: /
pathType: ImplementationSpecific
mariadb:
enabled: true
architecture: standalone
auth:
database: wallabag
username: wallabag
password: wallabag-pass
rootPassword: wallabag-rootpass
primary:
persistence:
enabled: true
redis:
enabled: false
syncPolicy: syncPolicy:
syncOptions:
- CreateNamespace=true
automated: {} automated: {}
ignoreDifferences:
- kind: Secret
jsonPointers:
- /data
# ---
# apiVersion: argoproj.io/v1alpha1
# kind: Application
# metadata:
# name: wallabag-chart
# namespace: argocd
# finalizers:
# - resources-finalizer.argocd.argoproj.io
# spec:
# project: cluster.fun
# destination:
# namespace: wallabag
# name: cluster-fun (scaleway)
# source:
# repoURL: 'https://k8s-at-home.com/charts/'
# targetRevision: 4.1.1
# chart: wallabag
# helm:
# version: v3
# values: |-
# env:
# TZ: UTC
# MYSQL_ROOT_PASSWORD: wallabag-rootpass
# SYMFONY__ENV__DOMAIN_NAME: https://wallabag.cluster.fun
# SYMFONY__ENV__FOSUSER_REGISTRATION: false
# SYMFONY__ENV__DATABASE_DRIVER: pdo_mysql
# SYMFONY__ENV__DATABASE_DRIVER_CLASS: ~
# SYMFONY__ENV__DATABASE_HOST: wallabag-chart-mariadb.wallabag.svc
# SYMFONY__ENV__DATABASE_PORT: 3306
# SYMFONY__ENV__DATABASE_NAME: wallabag
# SYMFONY__ENV__DATABASE_USER: wallabag
# SYMFONY__ENV__DATABASE_PASSWORD: wallabag-pass
# SYMFONY__ENV__DATABASE_PATH: ~
# SYMFONY__ENV__DATABASE_TABLE_PREFIX: wallabag_
# SYMFONY__ENV__DATABASE_SOCKET: ~
# SYMFONY__ENV__DATABASE_CHARSET: utf8mb4
# SYMFONY__ENV__LOCALE: en
# ingress:
# main:
# enabled: true
# annotations:
# cert-manager.io/cluster-issuer: letsencrypt
# nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
# tls:
# - hosts:
# - wallabag.cluster.fun
# secretName: wallabag-ingress
# hosts:
# - host: wallabag.cluster.fun
# paths:
# - path: /
# pathType: ImplementationSpecific
# mariadb:
# enabled: true
# architecture: standalone
# auth:
# database: wallabag
# username: wallabag
# password: wallabag-pass
# rootPassword: wallabag-rootpass
# primary:
# persistence:
# enabled: true
# redis:
# enabled: false
# syncPolicy:
# automated: {}

View File

@ -1,68 +1,125 @@
apiVersion: v1 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 kind: Service
metadata: metadata:
name: wallabag-deps name: wallabag
namespace: wallabag namespace: wallabag
labels:
app.kubernetes.io/name: wallabag
annotations:
spec: spec:
type: ClusterIP type: ClusterIP
ports: ports:
- port: 5432 - port: 80
targetPort: db targetPort: http
name: db protocol: TCP
- port: 6379 name: http
targetPort: redis
name: redis
selector: selector:
app: wallabag-deps app.kubernetes.io/name: wallabag
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: Deployment
metadata: metadata:
name: wallabag-deps name: wallabag
namespace: wallabag namespace: wallabag
labels:
app.kubernetes.io/name: wallabag
spec: spec:
revisionHistoryLimit: 3
replicas: 0
strategy:
type: Recreate
selector: selector:
matchLabels: matchLabels:
app: wallabag-deps app.kubernetes.io/name: wallabag
serviceName: wallabag-deps
replicas: 1
template: template:
metadata: metadata:
labels: labels:
app: wallabag-deps app.kubernetes.io/name: wallabag
spec: spec:
containers: containers:
- name: postgres - name: wallabag
image: postgres:9-alpine image: "wallabag/wallabag:2.4.2"
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: envFrom:
- containerPort: 5432 - secretRef:
name: db name: wallabag
env: env:
- name: POSTGRES_USER - name: "SYMFONY__ENV__DATABASE_CHARSET"
value: user value: "utf8mb4"
- name: POSTGRES_PASSWORD - name: "SYMFONY__ENV__DATABASE_DRIVER"
value: pass value: "pdo_pgsql"
- name: POSTGRES_DB - name: "SYMFONY__ENV__DATABASE_NAME"
value: wallabag value: "wallabag"
- name: PGDATA - name: "SYMFONY__ENV__DATABASE_TABLE_PREFIX"
value: /var/lib/postgresql/data/wallabag value: "wallabag_"
volumeMounts: - name: "SYMFONY__ENV__DOMAIN_NAME"
- name: data value: "https://wallabag.cluster.fun"
mountPath: /var/lib/postgresql/data - name: "SYMFONY__ENV__FOSUSER_REGISTRATION"
- name: redis value: "false"
image: redis:6 - name: "SYMFONY__ENV__LOCALE"
imagePullPolicy: IfNotPresent value: "en"
ports: - name: "TZ"
- containerPort: 6379 value: "UTC"
name: redis ports:
volumeClaimTemplates: - name: http
- metadata: containerPort: 80
name: data protocol: TCP
spec: livenessProbe:
accessModes: tcpSocket:
- ReadWriteOnce port: 80
resources: initialDelaySeconds: 0
requests: failureThreshold: 3
storage: 5Gi 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