first upload
This commit is contained in:
3
apps/apache-demo/apply.sh
Executable file
3
apps/apache-demo/apply.sh
Executable 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
3
apps/apache-demo/delete.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
kubectl delete -f deployment.yaml -f service.yaml -f istio.yaml
|
30
apps/apache-demo/deployment.yaml
Normal file
30
apps/apache-demo/deployment.yaml
Normal 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
|
36
apps/apache-demo/istio.yaml
Normal file
36
apps/apache-demo/istio.yaml
Normal 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
|
12
apps/apache-demo/service.yaml
Normal file
12
apps/apache-demo/service.yaml
Normal 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
|
Reference in New Issue
Block a user