wongnai / kube-slack

Kubernetes Slack Monitoring
MIT License
322 stars 58 forks source link

Use `annotations` instead of `labels` #20

Closed chribsen closed 6 years ago

chribsen commented 6 years ago

After merging PR #19 I realized that the commit used Kubernetes Labels and not Annotations (which was the original intention). This PR changes labels --> annotations.

chribsen commented 6 years ago

Feature can be "tested" using the following k8s spec:

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: inexisting
  namespace: kube-system
spec:
  replicas: 1
  revisionHistoryLimit: 3
  template:
    metadata:
      annotations:
          kube-slack/ignore-pod: "true"
      name: inexisting
      labels:
        app: inexisting
    spec:
      containers:
      - name: inexisting
        image: willwill/inexisting