Compare commits
2 Commits
447999c799
...
95e29071a9
Author | SHA1 | Date |
---|---|---|
Massaki Archambault | 95e29071a9 | |
Massaki Archambault | cb8f16b077 |
|
@ -3,5 +3,5 @@ datasources:
|
|||
- name: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus-operated.monitoring.svc.cluster.local:9090
|
||||
url: http://prometheus-operated.monitoring.svc:9090
|
||||
isDefault: true
|
||||
|
|
|
@ -39,7 +39,7 @@ spec:
|
|||
mountPath: /server-config
|
||||
readOnly: true
|
||||
containers:
|
||||
- image: homeassistant/home-assistant:2023.5.4
|
||||
- image: homeassistant/home-assistant
|
||||
name: home-assistant
|
||||
securityContext:
|
||||
privileged: true
|
||||
|
|
|
@ -2,6 +2,7 @@ resources:
|
|||
- ../postgres
|
||||
- ../redis
|
||||
- nextcloud-deployment.yaml
|
||||
- nextcloud-cronjob.yaml
|
||||
- nextcloud-ingress.yaml
|
||||
|
||||
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
|
||||
value: 10.0.0.0/8
|
||||
- name: REDIS_HOST
|
||||
value: nextcloud-redis.$(NAMESPACE).svc.cluster.local
|
||||
value: nextcloud-redis.$(NAMESPACE).svc
|
||||
- name: REDIS_HOST_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: redis-credentials
|
||||
key: password
|
||||
- name: POSTGRES_HOST
|
||||
value: nextcloud-postgres.$(NAMESPACE).svc.cluster.local
|
||||
value: nextcloud-postgres.$(NAMESPACE).svc
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
|
|
@ -30,12 +30,15 @@ images:
|
|||
- name: drone/drone-runner-kube
|
||||
newTag: 1.0.0-rc.3
|
||||
- name: nextcloud
|
||||
newName: badjware/nextcloud-tweak
|
||||
newTag: 25.0.3
|
||||
newTag: 26.0.2
|
||||
- name: homeassistant/home-assistant
|
||||
newTag: 2023.5.4
|
||||
- name: postgres
|
||||
newTag: 9.6.23
|
||||
- name: redis
|
||||
newTag: 6.2.10
|
||||
- name: bitnami/kubectl
|
||||
newTag: "1.25"
|
||||
|
||||
# configMapGenerator:
|
||||
# - name: ecommerce-exporter-config
|
||||
|
|
Loading…
Reference in New Issue