Compare commits
2 Commits
447999c799
...
95e29071a9
Author | SHA1 | Date |
---|---|---|
Massaki Archambault | 95e29071a9 | |
Massaki Archambault | cb8f16b077 |
|
@ -3,5 +3,5 @@ datasources:
|
||||||
- name: prometheus
|
- name: prometheus
|
||||||
type: prometheus
|
type: prometheus
|
||||||
access: proxy
|
access: proxy
|
||||||
url: http://prometheus-operated.monitoring.svc.cluster.local:9090
|
url: http://prometheus-operated.monitoring.svc:9090
|
||||||
isDefault: true
|
isDefault: true
|
||||||
|
|
|
@ -39,7 +39,7 @@ spec:
|
||||||
mountPath: /server-config
|
mountPath: /server-config
|
||||||
readOnly: true
|
readOnly: true
|
||||||
containers:
|
containers:
|
||||||
- image: homeassistant/home-assistant:2023.5.4
|
- image: homeassistant/home-assistant
|
||||||
name: home-assistant
|
name: home-assistant
|
||||||
securityContext:
|
securityContext:
|
||||||
privileged: true
|
privileged: true
|
||||||
|
|
|
@ -2,6 +2,7 @@ resources:
|
||||||
- ../postgres
|
- ../postgres
|
||||||
- ../redis
|
- ../redis
|
||||||
- nextcloud-deployment.yaml
|
- nextcloud-deployment.yaml
|
||||||
|
- nextcloud-cronjob.yaml
|
||||||
- nextcloud-ingress.yaml
|
- nextcloud-ingress.yaml
|
||||||
|
|
||||||
namePrefix: nextcloud-
|
namePrefix: nextcloud-
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: server-cron
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
app.kubernetes.io/component: cron
|
||||||
|
spec:
|
||||||
|
schedule: "*/5 * * * *"
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
successfulJobsHistoryLimit: 1
|
||||||
|
failedJobsHistoryLimit: 1
|
||||||
|
jobTemplate:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
app.kubernetes.io/component: cron
|
||||||
|
spec:
|
||||||
|
backoffLimit: 0 # no retry
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: nextcloud
|
||||||
|
app.kubernetes.io/component: cron
|
||||||
|
spec:
|
||||||
|
restartPolicy: Never
|
||||||
|
serviceAccountName: server-cron
|
||||||
|
containers:
|
||||||
|
- name: run-nextcloud-cron
|
||||||
|
image: bitnami/kubectl
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command: ["/bin/bash"]
|
||||||
|
args:
|
||||||
|
- -xc
|
||||||
|
- kubectl exec "$(kubectl get pods -l 'app.kubernetes.io/component=server' -o name)" -- /bin/bash -c '( if ! which sudo &>/dev/null; then apt update && apt install sudo; fi ) && sudo -u www-data php -f /var/www/html/cron.php'
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: server-cron
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: pod-list-exec
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods", "pods/log"]
|
||||||
|
verbs: ["get", "list"]
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods/exec"]
|
||||||
|
verbs: ["create"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: server-cron
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: server-cron
|
||||||
|
roleRef:
|
||||||
|
kind: Role
|
||||||
|
name: pod-list-exec
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
|
@ -54,14 +54,14 @@ spec:
|
||||||
- name: TRUSTED_PROXIES
|
- name: TRUSTED_PROXIES
|
||||||
value: 10.0.0.0/8
|
value: 10.0.0.0/8
|
||||||
- name: REDIS_HOST
|
- name: REDIS_HOST
|
||||||
value: nextcloud-redis.$(NAMESPACE).svc.cluster.local
|
value: nextcloud-redis.$(NAMESPACE).svc
|
||||||
- name: REDIS_HOST_PASSWORD
|
- name: REDIS_HOST_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: redis-credentials
|
name: redis-credentials
|
||||||
key: password
|
key: password
|
||||||
- name: POSTGRES_HOST
|
- name: POSTGRES_HOST
|
||||||
value: nextcloud-postgres.$(NAMESPACE).svc.cluster.local
|
value: nextcloud-postgres.$(NAMESPACE).svc
|
||||||
- name: POSTGRES_DB
|
- name: POSTGRES_DB
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
|
|
|
@ -30,12 +30,15 @@ images:
|
||||||
- name: drone/drone-runner-kube
|
- name: drone/drone-runner-kube
|
||||||
newTag: 1.0.0-rc.3
|
newTag: 1.0.0-rc.3
|
||||||
- name: nextcloud
|
- name: nextcloud
|
||||||
newName: badjware/nextcloud-tweak
|
newTag: 26.0.2
|
||||||
newTag: 25.0.3
|
- name: homeassistant/home-assistant
|
||||||
|
newTag: 2023.5.4
|
||||||
- name: postgres
|
- name: postgres
|
||||||
newTag: 9.6.23
|
newTag: 9.6.23
|
||||||
- name: redis
|
- name: redis
|
||||||
newTag: 6.2.10
|
newTag: 6.2.10
|
||||||
|
- name: bitnami/kubectl
|
||||||
|
newTag: "1.25"
|
||||||
|
|
||||||
# configMapGenerator:
|
# configMapGenerator:
|
||||||
# - name: ecommerce-exporter-config
|
# - name: ecommerce-exporter-config
|
||||||
|
|
Loading…
Reference in New Issue