First commit
This commit is contained in:
parent
c0a3d089ff
commit
78c67915d9
6
files/default.vcl
Normal file
6
files/default.vcl
Normal file
@ -0,0 +1,6 @@
|
||||
vcl 4.0;
|
||||
|
||||
backend default {
|
||||
.host = "127.0.0.1";
|
||||
.port = "8080";
|
||||
}
|
11
kustomization.yaml
Normal file
11
kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- resources/deployment.yaml
|
||||
- resources/svc.yaml
|
||||
|
||||
configMapGenerator:
|
||||
- name: varnish-config
|
||||
files:
|
||||
- files/default.vcl
|
40
resources/deployment.yaml
Normal file
40
resources/deployment.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: varnish
|
||||
labels:
|
||||
app: varnish
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: varnish
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: varnish
|
||||
spec:
|
||||
containers:
|
||||
- name: varnish
|
||||
image: reg.cadoles.com/dh/library/varnish:7.6.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- mountPath: /etc/varnish/default.vcl
|
||||
name: varnish-config
|
||||
subPath: default.vcl
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
volumes:
|
||||
- name: varnish-config
|
||||
configMap:
|
||||
name: varnish-config
|
||||
items:
|
||||
- key: default.vcl
|
||||
path: default.vcl
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
runAsNonRoot: true
|
11
resources/svc.yaml
Normal file
11
resources/svc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: varnish
|
||||
spec:
|
||||
selector:
|
||||
app: varnish
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
Loading…
x
Reference in New Issue
Block a user