adding dev and dns namespaces
This commit is contained in:
@@ -0,0 +1,202 @@
|
|||||||
|
# --- ConfigMap for the AMD64 Runner ---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: gitea-runner-amd64-config
|
||||||
|
namespace: dev
|
||||||
|
data:
|
||||||
|
config.yaml: |
|
||||||
|
# Registration token and Gitea instance URL should be managed via secrets
|
||||||
|
runner:
|
||||||
|
capacity: 4
|
||||||
|
timeout: 1h
|
||||||
|
labels:
|
||||||
|
- "ubuntu-amd64: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"
|
||||||
|
- "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 ---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: gitea-runner-arm64-config
|
||||||
|
namespace: dev
|
||||||
|
data:
|
||||||
|
config.yaml: |
|
||||||
|
runner:
|
||||||
|
capacity: 4
|
||||||
|
timeout: 1h
|
||||||
|
labels:
|
||||||
|
- "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
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: gitea-runner-amd64-pvc
|
||||||
|
namespace: dev
|
||||||
|
annotations:
|
||||||
|
nfs.io/storage-path: "gitea-runner-amd64-pvc"
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 8Mi
|
||||||
|
---
|
||||||
|
# PersistentVolumeClaim for ARM64
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: gitea-runner-arm64-pvc
|
||||||
|
namespace: dev
|
||||||
|
annotations:
|
||||||
|
nfs.io/storage-path: "gitea-runner-arm64-pvc"
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 8Mi
|
||||||
|
---
|
||||||
|
# --- Deployment for the AMD64 Runner ---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: gitea-runner-amd64
|
||||||
|
namespace: dev
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: gitea-runner-amd64
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: gitea-runner-amd64
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: gitea-runner
|
||||||
|
image: gitea/act_runner:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "512Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "4000m"
|
||||||
|
memory: "4Gi"
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/gitea-runner/config.yaml
|
||||||
|
subPath: config.yaml
|
||||||
|
- name: docker-socket
|
||||||
|
mountPath: /var/run/docker.sock
|
||||||
|
- name: gitea-runner-amd64-pvc
|
||||||
|
mountPath: /data
|
||||||
|
env:
|
||||||
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: gitea-runner-token
|
||||||
|
key: REGISTRATION_TOKEN
|
||||||
|
- name: GITEA_INSTANCE_URL
|
||||||
|
value: https://git.ivanch.me
|
||||||
|
- name: GITEA_RUNNER_NAME
|
||||||
|
value: k8s-runner-amd64
|
||||||
|
- name: CONFIG_FILE
|
||||||
|
value: /etc/gitea-runner/config.yaml
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: gitea-runner-amd64-config
|
||||||
|
- name: docker-socket
|
||||||
|
hostPath:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
- name: gitea-runner-amd64-pvc
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: gitea-runner-amd64-pvc
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- iris
|
||||||
|
---
|
||||||
|
# --- Deployment for the ARM64 Runner ---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: gitea-runner-arm64
|
||||||
|
namespace: dev
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: gitea-runner-arm64
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: gitea-runner-arm64
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: gitea-runner
|
||||||
|
image: gitea/act_runner:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "512Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "4000m"
|
||||||
|
memory: "4Gi"
|
||||||
|
volumeMounts:
|
||||||
|
- name: config-volume
|
||||||
|
mountPath: /etc/gitea-runner/config.yaml
|
||||||
|
subPath: config.yaml
|
||||||
|
- name: docker-socket
|
||||||
|
mountPath: /var/run/docker.sock
|
||||||
|
- name: gitea-runner-arm64-pvc
|
||||||
|
mountPath: /data
|
||||||
|
env:
|
||||||
|
- name: GITEA_RUNNER_REGISTRATION_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: gitea-runner-token
|
||||||
|
key: REGISTRATION_TOKEN
|
||||||
|
- name: GITEA_INSTANCE_URL
|
||||||
|
value: https://git.ivanch.me
|
||||||
|
- name: GITEA_RUNNER_NAME
|
||||||
|
value: k8s-runner-arm64
|
||||||
|
- name: CONFIG_FILE
|
||||||
|
value: /etc/gitea-runner/config.yaml
|
||||||
|
volumes:
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: gitea-runner-arm64-config
|
||||||
|
- name: docker-socket
|
||||||
|
hostPath:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
- name: gitea-runner-arm64-pvc
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: gitea-runner-arm64-pvc
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/hostname
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- nexus
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: adguardsync-pvc
|
||||||
|
namespace: dns
|
||||||
|
annotations:
|
||||||
|
nfs.io/storage-path: "adguardsync-config"
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Mi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: adguardsync
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: adguardsync
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: adguardsync
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: adguardsync
|
||||||
|
image: ghcr.io/bakito/adguardhome-sync:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
|
name: web-port
|
||||||
|
env:
|
||||||
|
- name: CRON
|
||||||
|
value: "0 * * * *"
|
||||||
|
- name: RUN_ON_START
|
||||||
|
value: "true"
|
||||||
|
- name: LOG_LEVEL
|
||||||
|
value: "info"
|
||||||
|
- name: ORIGIN_URL
|
||||||
|
value: "http://adguard.haven"
|
||||||
|
- name: ORIGIN_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: adguardhome-password
|
||||||
|
key: username
|
||||||
|
- name: ORIGIN_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: adguardhome-password
|
||||||
|
key: password
|
||||||
|
- name: REPLICA1_URL
|
||||||
|
value: "http://adguard2.haven"
|
||||||
|
- name: REPLICA1_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: adguardhome-password
|
||||||
|
key: username
|
||||||
|
- name: REPLICA1_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: adguardhome-password
|
||||||
|
key: password
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 512Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: adguardsync-storage
|
||||||
|
mountPath: /config
|
||||||
|
volumes:
|
||||||
|
- name: adguardsync-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: adguardsync-pvc
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: adguardsync-svc
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: adguardsync
|
||||||
|
ports:
|
||||||
|
- name: web
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: adguardsync-ingress
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: adguardsync.haven
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: adguardsync-svc
|
||||||
|
port:
|
||||||
|
number: 8080
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: adguardhome-pvc
|
||||||
|
namespace: dns
|
||||||
|
annotations:
|
||||||
|
nfs.io/storage-path: "adguardhome-config"
|
||||||
|
spec:
|
||||||
|
storageClassName: "nfs-client"
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: adguardhome
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: adguardhome
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: adguardhome
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: adguardhome
|
||||||
|
image: adguard/adguardhome:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
ports:
|
||||||
|
- containerPort: 53
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 53
|
||||||
|
protocol: UDP
|
||||||
|
- containerPort: 3000
|
||||||
|
protocol: TCP
|
||||||
|
name: install-port
|
||||||
|
- containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
name: web-port
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 128Mi
|
||||||
|
limits:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 2Gi
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 30
|
||||||
|
periodSeconds: 10
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
volumeMounts:
|
||||||
|
- name: adguardhome-storage
|
||||||
|
mountPath: /opt/adguardhome/work
|
||||||
|
- name: adguardhome-storage
|
||||||
|
mountPath: /opt/adguardhome/conf
|
||||||
|
volumes:
|
||||||
|
- name: adguardhome-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: adguardhome-pvc
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: adguardhome-svc
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
selector:
|
||||||
|
app: adguardhome
|
||||||
|
loadBalancerIP: 192.168.20.200
|
||||||
|
ports:
|
||||||
|
- name: dns-tcp
|
||||||
|
port: 53
|
||||||
|
targetPort: 53
|
||||||
|
protocol: TCP
|
||||||
|
- name: dns-udp
|
||||||
|
port: 53
|
||||||
|
targetPort: 53
|
||||||
|
protocol: UDP
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: adguardhome-lan-svc
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
selector:
|
||||||
|
app: adguardhome
|
||||||
|
loadBalancerIP: 192.168.15.200
|
||||||
|
ports:
|
||||||
|
- name: dns-tcp
|
||||||
|
port: 53
|
||||||
|
targetPort: 53
|
||||||
|
protocol: TCP
|
||||||
|
- name: dns-udp
|
||||||
|
port: 53
|
||||||
|
targetPort: 53
|
||||||
|
protocol: UDP
|
||||||
|
- name: web
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: adguard-install-svc
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
selector:
|
||||||
|
app: adguardhome
|
||||||
|
ports:
|
||||||
|
- name: install
|
||||||
|
port: 3000
|
||||||
|
targetPort: 3000
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: adguardhome-ingress
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: adguard.haven
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: adguardhome-svc
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: adguardhome-install-ingress
|
||||||
|
namespace: dns
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: install.adguard.haven
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: adguard-install-svc
|
||||||
|
port:
|
||||||
|
number: 3000
|
||||||
Reference in New Issue
Block a user