first upload

This commit is contained in:
2025-07-20 15:36:14 +02:00
parent 676e150f75
commit ea6bcaaf41
5 changed files with 84 additions and 0 deletions

3
apps/apache-demo/apply.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
kubectl apply -f deployment.yaml -f service.yaml -f istio.yaml

3
apps/apache-demo/delete.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
kubectl delete -f deployment.yaml -f service.yaml -f istio.yaml

View File

@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: apache-demo
namespace: secure
spec:
replicas: 1
selector:
matchLabels:
app: apache-demo
template:
metadata:
labels:
app: apache-demo
spec:
securityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
containers:
- name: apache-demo
image: pub.msandor.hu/msandor/apache-demo:latest
ports:
- containerPort: 8080
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
restartPolicy: Always

View File

@@ -0,0 +1,36 @@
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
name: apache-demo-gw
namespace: secure
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "app.kind.local"
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: apache-demo-vs
namespace: secure
spec:
hosts:
- "app.kind.local"
gateways:
- apache-demo-gw
http:
- match:
- uri:
prefix: /
route:
- destination:
host: apache-demo.secure.svc.cluster.local
port:
number: 8080

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: apache-demo
namespace: secure
spec:
ports:
- port: 8080
targetPort: 8080
name: http
selector:
app: apache-demo