diff --git a/dev-upgrade/yapi/mongo.yaml b/dev-upgrade/yapi/mongo.yaml new file mode 100644 index 0000000..5a633d8 --- /dev/null +++ b/dev-upgrade/yapi/mongo.yaml @@ -0,0 +1,66 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: mongo-yapi +spec: + replicas: 1 + serviceName: mongo-yapi + selector: + matchLabels: + app: mongo-yapi + template: + metadata: + labels: + app: mongo-yapi + spec: + initContainers: + - name: init + image: busybox + imagePullPolicy: IfNotPresent + command: + - sh + - -c + - | + sysctl -w net.ipv4.tcp_keepalive_time=300 + sysctl -w net.ipv4.tcp_keepalive_intvl=10 + sysctl -w net.ipv4.tcp_keepalive_probes=3 + securityContext: + privileged: true + containers: + - name: mongo-yapi + image: mongo:6.0.6 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 27017 + volumeMounts: + - name: mongo-yapi + mountPath: /data/db + volumes: + - name: mongo-yapi + hostPath: + path: /data/yapi/mongo + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "kubernetes.io/hostname" + operator: In + values: + - bfs-k8snode-10-2-0-15.hetzner.base.beaconfireinc.com + +--- +apiVersion: v1 +kind: Service +metadata: + name: mongo-yapi +spec: + selector: + app: mongo-yapi + ports: + - name: mongo-yapi + protocol: TCP + port: 27017 + targetPort: 27017 + type: ClusterIP + diff --git a/dev-upgrade/yapi/yapi.yaml b/dev-upgrade/yapi/yapi.yaml new file mode 100644 index 0000000..e2cbddf --- /dev/null +++ b/dev-upgrade/yapi/yapi.yaml @@ -0,0 +1,40 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: yapi +spec: + replicas: 1 + selector: + matchLabels: + app: yapi + template: + metadata: + labels: + app: yapi + spec: + imagePullSecrets: + - name: docker-hub + containers: + - name: yapi + image: beaconfireiic/yapi:latest + imagePullPolicy: Always + ports: + - name: http + containerPort: 3000 + protocol: TCP + +--- +apiVersion: v1 +kind: Service +metadata: + name: yapi +spec: + type: ClusterIP + ports: + - name: http + protocol: TCP + port: 3000 + targetPort: http + selector: + app: yapi \ No newline at end of file