diff --git a/ConvertX/deployment.yaml b/ConvertX/deployment.yaml new file mode 100644 index 0000000..542b6a8 --- /dev/null +++ b/ConvertX/deployment.yaml @@ -0,0 +1,69 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: convertxthing-deployment + labels: + project: convertx + + +spec: + replicas: 1 + selector: + matchLabels: + pod-project: convertx + template: + metadata: + labels: + pod-project: convertx + spec: + automountServiceAccountToken: false # Container doesn't need service account token + securityContext: + appArmorProfile: + type: RuntimeDefault + runAsNonRoot: true + fsGroup: 1500 + runAsGroup: 1500 + runAsUser: 1500 + containers: + - name: convertx + image: ghcr.io/c4illin/convertx:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3000 + name: http + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 3000 + initialDelaySeconds: 5 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 2 + livenessProbe: + httpGet: + path: / + port: 3000 + + resources: + requests: + cpu: 150m + memory: 128Mi + volumeMounts: + - name: convertxthing-data + mountPath: /app/data + env: + # - name: HTTP_ALLOWED + # value: "true" + - name: AUTO_DELETE_EVERY_N_HOURS + value: "1" + + + + + volumes: + - name: convertxthing-data + persistentVolumeClaim: + claimName: convertxthing-data-pvc + readOnly: false diff --git a/ConvertX/netPolicy.yaml b/ConvertX/netPolicy.yaml new file mode 100644 index 0000000..e9d5fe0 --- /dev/null +++ b/ConvertX/netPolicy.yaml @@ -0,0 +1,33 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: convertxthing-networkpolicy + labels: + project: convertx +spec: + podSelector: + matchLabels: + pod-project: convertx + egress: + + + ingress: + + # Example for how to only allow connections from + # a namespace with a reverse proxy and specific pods + + # - from: + # - namespaceSelector: + # matchLabels: + # ns-name: + # podSelector: + # matchLabels: + # podDomain: + # ports: + # - protocol: TCP + # port: 3000 + + + policyTypes: + - Ingress + - Egress \ No newline at end of file diff --git a/ConvertX/pvc.yaml b/ConvertX/pvc.yaml new file mode 100644 index 0000000..f76d441 --- /dev/null +++ b/ConvertX/pvc.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: convertxthing-data-pvc + labels: + project: convertx +spec: + # https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes-1 + accessModes: + # - ReadOnlyMany + - ReadWriteOnce + # - ReadWriteMany + resources: + requests: + storage: 512Mi diff --git a/ConvertX/service.yaml b/ConvertX/service.yaml new file mode 100644 index 0000000..9bc20c5 --- /dev/null +++ b/ConvertX/service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + name: convertxthing-service + labels: + project: convertx + +spec: + selector: + pod-project: convertx + # This isn't used as Ingress is doing TLS termination + # type: LoadBalancer + type: ClusterIP + ports: + - protocol: TCP + port: 3000 # <- port that will be exposed + # targetPort: 3000 +