apiVersion: apps/v1
kind: Deployment
metadata:
  name: co-customer
  namespace: tibco-others-uat
spec:
  replicas: 1
  selector:
    matchLabels:
      app: co-customer
  template:
    metadata:
      labels:
        app: co-customer
    spec:
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      containers:
      - name: co-customer
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
             drop:
             - ALL
        image: image-registry.openshift-image-registry.svc:5000/tibco-others-sit/
co-customer:1.1.17
        imagePullPolicy: IfNotPresent
        resources:
          limits:
             cpu: '1'
             memory: 1Gi
          requests:
             cpu: 500m
             memory: 512Mi
        env:
          - name: BW_JAVA_OPTS
             value: '-Duser.timezone=WIB -Dbw.engine.opentracing.enable=true -
Dbw.application.activity.validateOutput=false -
Dbw.application.activity.validateInput=false'
          - name: BW_PROFILE
             value: 'SIT'
          - name: CUSTOM_LOGBACK
             value: 'true'
          - name: common.shared.Log.LogReferenceEnabled
             value: 'true'
          - name: common.shared.Log.Level
             value: 'INFO'
          - name: common.shared.Log.PayloadEnabled
             value: 'true'
          - name: co.customer.co-HttpConnection.Httpport
             value: '8084'
          - name: bs.customer.client.bs-httpConnection.port
             value: '80'
          - name: bs.customer.client.bs-httpConnection.hostname
             value: 'bs-customer-uat.apps.ocpmwdev.ioh.co.id'
          - name: co.customer.Flag1Channels
             value: 'MYIM3IO,Chatbot_WA'
          - name: bs.customer.client.bs-httpConnection.Timeout
            value: '30'
          - name: bs.customer.client.bs-httpConnection.HttpMaxConnHost
            value: '20'
          - name: bs.customer.client.bs-httpConnection.HttpMaxConn
            value: '200'
          - name: co.customer.Flag2Channels
            value: 'V2MYIM3,LTS'
        ports:
          - containerPort: 8084
---
apiVersion: v1
kind: Service
metadata:
  name: co-customer
  namespace: tibco-others-uat
  labels:
    app: co-customer
spec:
  type: NodePort
  selector:
    app: co-customer
  ports:
    - name: co-customer-8084-tcp
      protocol: TCP
      port: 8080
      targetPort: 8084
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: co-customer
  namespace: tibco-others-uat
  labels:
    app: co-customer
spec:
  host: co-customer-uat.apps.ocpmwdev.ioh.co.id
  path:
  to:
    kind: Service
    name: co-customer
    weight: 100
  port:
    targetPort: 8084