apiVersion: apps/v1
kind: Deployment
metadata:
  name: co-idcc
  namespace: tibco-others-uat
spec:
  replicas: 1
  selector:
    matchLabels:
      app: co-idcc
  template:
    metadata:
      labels:
        app: co-idcc
    spec:
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      containers:
      - name: co-idcc
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
             drop:
             - ALL
        image: image-registry.openshift-image-registry.svc:5000/tibco-others-sit/
co-idcc:1.0.5
        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: CO-IDCC.module.Port
             value: '8550'
          - name: bi.air.client.ClientPort
             value: '80'
          - name: bs.customer.profile.client.CustomerProfile.MaxConn
             value: '200'
          - name: bs.customer.profile.client.CustomerProfile.ClientPort
             value: '80'
          - name: bs.customer.profile.client.CustomerProfile.Activity_timeout
             value: '10'
          - name: bs.customer.profile.client.CustomerProfile.ClientHost
            value: 'bs-customer-profile-uat.apps.ocpmwdev.ioh.co.id'
          - name: bs.customer.profile.client.CustomerProfile.MaxConnHost
            value: '20'
          - name: common.shared.Log.PayloadEnabled
            value: 'true'
        ports:
          - containerPort: 8550
---
apiVersion: v1
kind: Service
metadata:
  name: co-idcc
  namespace: tibco-others-uat
  labels:
    app: co-idcc
spec:
  type: NodePort
  selector:
    app: co-idcc
  ports:
    - name: co-idcc-8550-tcp
      protocol: TCP
      port: 8080
      targetPort: 8550
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: co-idcc
  namespace: tibco-others-uat
  labels:
    app: co-idcc
spec:
  host: co-idcc-uat.apps.ocpmwdev.ioh.co.id
  path:
  to:
    kind: Service
    name: co-idcc
    weight: 100
  port:
    targetPort: 8550