apiVersion: apps/v1
kind: Deployment
metadata:
  name: mike-zebra-age
  namespace: prj-mike-test
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mike-zebra-age
  template:
    metadata:
      labels:
        app: mike-zebra-age
    spec:
      containers:
      - name: mike-zebra-age
        image: hub.ucloudadmin.com/mike/age:0.0.1
        imagePullPolicy: Always
        ports:
          - containerPort: 5380
          - containerPort: 5381
        env:
          - name: MYSQL_ADDR
            value: "[2002:ac14:fecd:1:0:ff:aaf:7c1]:3306"
          - name: MYSQL_USERNAME
            value: "root"
          - name: MYSQL_PASSWORD
            value: "@Ussg3306"
          - name: MYSQL_DATABASE
            value: "zebra"
          - name: FlAKE_ADDR
            value: "mike-zebra-flake"
        readinessProbe:
          exec:
            command: ["/usr/local/bin/grpc_health_probe", "-addr=:5380"]
          initialDelaySeconds: 5
        livenessProbe:
          exec:
            command: ["/usr/local/bin/grpc_health_probe", "-addr=:5380"]
          initialDelaySeconds: 10
        resources:
          requests:
            cpu: "50m"
            memory: "512Mi"
          limits:
            cpu: "2000m"
            memory: "4096Mi"