Added filebrowser
This commit is contained in:
77
Datastore/deployment.yaml
Normal file
77
Datastore/deployment.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: data-deployment
|
||||
|
||||
labels:
|
||||
project: data
|
||||
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
pod-project: data
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
pod-project: data
|
||||
spec:
|
||||
automountServiceAccountToken: false # Container doesn't need service account token
|
||||
securityContext:
|
||||
appArmorProfile:
|
||||
type: RuntimeDefault
|
||||
fsGroup: 101
|
||||
containers:
|
||||
- name: filebrowser
|
||||
image: filebrowser/filebrowser
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- name: data-the-data
|
||||
mountPath: /srv
|
||||
- name: fb-db
|
||||
mountPath: /database
|
||||
- name: fb-conf
|
||||
mountPath: /config
|
||||
securityContext:
|
||||
runAsUser: 101
|
||||
runAsGroup: 101
|
||||
runAsNonRoot: true
|
||||
- name: data
|
||||
image: nginx:alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 52345
|
||||
name: http
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
volumeMounts:
|
||||
- name: data-config
|
||||
mountPath: /etc/nginx
|
||||
- name: data-the-data
|
||||
mountPath: /data
|
||||
|
||||
volumes:
|
||||
- name: data-config
|
||||
persistentVolumeClaim:
|
||||
claimName: data-config-pvc
|
||||
readOnly: true
|
||||
|
||||
- name: data-the-data
|
||||
nfs:
|
||||
server: 1.2.3.4
|
||||
path: /path/to/mount
|
||||
readOnly: false
|
||||
|
||||
|
||||
- name: fb-db
|
||||
persistentVolumeClaim:
|
||||
claimName: fb-db-pvc
|
||||
readOnly: false
|
||||
- name: fb-conf
|
||||
persistentVolumeClaim:
|
||||
claimName: fb-conf-pvc
|
||||
readOnly: false
|
||||
68
Datastore/netPolicy.yaml
Normal file
68
Datastore/netPolicy.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: data-networkpolicy
|
||||
|
||||
labels:
|
||||
project: data
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
pod-project: data
|
||||
egress:
|
||||
# Allow all egress
|
||||
# - {}
|
||||
# Allow egress only to public networks
|
||||
# - to:
|
||||
# - namespaceSelector:
|
||||
# matchLabels:
|
||||
# kubernetes.io/metadata.name: kube-system
|
||||
# podSelector:
|
||||
# matchLabels:
|
||||
# k8s-app: kube-dns
|
||||
# ports:
|
||||
# - protocol: UDP
|
||||
# port: 53
|
||||
# - protocol: TCP
|
||||
# port: 53
|
||||
|
||||
# - to:
|
||||
# - ipBlock:
|
||||
# cidr: 0.0.0.0/0
|
||||
# except:
|
||||
# - 10.0.0.0/8
|
||||
# - 172.16.0.0/12
|
||||
# - 192.168.0.0/16
|
||||
# ports:
|
||||
# - protocol:
|
||||
|
||||
|
||||
# ingress:
|
||||
|
||||
# This port is for public facing nginx for downloading
|
||||
# - from:
|
||||
# - namespaceSelector:
|
||||
# matchLabels:
|
||||
# ns-name: <NS>
|
||||
# podSelector:
|
||||
# matchLabels:
|
||||
# podDomain: <reverseProxyPodLabel>
|
||||
# ports:
|
||||
# - protocol: TCP
|
||||
# port: 52345
|
||||
|
||||
# This is only for internal data drop-in browser
|
||||
# - from:
|
||||
# - namespaceSelector:
|
||||
# matchLabels:
|
||||
# ns-name: <NS>
|
||||
# podSelector:
|
||||
# matchLabels:
|
||||
# podDomain: <reverseProxyPodLabel>
|
||||
# ports:
|
||||
# - protocol: TCP
|
||||
# port: 80
|
||||
|
||||
policyTypes:
|
||||
- Ingress
|
||||
- Egress
|
||||
56
Datastore/pvc.yaml
Normal file
56
Datastore/pvc.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: data-config-pvc
|
||||
|
||||
labels:
|
||||
project: data
|
||||
spec:
|
||||
# https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes-1
|
||||
accessModes:
|
||||
# - ReadOnlyMany
|
||||
# - ReadWriteOnce
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 32Mi
|
||||
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: fb-db-pvc
|
||||
|
||||
labels:
|
||||
project: data
|
||||
|
||||
spec:
|
||||
# https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes-1
|
||||
accessModes:
|
||||
# - ReadOnlyMany
|
||||
- ReadWriteOnce
|
||||
# - ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: fb-conf-pvc
|
||||
|
||||
labels:
|
||||
project: data
|
||||
|
||||
spec:
|
||||
# https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes-1
|
||||
accessModes:
|
||||
# - ReadOnlyMany
|
||||
- ReadWriteOnce
|
||||
# - ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 128Mi
|
||||
|
||||
30
Datastore/service.yaml
Normal file
30
Datastore/service.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: data-service
|
||||
labels:
|
||||
project: data
|
||||
|
||||
spec:
|
||||
selector:
|
||||
pod-project: data
|
||||
# This isn't used as Ingress is doing TLS termination
|
||||
# type: LoadBalancer
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- name: data-ngx
|
||||
protocol: TCP
|
||||
port: 52345 # <- port that will be exposed
|
||||
# targetPort: 3000
|
||||
|
||||
# - name: anubis-data
|
||||
# protocol: TCP
|
||||
# port: 8080 # <- port that will be exposed
|
||||
# targetPort: 8080
|
||||
# # targetPort: 3000
|
||||
|
||||
- name: filebrowser-webgui
|
||||
protocol: TCP
|
||||
port: 80 # <- port that will be exposed
|
||||
# targetPort: 3000
|
||||
|
||||
Reference in New Issue
Block a user