apiVersion: v1
kind: ReplicationController
metadata:
  labels:
    name: mattermost
  name: mattermost-controller
spec:
  replicas: 1
  selector:
    name: mattermost
  template:
    metadata:
      labels:
        name: mattermost
    spec:
      containers:
      - image: jkpark/mattermost-docker
        name: mattermost
        env:
        - name: MYSQL_USER
          value: "mmuser"
        - name: MYSQL_PASSWORD
          value: "mmuserpass"
        - name: MYSQL_DATABASE
          value: mattermost
        - name: MYSQL_HOST
          value: 104.155.199.31
        ports:
        - containerPort: 80
          name: rocketchat
        volumeMounts:
        - name: mattermost-persistent-storage
          mountPath: /mattermost/config
      volumes:
        - name: mattermost-persistent-storage
          gcePersistentDisk:
            pdName: mattermost-1
            fsType: ext4
