123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- apiVersion: v1
- kind: Service
- metadata:
- name: go-ipfs-tcp
- labels:
- run: go-ipfs
- annotations:
- metallb.universe.tf/allow-shared-ip: "pihole"
- spec:
- ports:
- - name: swarm
- protocol: TCP
- port: 4001
- targetPort: 4001
- - name: api
- protocol: TCP
- port: 5001
- targetPort: 5001
- - name: http
- protocol: TCP
- port: 8080
- targetPort: 8080
- selector:
- run: go-ipfs
- type: LoadBalancer
- loadBalancerIP: 10.42.42.236
- externalTrafficPolicy: Local
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: go-ipfs-udp
- labels:
- run: go-ipfs
- annotations:
- metallb.universe.tf/allow-shared-ip: "pihole"
- spec:
- ports:
- - name: swarm
- protocol: UDP
- port: 4001
- targetPort: 4001
- selector:
- run: go-ipfs
- type: LoadBalancer
- loadBalancerIP: 10.42.42.236
- externalTrafficPolicy: Local
- ---
- apiVersion: v1
- kind: PersistentVolume
- metadata:
- name: go-ipfs-data
- spec:
- capacity:
- storage: 5Mi
- volumeMode: Filesystem
- accessModes:
- - ReadWriteOnce
- persistentVolumeReclaimPolicy: Retain # Keep 4eva
- storageClassName: default
- mountOptions:
- - hard
- - nfsvers=3
- nfs:
- path: /mnt/DroboFS/Shares/Kubernetes/volumes/static/go-ipfs-data
- server: 10.42.42.10
- claimRef:
- name: go-ipfs-data
- namespace: default
- ---
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- name: go-ipfs-data
- annotations:
- nfs.io/storage-path: "go-ipfs"
- spec:
- storageClassName: default
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 5Mi
- status: {}
- ---
- apiVersion: v1
- kind: PersistentVolume
- metadata:
- name: go-ipfs-staging
- spec:
- capacity:
- storage: 5Mi
- volumeMode: Filesystem
- accessModes:
- - ReadWriteOnce
- persistentVolumeReclaimPolicy: Retain # Keep 4eva
- storageClassName: default
- mountOptions:
- - hard
- - nfsvers=3
- nfs:
- path: /mnt/DroboFS/Shares/Kubernetes/volumes/static/go-ipfs-staging
- server: 10.42.42.10
- claimRef:
- name: go-ipfs-staging
- namespace: default
- ---
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- name: go-ipfs-staging
- annotations:
- nfs.io/storage-path: "go-ipfs"
- spec:
- storageClassName: default
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 5Mi
- status: {}
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: go-ipfs
- spec:
- replicas: 1
- selector:
- matchLabels:
- run: go-ipfs
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- run: go-ipfs
- spec:
- containers:
- # - image: ipfs/go-ipfs:latest
- - image: yrzr/go-ipfs-arm64v8:latest
- name: go-ipfs
- ports:
- - containerPort: 4001
- protocol: TCP
- - containerPort: 4001
- protocol: UDP
- - containerPort: 5001
- protocol: TCP
- - containerPort: 8080
- protocol: TCP
- resources: {}
- volumeMounts:
- - mountPath: /data/ipfs
- name: go-ipfs-data
- - mountPath: /export
- name: go-ipfs-staging
- restartPolicy: Always
- # This didn't seem to do what I want/need
- # affinity:
- # podAntiAffinity:
- # requiredDuringSchedulingIgnoredDuringExecution: #<---- hard requirement not to schedule "nginx" pod if already one scheduled.
- # - topologyKey: kubernetes.io/hostname # <---- Anti affinity scope is host
- # labelSelector:
- # matchLabels:
- # app: go-ipfs
- # topologySpreadConstraints:
- # - maxSkew: 1
- # topologyKey: kubernetes.io/hostname
- # whenUnsatisfiable: DoNotSchedule
- # labelSelector:
- # matchLabels:
- # app: go-ipfs
- volumes:
- - name: go-ipfs-data
- persistentVolumeClaim:
- claimName: go-ipfs-data
- - name: go-ipfs-staging
- persistentVolumeClaim:
- claimName: go-ipfs-staging
- status: {}
- ---
- # Hosting
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- name: go-ipfs-ingress
- annotations:
- cert-manager.io/cluster-issuer: "letsencrypt-prod"
- ## basic auth for go-ipfs
- # type of authentication
- #nginx.ingress.kubernetes.io/auth-type: basic
- # name of the secret that contains the user/password definitions
- #nginx.ingress.kubernetes.io/auth-secret: basic-auth
- # message to display with an appropriate context why the authentication is required
- #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Go-IPFS'
- spec:
- tls:
- - hosts:
- - ipfs.monkeybox.org
- secretName: go-ipfs-tls
- rules:
- - host: ipfs.monkeybox.org
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: go-ipfs
- port:
- number: 8080
|