1
0
Fork 0
mirror of https://gitlab.com/shouptech/flux.git synced 2026-02-03 14:49:44 +00:00

Merge branch 'master' of gitlab.com:shouptech/flux

This commit is contained in:
Emma 2020-03-04 14:04:05 -07:00
commit c38f759efb
5 changed files with 158 additions and 5 deletions

View file

@ -21,21 +21,25 @@ spec:
imagePullPolicy: IfNotPresent
name: grafana
env:
- name: GRAFANA_DATABASE_TYPE
- name: GF_SERVER_ROOT_URL
value: https://grafana.shoup.io
- name: GF_SERVER_DOMAIN
value: grafana.shoup.io
- name: GF_DATABASE_TYPE
value: postgres
- name: GRAFANA_DATABASE_HOST
- name: GF_DATABASE_HOST
value: postgres:5432
- name: GRAFANA_DATABASE_NAME
- name: GF_DATABASE_NAME
valueFrom:
secretKeyRef:
name: postgres
key: POSTGRES_USER
- name: GRAFANA_DATABASE_USER
- name: GF_DATABASE_USER
valueFrom:
secretKeyRef:
name: postgres
key: POSTGRES_USER
- name: GRAFANA_DATABASE_PASSWORD
- name: GF_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: postgres

View file

@ -1,9 +1,12 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: hass
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: hass

View file

@ -0,0 +1,30 @@
apiVersion: v1
kind: ConfigMap
metadata:
labels:
addonmanager.kubernetes.io/mode: EnsureExists
k8s-app: kube-dns
name: coredns
namespace: kube-system
data:
Corefile: |
.:53 {
errors
health {
lameduck 5s
}
ready
log . {
class error
}
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
}
prometheus :9153
forward . 10.30.14.1
cache 30
loop
reload
loadbalance
}

View file

@ -0,0 +1,58 @@
# This file is used to create a prometheus service account
# and role bindings.
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: prometheus
rules:
- apiGroups:
- ""
resources:
- nodes
- nodes/metrics
- services
- endpoints
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- nonResourceURLs:
- "/metrics"
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: kube-system
---
apiVersion: v1
kind: Secret
metadata:
name: prometheus-secret
namespace: kube-system
annotations:
kubernetes.io/service-account.name: prometheus
type: kubernetes.io/service-account-token

View file

@ -64,3 +64,61 @@ spec:
- "60"
- "http://nextcloud"
restartPolicy: Never
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: ncbackup
namespace: nextcloud
spec:
schedule: "00 01 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
imagePullSecrets:
- name: gitlab-regcred
containers:
- name: ncbackup
image: registry.gitlab.com/shouptech/ncbackup:454955999
imagePullPolicy: IfNotPresent
env:
- name: NC_CONFIG_FILE
value: /var/www/html/config/config.php
- name: NC_DATA_PATH
value: /var/www/html/
- name: NC_DATA_DEST
value: /bkup/data/
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: postgres
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: postgres
key: POSTGRES_PASSWORD
- name: POSTGRES_HOST
value: postgres
- name: POSTGRES_PORT
value: "5432"
- name: POSTGRES_DB
value: nextcloud
- name: POSTGRES_DEST
value: /bkup/db/
volumeMounts:
- name: nextcloud-data
mountPath: /var/www/html
- name: nextcloud-backup
mountPath: /bkup
restartPolicy: Never
volumes:
- name: nextcloud-data
hostPath:
path: /opt/nextcloud/pod
type: Directory
- name: nextcloud-backup
hostPath:
path: /net/hv01/opt/backup/nextcloud