apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: elasticsearch
    appMajor: "7"
    instance: status.elasticsearch.lib.unb.ca
    tier: database
    uri: status.elasticsearch.lib.unb.ca
    vcsOwner: unb-libraries
    vcsRepository: status.elasticsearch.lib.unb.ca
    vcsRef: prod
  name: status-elasticsearch-lib-unb-ca
  namespace: prod
spec:
  selector:
    matchLabels:
      uri: status.elasticsearch.lib.unb.ca
  replicas: 1
  revisionHistoryLimit: 0
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: elasticsearch
        appMajor: "7"
        instance: status.elasticsearch.lib.unb.ca
        tier: database
        uri: status.elasticsearch.lib.unb.ca
        vcsOwner: unb-libraries
        vcsRepository: status.elasticsearch.lib.unb.ca
        vcsRef: prod
    spec:
      nodeSelector:
        deployenv: prod
      containers:
        -
          env:
            -
              name: MYSQL_ROOT_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: mysql
                  key: root-password
          image: "||DEPLOYMENTIMAGE||"
          imagePullPolicy: Always
          name: status-elasticsearch-lib-unb-ca
          ports:
            -
              containerPort: 9200
              name: elasticsearch
          volumeMounts:
            -
              mountPath: /usr/share/elasticsearch/data
              name: elasticsearch-persistent-storage
      priorityClassName: vip-essential
      imagePullSecrets:
        -
          name: github-container-registry-auth
      restartPolicy: Always
      volumes:
        -
          name: elasticsearch-persistent-storage
          persistentVolumeClaim:
            claimName: status-elasticsearch-lib-unb-ca
