Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Prometheus service discovery with Kubernetes annotations #866

Merged
merged 2 commits into from
Feb 1, 2020

Conversation

tomkerkhove
Copy link
Owner

Fixes #861

@tomkerkhove tomkerkhove changed the title Support Prometheus service discovery Support Prometheus service discovery with Kubernetes annotations Jan 31, 2020
@tomkerkhove
Copy link
Owner Author

Feel free to give our CI chart a try @hajdukd

@promitor-bot
Copy link

Docker image for this PR was built and is available on Docker Hub.

You can pull it locally via the CLI:

docker pull tomkerkhove/promitor-agent-scraper-ci:pr866

Want to verify the new version? Run it locally:

docker run -d -p 8999:80 --name promitor-agent-scraper-pr866 \
                         --env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
                         --env-file C:/Promitor/az-mon-auth.creds \
                         --volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml  \
                         --volume C:/Promitor/runtime-config.yaml:/config/runtime.yaml \
                         tomkerkhove/promitor-agent-scraper-ci:pr866

You can find a CI version of our Helm chart on hub.helm.sh

@tomkerkhove
Copy link
Owner Author

Without:
helm install promitor promitor/promitor-agent-scraper-ci --version 0.0.0-PR866 --dry-run

apiVersion: v1
kind: Service
metadata:
  name: promitor-promitor-agent-scraper-ci
  labels:
    app: promitor-agent-scraper-ci
    chart: promitor-agent-scraper-ci-0.0.0-PR866
    release: promitor
    heritage: Helm
    type: infrastructure
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/path: "/metrics"
    prometheus.io/port: "88"
spec:
  type: ClusterIP
  ports:
    - name: http
      port: 8888
      targetPort: 88
      protocol: TCP
  selector:
    app: promitor-agent-scraper-ci
    release: promitor
    type: runtime

Without:
helm install promitor promitor/promitor-agent-scraper-ci --version 0.0.0-PR866 --dry-run --set prometheus.enableServiceDiscovery=false

# Source: promitor-agent-scraper-ci/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
  name: promitor-promitor-agent-scraper-ci
  labels:
    app: promitor-agent-scraper-ci
    chart: promitor-agent-scraper-ci-0.0.0-PR866
    release: promitor
    heritage: Helm
    type: infrastructure
spec:
  type: ClusterIP
  ports:
    - name: http
      port: 8888
      targetPort: 88
      protocol: TCP
  selector:
    app: promitor-agent-scraper-ci
    release: promitor
    type: runtime

@promitor-bot
Copy link

Docker image for this PR was built and is available on Docker Hub.

You can pull it locally via the CLI:

docker pull tomkerkhove/promitor-agent-scraper-ci:pr866

Want to verify the new version? Run it locally:

docker run -d -p 8999:80 --name promitor-agent-scraper-pr866 \
                         --env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
                         --env-file C:/Promitor/az-mon-auth.creds \
                         --volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml  \
                         --volume C:/Promitor/runtime-config.yaml:/config/runtime.yaml \
                         tomkerkhove/promitor-agent-scraper-ci:pr866

You can find a CI version of our Helm chart on hub.helm.sh

@tomkerkhove tomkerkhove merged commit a9f0ef4 into master Feb 1, 2020
@tomkerkhove tomkerkhove deleted the helm-prometheus-discovery branch February 1, 2020 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants