adding deployments and small adjustments
This commit is contained in:
81
default/haven-notify.yaml
Normal file
81
default/haven-notify.yaml
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: haven-notify
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
app: haven-notify
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: haven-notify
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: haven-notify
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: haven-notify
|
||||||
|
image: git.ivanch.me/ivanch/haven-notify:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: WEBHOOK_URL
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: discord-webhook
|
||||||
|
key: HAVEN_WEBHOOK_URL
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /ready
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /live
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 128Mi
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: haven-notify
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: haven-notify
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: haven-notify
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: notify.haven
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: haven-notify
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
@@ -30,6 +30,31 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
name: vault-port
|
name: vault-port
|
||||||
|
# /alive requires no authentication and verifies the Vaultwarden process
|
||||||
|
startupProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /alive
|
||||||
|
port: vault-port
|
||||||
|
scheme: HTTP
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 30
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /alive
|
||||||
|
port: vault-port
|
||||||
|
scheme: HTTP
|
||||||
|
periodSeconds: 10
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 3
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /alive
|
||||||
|
port: vault-port
|
||||||
|
scheme: HTTP
|
||||||
|
periodSeconds: 15
|
||||||
|
timeoutSeconds: 3
|
||||||
|
failureThreshold: 6
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: vaultwarden-data
|
- name: vaultwarden-data
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
@@ -87,9 +112,9 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
tls:
|
tls:
|
||||||
- hosts:
|
- hosts:
|
||||||
- vault.haven
|
- vault.haven
|
||||||
secretName: vaultwarden-tls
|
secretName: vaultwarden-tls
|
||||||
rules:
|
rules:
|
||||||
- host: vault.haven
|
- host: vault.haven
|
||||||
http:
|
http:
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ data:
|
|||||||
- "ubuntu-amd64:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
- "ubuntu-amd64:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
||||||
- "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
- "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
||||||
- "ubuntu-slim:docker://docker.gitea.com/runner-images:ubuntu-latest-slim"
|
- "ubuntu-slim:docker://docker.gitea.com/runner-images:ubuntu-latest-slim"
|
||||||
|
- "runner-full:docker://git.ivanch.me/ivanch/runner-images:full"
|
||||||
|
- "runner-slim:docker://git.ivanch.me/ivanch/runner-images:slim"
|
||||||
|
- "runner-full-amd64:docker://git.ivanch.me/ivanch/runner-images:full"
|
||||||
|
- "runner-slim-amd64:docker://git.ivanch.me/ivanch/runner-images:slim"
|
||||||
---
|
---
|
||||||
# --- ConfigMap for the ARM64 Runner ---
|
# --- ConfigMap for the ARM64 Runner ---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -28,6 +32,8 @@ data:
|
|||||||
timeout: 1h
|
timeout: 1h
|
||||||
labels:
|
labels:
|
||||||
- "ubuntu-arm64:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
- "ubuntu-arm64:docker://docker.gitea.com/runner-images:ubuntu-latest"
|
||||||
|
- "runner-full-arm64:docker://git.ivanch.me/ivanch/runner-images:full"
|
||||||
|
- "runner-slim-arm64:docker://git.ivanch.me/ivanch/runner-images:slim"
|
||||||
---
|
---
|
||||||
# PersistentVolumeClaim for AMD64
|
# PersistentVolumeClaim for AMD64
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@@ -78,55 +84,55 @@ spec:
|
|||||||
app: gitea-runner-amd64
|
app: gitea-runner-amd64
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: gitea-runner
|
- name: gitea-runner
|
||||||
image: gitea/act_runner:latest
|
image: gitea/act_runner:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
memory: "512Mi"
|
memory: "512Mi"
|
||||||
limits:
|
limits:
|
||||||
cpu: "4000m"
|
cpu: "4000m"
|
||||||
memory: "4Gi"
|
memory: "4Gi"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /etc/gitea-runner/config.yaml
|
mountPath: /etc/gitea-runner/config.yaml
|
||||||
subPath: config.yaml
|
subPath: config.yaml
|
||||||
- name: docker-socket
|
- name: docker-socket
|
||||||
mountPath: /var/run/docker.sock
|
mountPath: /var/run/docker.sock
|
||||||
- name: gitea-runner-amd64-pvc
|
- name: gitea-runner-amd64-pvc
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
env:
|
env:
|
||||||
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: gitea-runner-token
|
name: gitea-runner-token
|
||||||
key: REGISTRATION_TOKEN
|
key: REGISTRATION_TOKEN
|
||||||
- name: GITEA_INSTANCE_URL
|
- name: GITEA_INSTANCE_URL
|
||||||
value: https://git.ivanch.me
|
value: https://git.ivanch.me
|
||||||
- name: GITEA_RUNNER_NAME
|
- name: GITEA_RUNNER_NAME
|
||||||
value: k8s-runner-amd64
|
value: k8s-runner-amd64
|
||||||
- name: CONFIG_FILE
|
- name: CONFIG_FILE
|
||||||
value: /etc/gitea-runner/config.yaml
|
value: /etc/gitea-runner/config.yaml
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: gitea-runner-amd64-config
|
name: gitea-runner-amd64-config
|
||||||
- name: docker-socket
|
- name: docker-socket
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
- name: gitea-runner-amd64-pvc
|
- name: gitea-runner-amd64-pvc
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: gitea-runner-amd64-pvc
|
claimName: gitea-runner-amd64-pvc
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
nodeSelectorTerms:
|
nodeSelectorTerms:
|
||||||
- matchExpressions:
|
- matchExpressions:
|
||||||
- key: kubernetes.io/hostname
|
- key: kubernetes.io/hostname
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- iris
|
- iris
|
||||||
---
|
---
|
||||||
# --- Deployment for the ARM64 Runner ---
|
# --- Deployment for the ARM64 Runner ---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
@@ -145,52 +151,52 @@ spec:
|
|||||||
app: gitea-runner-arm64
|
app: gitea-runner-arm64
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: gitea-runner
|
- name: gitea-runner
|
||||||
image: gitea/act_runner:latest
|
image: gitea/act_runner:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
memory: "512Mi"
|
memory: "512Mi"
|
||||||
limits:
|
limits:
|
||||||
cpu: "4000m"
|
cpu: "4000m"
|
||||||
memory: "4Gi"
|
memory: "4Gi"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
mountPath: /etc/gitea-runner/config.yaml
|
mountPath: /etc/gitea-runner/config.yaml
|
||||||
subPath: config.yaml
|
subPath: config.yaml
|
||||||
- name: docker-socket
|
- name: docker-socket
|
||||||
mountPath: /var/run/docker.sock
|
mountPath: /var/run/docker.sock
|
||||||
- name: gitea-runner-arm64-pvc
|
- name: gitea-runner-arm64-pvc
|
||||||
mountPath: /data
|
mountPath: /data
|
||||||
env:
|
env:
|
||||||
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: gitea-runner-token
|
name: gitea-runner-token
|
||||||
key: REGISTRATION_TOKEN
|
key: REGISTRATION_TOKEN
|
||||||
- name: GITEA_INSTANCE_URL
|
- name: GITEA_INSTANCE_URL
|
||||||
value: https://git.ivanch.me
|
value: https://git.ivanch.me
|
||||||
- name: GITEA_RUNNER_NAME
|
- name: GITEA_RUNNER_NAME
|
||||||
value: k8s-runner-arm64
|
value: k8s-runner-arm64
|
||||||
- name: CONFIG_FILE
|
- name: CONFIG_FILE
|
||||||
value: /etc/gitea-runner/config.yaml
|
value: /etc/gitea-runner/config.yaml
|
||||||
volumes:
|
volumes:
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: gitea-runner-arm64-config
|
name: gitea-runner-arm64-config
|
||||||
- name: docker-socket
|
- name: docker-socket
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
- name: gitea-runner-arm64-pvc
|
- name: gitea-runner-arm64-pvc
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: gitea-runner-arm64-pvc
|
claimName: gitea-runner-arm64-pvc
|
||||||
affinity:
|
affinity:
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
nodeSelectorTerms:
|
nodeSelectorTerms:
|
||||||
- matchExpressions:
|
- matchExpressions:
|
||||||
- key: kubernetes.io/hostname
|
- key: kubernetes.io/hostname
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- nexus
|
- nexus
|
||||||
|
|||||||
Reference in New Issue
Block a user