apiVersion: apps/v1
kind: Deployment
metadata:
  name: xagent
  labels:
    app: xagent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: xagent
  template:
    metadata:
      labels:
        app: xagent
    spec:
      serviceAccountName: xmatters
      containers:
        - name: xagent
          image: <image_location>
          env:
          - name: WEBSOCKET_HOST
            value: "instance.xmatters.com"
          - name: WEBSOCKET_SECRET
            valueFrom:
              secretKeyRef:
                name: xagent-keys
                key: WEBSOCKET_SECRET
          - name: OWNER_API_KEY
            valueFrom:
              secretKeyRef:
                name: xagent-keys
                key: OWNER_API_KEY
          - name: FRIENDLY_NAME
            value: "kube101"
          resources:
            limits:
              cpu: 500m
              memory: 512Mi
            requests:
              cpu: 150m
              memory: 128Mi
