First push
This commit is contained in:
parent
1e13511e04
commit
327065a181
11 changed files with 226 additions and 0 deletions
14
templates/diun-ClusterRole.yml.j2
Normal file
14
templates/diun-ClusterRole.yml.j2
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: diun
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
13
templates/diun-ClusterRoleBinding.yml.j2
Normal file
13
templates/diun-ClusterRoleBinding.yml.j2
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: diun
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: diun
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: diun
|
||||
namespace: default
|
||||
87
templates/diun-ConfigMap.yml.j2
Normal file
87
templates/diun-ConfigMap.yml.j2
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
app: diun
|
||||
name: diun-conf
|
||||
data:
|
||||
diun.yml: |
|
||||
db:
|
||||
path: diun.db
|
||||
|
||||
watch:
|
||||
workers: 10
|
||||
schedule: "0 */6 * * *"
|
||||
firstCheckNotif: false
|
||||
|
||||
notif:
|
||||
amqp:
|
||||
host: localhost
|
||||
port: 5672
|
||||
username: guest
|
||||
password: guest
|
||||
queue: queue
|
||||
gotify:
|
||||
endpoint: http://gotify.foo.com
|
||||
token: Token123456
|
||||
priority: 1
|
||||
timeout: 10s
|
||||
mail:
|
||||
host: localhost
|
||||
port: 25
|
||||
ssl: false
|
||||
insecureSkipVerify: false
|
||||
from: diun@example.com
|
||||
to:
|
||||
- webmaster@example.com
|
||||
- me@example.com
|
||||
rocketchat:
|
||||
endpoint: http://rocket.foo.com:3000
|
||||
channel: "#general"
|
||||
userID: abcdEFGH012345678
|
||||
token: Token123456
|
||||
timeout: 10s
|
||||
script:
|
||||
cmd: "myprogram"
|
||||
args:
|
||||
- "--anarg"
|
||||
- "another"
|
||||
slack:
|
||||
webhookURL: https://hooks.slack.com/services/ABCD12EFG/HIJK34LMN/01234567890abcdefghij
|
||||
teams:
|
||||
webhookURL: https://outlook.office.com/webhook/ABCD12EFG/HIJK34LMN/01234567890abcdefghij
|
||||
telegram:
|
||||
token: aabbccdd:11223344
|
||||
chatIDs:
|
||||
- 123456789
|
||||
- 987654321
|
||||
webhook:
|
||||
endpoint: http://webhook.foo.com/sd54qad89azd5a
|
||||
method: GET
|
||||
headers:
|
||||
content-type: application/json
|
||||
authorization: Token123456
|
||||
timeout: 10s
|
||||
|
||||
regopts:
|
||||
- name: "myregistry"
|
||||
username: foo
|
||||
password: bar
|
||||
timeout: 20s
|
||||
insecureTLS: true
|
||||
- name: "docker.io"
|
||||
selector: image
|
||||
username: foo2
|
||||
password: bar2
|
||||
|
||||
providers:
|
||||
docker:
|
||||
watchStopped: true
|
||||
swarm:
|
||||
watchByDefault: true
|
||||
kubernetes:
|
||||
namespaces:
|
||||
- default
|
||||
- production
|
||||
file:
|
||||
directory: ./imagesdir
|
||||
56
templates/diun-Deployment.yml.j2
Normal file
56
templates/diun-Deployment.yml.j2
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: default
|
||||
name: diun
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: diun
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: diun
|
||||
annotations:
|
||||
diun.enable: "true"
|
||||
diun.watch_repo: "true"
|
||||
spec:
|
||||
serviceAccountName: diun
|
||||
containers:
|
||||
- name: diun
|
||||
image: crazymax/diun:latest
|
||||
imagePullPolicy: Always
|
||||
args: ["serve"]
|
||||
env:
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
- name: LOG_LEVEL
|
||||
value: "info"
|
||||
- name: LOG_JSON
|
||||
value: "false"
|
||||
- name: DIUN_WATCH_WORKERS
|
||||
value: "20"
|
||||
- name: DIUN_WATCH_SCHEDULE
|
||||
value: "0 */6 * * *"
|
||||
- name: DIUN_PROVIDERS_KUBERNETES
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- mountPath: "/data"
|
||||
name: "data"
|
||||
- mountPath: "/etc/diun"
|
||||
name: "config"
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
# Set up a data directory for diun
|
||||
# For production usage, you should consider using PV/PVC instead(or simply using storage like NAS)
|
||||
# For more details, please see https://kubernetes.io/docs/concepts/storage/volumes/
|
||||
- name: "data"
|
||||
hostPath:
|
||||
path: "/data"
|
||||
type: Directory
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: diun-conf
|
||||
name: config
|
||||
6
templates/diun-ServiceAccount.yml.j2
Normal file
6
templates/diun-ServiceAccount.yml.j2
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
namespace: default
|
||||
name: diun
|
||||
Loading…
Add table
Add a link
Reference in a new issue