apiVersion: v1
kind: ReplicationController
metadata:
  name: sql-rc
  namespace: nyc-tickets-api
  labels:
    name: sql-rc
spec:
  replicas: 1
  selector:
    name: sql-pod
    deployment: sql-initial
  template:
    metadata:
      labels:
        name: sql-pod
        deployment: sql-initial
        status: sql-active
    spec:
      containers:
      - name: master
        image: mysql:5.7
        imagePullPolicy: IfNotPresent
        env:
          - name: MYSQL_ROOT_PASSWORD
            value: badrootpass
          - name: MYSQL_DATABASE
            value: nyc
          - name: MYSQL_USER
            value: nyc
          - name: MYSQL_PASSWORD
            value: nycpwd
        ports:
        - containerPort: 3306
        resources:
          limits:
            cpu: 100m
            memory: 256Mi
