apiVersion: apps/v1
kind: Deployment
metadata:
  name: jenkins-apjung-backend-prod-agent-deploy
  namespace: jenkins
  labels:
    app.kubernetes.io/name: jenkins-apjung-backend-prod-agent
    app.kubernetes.io/instance: jenkins-apjung-backend-prod-agent-deploy
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/instance: jenkins-apjung-backend-prod-agent-pod
  template:
    metadata:
      labels:
        app.kubernetes.io/name: jenkins-apjung-backend-prod-agent
        app.kubernetes.io/instance: jenkins-apjung-backend-prod-agent-pod
    spec:
      containers:
        - name: jenkins-apjung-backend-prod-agent-pod
          image: jenkins/inbound-agent:latest-jdk11
          ports:
            - containerPort: 8080
            - containerPort: 50000
          resources:
            requests:
              memory: "1600Mi"
              cpu: "500m"
            limits:
              memory: "1600Mi"
              cpu: "500m"
          env:
            - name: JENKINS_JAVA_OPTIONS
              value: "-Dorg.apache.commons.jelly.tags.fmt.timeZone=Asia/Seoul"
            - name: JENKINS_URL
              value: "http://jenkins-master-svc"
            - name: JENKINS_AGENT_NAME
              value: "apjung-backend-prod-agent"
          envFrom:
            - secretRef:
                name: apjung-backend-prod.secret-db
            - secretRef:
                name: apjung-backend-prod.secret-jwt
            - secretRef:
                name: apjung-backend-prod.secret-smtp
            - secretRef:
                name: jenkins-apjung-backend-prod-agent.secret
            - secretRef:
                name: apjung-backend-aws.secret
