---
apiVersion: "v1"
kind: "List"
items:
  - apiVersion: "v1"
    kind: "Service"
    metadata:
      name: 'canary'
    spec:
      type: 'LoadBalancer'
      selector:
        name: 'canary'
      ports:
        -
          name: "http"
          port: 80
          targetPort: 9292
          protocol: "TCP"

  - apiVersion: "v1"
    kind: "ReplicationController"
    metadata:
      name: 'canary'
      labels:
        name: 'canary'
    spec:
      replicas: 3
      template:
        metadata:
          name: 'canary'
          labels:
            name: 'canary'
        spec:
          containers:
            - name: 'canary'
              image: 'rtyler/codevalet-canary:latest'
              imagePullPolicy: Always
              ports:
                - containerPort: 9292
              env:
                - name: PRODUCTION
                  value: 'true'
                - name: SENTRY_DSN
                  valueFrom:
                    secretKeyRef:
                      name: webapp
                      key: sentry
                - name: SENTRY_API_TOKEN
                  valueFrom:
                    secretKeyRef:
                      name: canary
                      key: sentry
              livenessProbe:
                httpGet:
                  path: /
                  port: 9292
                initialDelaySeconds: 60
                timeoutSeconds: 10

# vim: ft=yaml

---
apiVersion: "v1"
kind: "List"
items:
  - apiVersion: "v1"
    kind: "Service"
    metadata:
      name: 'canary'
    spec:
      type: 'LoadBalancer'
      selector:
        name: 'canary'
      ports:
        -
          name: "http"
          port: 80
          targetPort: 9292
          protocol: "TCP"

  - apiVersion: "v1"
    kind: "ReplicationController"
    metadata:
      name: 'canary'
      labels:
        name: 'canary'
    spec:
      replicas: 3
      template:
        metadata:
          name: 'canary'
          labels:
            name: 'canary'
        spec:
          containers:
            - name: 'canary'
              image: 'rtyler/codevalet-canary:latest'
              imagePullPolicy: Always
              ports:
                - containerPort: 9292
              env:
                - name: PRODUCTION
                  value: 'true'
                - name: SENTRY_DSN
                  valueFrom:
                    secretKeyRef:
                      name: canary
                      key: sentry
                - name: SENTRY_API_TOKEN
                  valueFrom:
                    secretKeyRef:
                      name: canary
                      key: sentryapi
              livenessProbe:
                httpGet:
                  path: /
                  port: 9292
                initialDelaySeconds: 60
                timeoutSeconds: 10

# vim: ft=yaml

Use a different DSN for Canary errors
Use a different DSN for Canary errors
