apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: czz-to-erp-processor
  name: czz-to-erp-processor
spec:
  replicas: 1
  selector:
    matchLabels:
      app: czz-to-erp-processor
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: czz-to-erp-processor
    spec:
      containers:
        - env:
            - name: SPRING_KAFKA_BOOTSTRAP_SERVERS
            # Sustituir namespace-cliente por el que corresponda
              value: kafka-svc.namespace-cliente.svc.cluster.local:9092
            - name: uidActividad
              value: 
            - name: uidInstancia
              value: 
          envFrom:
            - configMapRef:
                name: czz-config
                optional: false
            - secretRef:
                name: czz-db-pass
                optional: false
          image: >-
            europe-west3-docker.pkg.dev/czz-devops/comerzzia/czz-to-erp/processor-kafka-application:1.1
          imagePullPolicy: Always
          name: czz-to-erp-processor
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: regcred-czz
      restartPolicy: Always
      
---
apiVersion: v1
kind: Service
metadata:
  name: czz-to-erp-processor-svc
spec:
  ports:
    - name: apps
      port: 8080
      protocol: TCP
      targetPort: 8080
    - name: metrics
      port: 8081
      protocol: TCP
      targetPort: 8081
  selector:
    app: czz-to-erp-processor




