---
kind: ReplicationController
apiVersion: v1
metadata:
  name: guestbook
  labels:
    app: guestbook
spec:
  replicas: 3
  selector:
    app: guestbook
  template:
    metadata:
      labels:
        app: guestbook
      annotations:
        prometheus.io/port: '3000'
        prometheus.io/scrape: 'true'
    spec:
      containers:
      - name: guestbook
        image: gcr.io/siarkowicz-prometheus-example/guestbook
        imagePullPolicy: Always
        ports:
        - name: http-server
          containerPort: 3000
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: purpose
                operator: NotIn
                values:
                - monitoring
