longhorn and echopod tests

This commit is contained in:
baschno
2025-04-26 19:57:56 +02:00
parent a3404bba2b
commit 5514b5687f
4 changed files with 32 additions and 42 deletions

View File

@@ -0,0 +1,12 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: echopod-ingress-certificate
namespace: default
spec:
secretName: echopod-certificate-secret
issuerRef:
name: cloudflare-cluster-issuer
kind: ClusterIssuer
dnsNames:
- echopod.k8s.schnrbs.work

View File

@@ -37,4 +37,23 @@ spec:
targetPort: 80 targetPort: 80
# nodePort: 30080 # Port to expose on the node # nodePort: 30080 # Port to expose on the node
selector: selector:
app: echopod app: echopod
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: echopod-ingress-route
namespace: default
spec:
entryPoints:
- websecure
routes:
- match: Host(`echopod.k8s.schnrbs.work`)
kind: Rule
services:
- name: echopod-service
port: 80
tls:
secretName: echopod-certificate-secret

View File

@@ -1,28 +0,0 @@
apiVersion: v1
kind: Pod
metadata:
name: longhorn-pod
namespace: default
spec:
nodeName: k8s-worker3
restartPolicy: Always
containers:
- name: nginx
image: nginx:stable-alpine
imagePullPolicy: IfNotPresent
livenessProbe:
exec:
command:
- ls
- /data/lost+found
initialDelaySeconds: 5
periodSeconds: 5
volumeMounts:
- name: volv
mountPath: /data
ports:
- containerPort: 80
volumes:
- name: volv
persistentVolumeClaim:
claimName: longhorn-pvc

View File

@@ -1,13 +0,0 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: longhorn-pvc
namespace: default
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 2Gi