Compare commits
2 commits
0520089133
...
c9a9ac641a
Author | SHA1 | Date | |
---|---|---|---|
c9a9ac641a | |||
8dcbe4fbe3 |
11 changed files with 25 additions and 444 deletions
|
@ -55,3 +55,8 @@ helmApps:
|
|||
repoURL: https://nextcloud.github.io/helm/
|
||||
chart: nextcloud
|
||||
revision: 3.5.17
|
||||
- app: wallabag
|
||||
namespace: wallabag
|
||||
repoURL: https://k8s-at-home.com/charts/
|
||||
chart: wallabag
|
||||
revision: 7.1.2
|
||||
|
|
|
@ -1,4 +1,24 @@
|
|||
---
|
||||
name: miniflux
|
||||
namespace: miniflux
|
||||
serviceAccountName: miniflux
|
||||
externalSecrets:
|
||||
secretStoreName: wallabag
|
||||
vaultRole: wallabag
|
||||
secretPaths:
|
||||
- name: wallabag
|
||||
secrets:
|
||||
- secretKey: db_pw
|
||||
key: wallabag
|
||||
property: db_pw
|
||||
|
||||
istio:
|
||||
commonName: wallabag.minhas.io
|
||||
ingressSelector: ingressgateway
|
||||
issuer: letsencrypt-prod
|
||||
port: 80
|
||||
backendHost: wallabag
|
||||
|
||||
image:
|
||||
tag: 2.5.1
|
||||
env:
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: kubernetes.io/service-account-token
|
||||
metadata:
|
||||
name: serviceaccounttoken
|
||||
namespace: nextcloud
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: "nextcloud"
|
||||
...
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: nextcloud-tokenreview-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:auth-delegator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: nextcloud
|
||||
namespace: nextcloud
|
||||
...
|
||||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: SecretStore
|
||||
metadata:
|
||||
name: nextcloud
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
provider:
|
||||
vault:
|
||||
server: "https://vault.service.masked.name:8200"
|
||||
path: "kv"
|
||||
version: "v2"
|
||||
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUROVENDQWgyZ0F3SUJBZ0lVWXA4eG81dDJsSkZQM1NpRDFmSmlyZ0dVUUowd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0ZqRVVNQklHQTFVRUF4TUxiV0Z6YTJWa0xtNWhiV1V3SGhjTk1qQXdPREk1TVRreU16RXlXaGNOTXpBdwpPREkzTVRreU16UXlXakFXTVJRd0VnWURWUVFERXd0dFlYTnJaV1F1Ym1GdFpUQ0NBU0l3RFFZSktvWklodmNOCkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFNSTdvUitLSHZ2em5mbmFBWERNTzVxcFNUQ0FZQ3lmakZFb2hZSmYKbE9jbkxPTlhiM2Y2c1A1ZDFlbHRMK1VUcTBSVlU1VVAwYU5XN2hxRFRhNDFNUncwSkNEdEI2OHlLZFlxMmhaZgo5N2dBK2xqM01FSlU2UlRBS0xyZzc1R1JoL0FiTkVJZ3d2UHVIS1c2aE1idHdPeU05REZVLy9XM3hwdXNhbFh5ClJNRnpBSGZTRGo5Y2krVXlnVXQ5SElOV2QvU21NR0cvOFBnaGFSaGZFNDR3UkZNcVllemVsaUl0MkpJczQzQlYKN0hxRzBPZXY5V1BlWG1pYVpVWUtRZXRIaVFxUjE0TXhpdjFJR3pDbXd3Tis5YjR0WnRaVGE1OG9NNWRQWGZiYgpsckVMUUU1T3NQYU50TXRFUjNNZ3hvdkROM1ZTQ0dIL08vR3lhRVdWYW5ZNVVGOENBd0VBQWFON01Ia3dEZ1lEClZSMFBBUUgvQkFRREFnRUdNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdIUVlEVlIwT0JCWUVGQlk4alczZkRWVXAKVVJ0MXByaG1ETWprVmlrZ01COEdBMVVk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lhkUDBjRHlsejBRenFNCkFQblFZTitpc21rb2xqaGs5ZXkwUWJvM0NtUGpNK1VRY0F4dVpRdEE0TStyaUMxK2prdWRlMXVZTDBzekM2WTkKNEtldGZ2Yk5rZWRTYVY1eUphUktDQmhSY0M0L0dqcEJHL29kUS81QWZCUEFGalpxaGNJSldCclZZYlRRVkM3OQpoTUExaXdXSlBtVDlMc2pNU1VmeEZUUHp4Um5OWFFpS0Z6NWtUMk9pUzFucWg4YU9jeVU5WUM5Mjhwa2lmTkpWCktva3VEZXpKRk03aWUzZCtFY0JrMVY5bEh3T1dkdG89Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
||||
auth:
|
||||
kubernetes:
|
||||
mountPath: "k8s-teapot"
|
||||
role: "nextcloud"
|
||||
secretRef:
|
||||
name: "serviceaccounttoken"
|
||||
...
|
||||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: nextcloud
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: nextcloud
|
||||
kind: SecretStore
|
||||
data:
|
||||
- secretKey: username
|
||||
remoteRef:
|
||||
key: nextcloud
|
||||
property: username
|
||||
- secretKey: password
|
||||
remoteRef:
|
||||
key: nextcloud
|
||||
property: password
|
||||
- secretKey: db_username
|
||||
remoteRef:
|
||||
key: nextcloud
|
||||
property: db_username
|
||||
- secretKey: db_password
|
||||
remoteRef:
|
||||
key: nextcloud
|
||||
property: db_password
|
||||
- secretKey: serverinfo_token
|
||||
remoteRef:
|
||||
key: nextcloud
|
||||
property: serverinfo_token
|
||||
...
|
|
@ -1,39 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
CHART_VERSION=3.3.6
|
||||
NAMESPACE=nextcloud
|
||||
VAULT_AUTH_NAMESPACE="k8s-teapot"
|
||||
|
||||
helm repo add nextcloud https://nextcloud.github.io/helm/
|
||||
helm repo update
|
||||
|
||||
kubectl create ns nextcloud
|
||||
kubectl create serviceaccount -n ${NAMESPACE} nextcloud
|
||||
cat << EOH > nextcloud.hcl
|
||||
path "kv/data/nextcloud" {
|
||||
capabilities = ["read"]
|
||||
}
|
||||
EOH
|
||||
vault policy write nextcloud nextcloud.hcl
|
||||
rm nextcloud.hcl
|
||||
HOST_IP=$(ip addr show eth0 | grep -Po 'inet \K[\d.]+')
|
||||
TOKEN="$(kubectl get secret serviceaccounttoken -n nextcloud -o go-template='{{ .data.token }}' | base64 -d)"
|
||||
|
||||
vault write auth/${VAULT_AUTH_NAMESPACE}/role/nextcloud \
|
||||
bound_service_account_names=nextcloud \
|
||||
bound_service_account_namespaces=nextcloud \
|
||||
policies=nextcloud \
|
||||
ttl=24h
|
||||
|
||||
vault write auth/${VAULT_AUTH_NAMESPACE}/login role=nextcloud jwt=${TOKEN} iss=https://${HOST_IP}:6443
|
||||
|
||||
kubectl apply -n ${NAMESPACE} -f external-secrets.yaml
|
||||
kubectl apply -n ${NAMESPACE} -f pvc.yaml
|
||||
|
||||
helm upgrade --install \
|
||||
nextcloud \
|
||||
nextcloud/nextcloud \
|
||||
-f values.yaml \
|
||||
-n ${NAMESPACE} \
|
||||
--version ${CHART_VERSION} \
|
||||
--cleanup-on-fail
|
|
@ -1,65 +0,0 @@
|
|||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: nextcloud-cert
|
||||
namespace: istio-system
|
||||
spec:
|
||||
secretName: nextcloud-cert
|
||||
commonName: nextcloud.minhas.io
|
||||
dnsNames:
|
||||
- nextcloud.minhas.io
|
||||
issuerRef:
|
||||
name: letsencrypt-prod
|
||||
kind: ClusterIssuer
|
||||
group: cert-manager.io
|
||||
...
|
||||
---
|
||||
apiVersion: networking.istio.io/v1beta1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: nextcloud-gateway
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
selector:
|
||||
istio: ingressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 443
|
||||
name: https
|
||||
protocol: HTTPS
|
||||
tls:
|
||||
mode: SIMPLE
|
||||
credentialName: nextcloud-cert
|
||||
hosts:
|
||||
- nextcloud.minhas.io
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
tls:
|
||||
httpsRedirect: true
|
||||
hosts:
|
||||
- nextcloud.minhas.io
|
||||
...
|
||||
---
|
||||
apiVersion: networking.istio.io/v1beta1
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: nextcloud-gateway
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
hosts:
|
||||
- nextcloud.minhas.io
|
||||
gateways:
|
||||
- nextcloud-gateway
|
||||
http:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
host: nextcloud
|
||||
...
|
|
@ -1,53 +0,0 @@
|
|||
---
|
||||
image:
|
||||
flavor: fpm
|
||||
nextcloud:
|
||||
host: nextcloud.minhas.io
|
||||
update: 1
|
||||
existingSecret:
|
||||
enabled: true
|
||||
secretName: nextcloud
|
||||
usernameKey: username
|
||||
passwordKey: password
|
||||
tokenKey: serverinfo_token
|
||||
containerPort: 80
|
||||
datadir: /var/www/html/data
|
||||
defaultConfigs:
|
||||
redis.config.php: false
|
||||
smtp.config.php: false
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
replicaCount: 1
|
||||
persistence:
|
||||
enabled: true
|
||||
existingClaim: "nextcloud"
|
||||
|
||||
internalDatabase:
|
||||
enabled: false
|
||||
|
||||
externalDatabase:
|
||||
type: postgresql
|
||||
host: sedan.minhas.io
|
||||
existingSecret:
|
||||
enabled: true
|
||||
secretName: nextcloud
|
||||
usernameKey: db_username
|
||||
passwordKey: db_password
|
||||
|
||||
nginx:
|
||||
enabled: true
|
||||
|
||||
phpClientHttpsFix:
|
||||
enabled: true
|
||||
protocol: https
|
||||
|
||||
livenessProbe:
|
||||
enabled: false
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
startupProbe:
|
||||
enabled: false
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: kubernetes.io/service-account-token
|
||||
metadata:
|
||||
name: serviceaccounttoken
|
||||
namespace: wallabag
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: "wallabag"
|
||||
...
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: wallabag-tokenreview-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:auth-delegator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: wallabag
|
||||
namespace: wallabag
|
||||
...
|
||||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: SecretStore
|
||||
metadata:
|
||||
name: wallabag
|
||||
namespace: wallabag
|
||||
spec:
|
||||
provider:
|
||||
vault:
|
||||
server: "https://vault.service.masked.name:8200"
|
||||
path: "kv"
|
||||
version: "v2"
|
||||
caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUROVENDQWgyZ0F3SUJBZ0lVWXA4eG81dDJsSkZQM1NpRDFmSmlyZ0dVUUowd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0ZqRVVNQklHQTFVRUF4TUxiV0Z6YTJWa0xtNWhiV1V3SGhjTk1qQXdPREk1TVRreU16RXlXaGNOTXpBdwpPREkzTVRreU16UXlXakFXTVJRd0VnWURWUVFERXd0dFlYTnJaV1F1Ym1GdFpUQ0NBU0l3RFFZSktvWklodmNOCkFRRUJCUUFEZ2dFUEFEQ0NBUW9DZ2dFQkFNSTdvUitLSHZ2em5mbmFBWERNTzVxcFNUQ0FZQ3lmakZFb2hZSmYKbE9jbkxPTlhiM2Y2c1A1ZDFlbHRMK1VUcTBSVlU1VVAwYU5XN2hxRFR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GanlOYmQ4TlZTbFJHM1dtdUdZTXlPUldLU0F3VVFZSUt3WUJCUVVIQVFFRVJUQkRNRUVHQ0NzR0FRVUYKQnpBQ2hqVm9kSFJ3T2k4dmRtRjFiSFF1WTI5c2RXMWlhV0V1YldGemEyVmtMbTVoYldVNk9ESXdNQzkyTVM5dwphMmxmY205dmRDOWpZVEJIQmdOVkhSOEVRREErTUR5Z09xQTRoalpvZEhSd09pOHZkbUYxYkhRdVkyOXNkVzFpCmFXRXViV0Z6YTJWa0xtNWhiV1U2T0RJd01DOTJNUzl3YTJsZmNtOXZkQzlqY213d0RRWUpLb1pJaHZjTkFRRUwKQlFBRGdnRUJBSzZITWdSK2hwd2paQ21mNU5zekRTSHI3ZFlLWlhQNExyY0hQV3M5NG5MTTMzVVo1NzJ1YkdIcwpkS2pSdzhZRDBjbmNyc3lwc1ltRWdSNTdVK0RIa3lzMzk0d2tiN1VPd3kxWnZkNUlJUlhkUDBjRHlsejBRenFNCkFQblFZTitpc21rb2xqaGs5ZXkwUWJvM0NtUGpNK1VRY0F4dVpRdEE0TStyaUMxK2prdWRlMXVZTDBzekM2WTkKNEtldGZ2Yk5rZWRTYVY1eUphUktDQmhSY0M0L0dqcEJHL29kUS81QWZCUEFGalpxaGNJSldCclZZYlRRVkM3OQpoTUExaXdXSlBtVDlMc2pNU1VmeEZUUHp4Um5OWFFpS0Z6NWtUMk9pUzFucWg4YU9jeVU5WUM5Mjhwa2lmTkpWCktva3VEZXpKRk03aWUzZCtFY0JrMVY5bEh3T1dkdG89Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K
|
||||
auth:
|
||||
kubernetes:
|
||||
mountPath: "k8s-teapot"
|
||||
role: "wallabag"
|
||||
secretRef:
|
||||
name: "serviceaccounttoken"
|
||||
...
|
||||
---
|
||||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: wallabag
|
||||
namespace: wallabag
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: wallabag
|
||||
kind: SecretStore
|
||||
data:
|
||||
- secretKey: db_pw
|
||||
remoteRef:
|
||||
key: wallabag
|
||||
property: db_pw
|
||||
...
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
CHART_VERSION=7.1.2
|
||||
NAMESPACE=wallabag
|
||||
VAULT_AUTH_NAMESPACE="k8s-teapot"
|
||||
|
||||
helm repo add k8s-at-home https://k8s-at-home.com/charts/
|
||||
helm repo update
|
||||
|
||||
kubectl create ns wallabag
|
||||
kubectl create serviceaccount -n ${NAMESPACE} wallabag
|
||||
kubectl apply -n ${NAMESPACE} -f external-secrets.yaml
|
||||
HOST_IP=$(ip addr show eth0 | grep -Po 'inet \K[\d.]+')
|
||||
TOKEN="$(kubectl get secret serviceaccounttoken -n wallabag -o go-template='{{ .data.token }}' | base64 -d)"
|
||||
|
||||
vault write auth/${VAULT_AUTH_NAMESPACE}/role/wallabag \
|
||||
bound_service_account_names=wallabag \
|
||||
bound_service_account_namespaces=wallabag \
|
||||
policies=wallabag \
|
||||
ttl=24h
|
||||
|
||||
vault write auth/${VAULT_AUTH_NAMESPACE}/login role=wallabag jwt=${TOKEN} iss=https://${HOST_IP}:6443
|
||||
|
||||
helm upgrade --install \
|
||||
wallabag \
|
||||
k8s-at-home/wallabag \
|
||||
-f values.yaml \
|
||||
-n ${NAMESPACE} \
|
||||
--version ${CHART_VERSION} \
|
||||
--cleanup-on-fail
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: wallabag-cert
|
||||
namespace: istio-system
|
||||
spec:
|
||||
secretName: wallabag-cert
|
||||
commonName: wallabag.minhas.io
|
||||
dnsNames:
|
||||
- wallabag.minhas.io
|
||||
issuerRef:
|
||||
name: letsencrypt-prod
|
||||
kind: ClusterIssuer
|
||||
group: cert-manager.io
|
||||
...
|
||||
---
|
||||
apiVersion: networking.istio.io/v1beta1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: wallabag-gateway
|
||||
namespace: wallabag
|
||||
spec:
|
||||
selector:
|
||||
istio: ingressgateway
|
||||
servers:
|
||||
- port:
|
||||
number: 443
|
||||
name: https
|
||||
protocol: HTTPS
|
||||
tls:
|
||||
mode: SIMPLE
|
||||
credentialName: wallabag-cert
|
||||
hosts:
|
||||
- wallabag.minhas.io
|
||||
- port:
|
||||
number: 80
|
||||
name: http
|
||||
protocol: HTTP
|
||||
tls:
|
||||
httpsRedirect: true
|
||||
hosts:
|
||||
- wallabag.minhas.io
|
||||
...
|
||||
---
|
||||
apiVersion: networking.istio.io/v1beta1
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: wallabag-gateway
|
||||
namespace: wallabag
|
||||
spec:
|
||||
hosts:
|
||||
- wallabag.minhas.io
|
||||
gateways:
|
||||
- wallabag-gateway
|
||||
http:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
host: wallabag
|
||||
...
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
NAMESPACE=wallabag
|
||||
|
||||
#kubectl delete -n ${NAMESPACE} -f traefik.yaml
|
||||
helm -n ${NAMESPACE} delete wallabag
|
||||
kubectl delete -n ${NAMESPACE} -f external-secrets.yaml
|
||||
kubectl delete sa wallabag -n ${NAMESPACE}
|
||||
kubectl delete ns ${NAMESPACE}
|
|
@ -1,46 +0,0 @@
|
|||
---
|
||||
image:
|
||||
tag: 2.5.1
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: wallabag
|
||||
- name: POPULATE_DATABASE
|
||||
value: False
|
||||
- name: SYMFONY__ENV__DATABASE_DRIVER
|
||||
value: pdo_pgsql
|
||||
- name: SYMFONY__ENV__DATABASE_HOST
|
||||
value: sedan.minhas.io
|
||||
- name: SYMFONY__ENV__DATABASE_PORT
|
||||
value: 5432
|
||||
- name: SYMFONY__ENV__DATABASE_NAME
|
||||
value: wallabag
|
||||
- name: SYMFONY__ENV__DATABASE_USER
|
||||
value: wallabag
|
||||
- name: SYMFONY__ENV__DOMAIN_NAME
|
||||
value: https://wallabag.minhas.io
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wallabag
|
||||
key: db_pw
|
||||
- name: SYMFONY__ENV__DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: wallabag
|
||||
key: db_pw
|
||||
spec:
|
||||
serviceAccountName: wallabag
|
||||
service:
|
||||
main:
|
||||
ports:
|
||||
http:
|
||||
port: 80
|
||||
probes:
|
||||
startup:
|
||||
spec:
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 1
|
||||
## This means it has a maximum of 5*30=150 seconds to start up before it fails
|
||||
periodSeconds: 30
|
||||
failureThreshold: 30
|
||||
...
|
Loading…
Reference in a new issue