You've already forked vk26-onlinehasherapp
init
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: onlinefilehasher-config
|
||||
namespace: exam-varga
|
||||
data:
|
||||
config.txt: |
|
||||
md5
|
||||
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: onlinefilehasher
|
||||
namespace: exam-varga
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: onlinefilehasher
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: onlinefilehasher
|
||||
spec:
|
||||
volumes:
|
||||
- name: onlinefilehasher-config-volume
|
||||
configMap:
|
||||
name: onlinefilehasher-config
|
||||
- name: onlinefilehasher-input-storage-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: onlinefilehasher-input-pv-claim
|
||||
- name: onlinefilehasher-output-storage-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: onlinefilehasher-output-pv-claim
|
||||
|
||||
containers:
|
||||
- name: onlinefilehasher
|
||||
image: br0kenpixel/onlinehasherapp:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8501
|
||||
volumeMounts:
|
||||
- name: onlinefilehasher-input-storage-volume
|
||||
mountPath: /app/input
|
||||
- name: onlinefilehasher-output-storage-volume
|
||||
mountPath: /app/output
|
||||
- name: onlinefilehasher-config-volume
|
||||
mountPath: /app/config.txt
|
||||
subPath: config.txt
|
||||
|
||||
initContainers:
|
||||
- name: init-onlinefilehasher
|
||||
image: br0kenpixel/onlinehasherapp:latest
|
||||
imagePullPolicy: Always
|
||||
command: ["sh", "-c", "echo example1 > /app/input/example1.txt && python /app/initstuff.py"]
|
||||
volumeMounts:
|
||||
- name: onlinefilehasher-input-storage-volume
|
||||
mountPath: /app/input
|
||||
- name: onlinefilehasher-output-storage-volume
|
||||
mountPath: /app/output
|
||||
- name: onlinefilehasher-config-volume
|
||||
mountPath: /app/config.txt
|
||||
subPath: config.txt
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: onlinefilehasher-input-storage-volume
|
||||
namespace: exam-varga
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/mnt/data"
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: onlinefilehasher-output-storage-volume
|
||||
namespace: exam-varga
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/mnt/data2"
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: onlinefilehasher-input-pv-claim
|
||||
namespace: exam-varga
|
||||
spec:
|
||||
storageClassName: manual
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Mi
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: onlinefilehasher-output-pv-claim
|
||||
namespace: exam-varga
|
||||
spec:
|
||||
storageClassName: manual
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Mi
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: onlinefilehasher-service
|
||||
namespace: exam-varga
|
||||
spec:
|
||||
selector:
|
||||
app: onlinefilehasher
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 8501
|
||||
targetPort: 8501
|
||||
nodePort: 30000
|
||||
Reference in New Issue
Block a user