apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: static-resource
  name: static-resource
  namespace: edoc2
spec:
  replicas: 1
  selector:
    matchLabels:
      app: static-resource
  template:
    metadata:
      labels:
        app: static-resource
    spec:
      hostname: static-resource
      containers:
      - image: 192.168.251.78/edoc2v5/static-resource:20230526085143_1203c1d935815f2d 
      #- image: 172.16.2.78/edoc2v5/static-resource:20230526085143_1203c1d935815f2d 
        imagePullPolicy: IfNotPresent
        name: static-resource
        envFrom:
        - configMapRef:
            name: envfile
        ports:
        - name: resource-5001
          containerPort: 5001
        - name: resource-5005
          containerPort: 15001
        securityContext:
          capabilities:
            add: ["SYS_PTRACE"]
      restartPolicy: Always
      nodeSelector:
        node.drive.nodelabels: InDrive
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: static-resource
  name: static-resource
  namespace: edoc2
spec:
  ports:
  - name: resource-5001
    port: 5001
    protocol: TCP
    targetPort: 5001
  - name: resource-5005
    port: 15001
    protocol: TCP
    targetPort: 15001
  selector:
    app: static-resource
  #sessionAffinity: ClientIP
  #sessionAffinityConfig:
  #  clientIP:
  #    timeoutSeconds: 5
  type: ClusterIP
