64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: iso-server
|
|
namespace: kubevirt
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: iso-server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: iso-server
|
|
spec:
|
|
initContainers:
|
|
- name: init-dirs
|
|
image: alpine:latest
|
|
command: ["sh","-lc"]
|
|
args:
|
|
- |
|
|
mkdir -p /share/isos
|
|
chmod 755 /share/isos
|
|
volumeMounts:
|
|
- name: iso-storage
|
|
mountPath: /share
|
|
containers:
|
|
- name: httpd
|
|
image: httpd:2.4
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: iso-storage
|
|
mountPath: /usr/local/apache2/htdocs
|
|
subPath: isos
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: 80
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
|
|
- name: samba
|
|
image: dperson/samba
|
|
args: ["-p", "-s", "isos;/share/isos;yes;no"]
|
|
ports:
|
|
- containerPort: 445
|
|
securityContext:
|
|
runAsUser: 0
|
|
volumeMounts:
|
|
- name: iso-storage
|
|
mountPath: /share
|
|
|
|
volumes:
|
|
- name: iso-storage
|
|
persistentVolumeClaim:
|
|
claimName: iso-pvc
|