apiVersion: apps/v1
kind: Deployment
metadata:
  name: mysql
  labels:
    service: mysql
spec:
  replicas: 1
  selector:
    matchLabels:
      service: mysql
  template:
    metadata:
      labels:
        service: mysql
        date: "{{ .Release.Time.Seconds }}"
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      containers:
      - name: mysql
        image: nthingsm/rs-mysql:{{ .Values.ImageTag }}
        imagePullPolicy: Always
        # added for Istio
        securityContext:
          capabilities:
            add: ["NET_ADMIN"]
        ports:
        - containerPort: 3306
        resources:
          limits:
            cpu: 200m
            memory: 800Mi
          requests:
            cpu: 100m
            memory: 400Mi
      restartPolicy: Always
