107 lines
2.1 KiB
YAML
107 lines
2.1 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: link2cid
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
app: link2cid
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 80
|
|
targetPort: 3939
|
|
- name: https
|
|
protocol: TCP
|
|
port: 443
|
|
targetPort: 3939
|
|
|
|
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: link2cid
|
|
namespace: default
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: link2cid
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: link2cid
|
|
spec:
|
|
containers:
|
|
- image: {{ .Values.link2cid.containerName }}
|
|
name: link2cid
|
|
ports:
|
|
- containerPort: 3939
|
|
env:
|
|
- name: IPFS_URL
|
|
value: http://ipfs-service:5001
|
|
- name: PORT
|
|
value: '3939'
|
|
- name: API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: link2cid
|
|
key: apiKey
|
|
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: link2cid
|
|
namespace: default
|
|
annotations:
|
|
meta.helm.sh/release-name: fp
|
|
meta.helm.sh/release-namespace: default
|
|
labels:
|
|
app.kubernetes.io/managed-by: {{ .Values.managedBy }}
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 40Gi
|
|
storageClassName: {{ .Values.storageClassName }}
|
|
|
|
|
|
{{ if eq .Values.managedBy "Helm" }}
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: link2cid-ingress
|
|
namespace: default
|
|
annotations:
|
|
kubernetes.io/ingress.class: "nginx"
|
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
spec:
|
|
ingressClassName: nginx
|
|
secretTemplate:
|
|
annotations:
|
|
reflector.v1.k8s.emberstack.com/reflection-allowed: "true"
|
|
reflector.v1.k8s.emberstack.com/reflection-allowed-namespaces: ""
|
|
tls:
|
|
- hosts:
|
|
- link2cid.sbtp.xyz
|
|
secretName: link2cid-tls
|
|
rules:
|
|
- host: link2cid.sbtp.xyz
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: link2cid
|
|
port:
|
|
number: 80
|
|
---
|
|
|
|
{{ end }}
|