apiVersion: apps/v1
kind: Deployment
metadata:
  name: mhc-sql-deployment
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 5 
  selector:
    matchLabels:
      app: mhc-sql
  template:
    metadata:
      labels:
        app: mhc-sql
    spec:
      containers:
      - name: mhc-sql
        image: mcr.microsoft.com/mssql/server
        ports:
        - containerPort: 1433
        env:
        - name: ACCEPT_EULA
          value: "Y"
        - name: SA_PASSWORD
          valueFrom:
            secretKeyRef:
                name: mhc-database
                key: password