ansible icon indicating copy to clipboard operation
ansible copied to clipboard

enhancement: adding env/container labels options

Open BryanQuigley opened this issue 1 year ago • 2 comments

Add following

  • cadvisor_env_metadata_whitelist
  • cadvisor_whitelisted_container_labels
  • cadvisor_store_container_labels

Tested with this simple playbook:

---
- name: Install cAdvisor
  hosts: localhost
  become: yes
  tasks:
    - name: Import cAdvisor role
      import_role:
        name: cadvisor
      vars:
        cadvisor_docker_only: true
        cadvisor_enable_metrics: [ "cpu", "memory", "network", "oom_event" ]
        cadvisor_whitelisted_container_labels: [ "com.docker.compose.oneoff" ]
        cadvisor_env_metadata_whitelist: [ "JEKYLL_ENV", "PATH" ]
        cadvisor_store_container_labels: false

Also tested dropping the options, which is why I decided to explicitly set store_container_labels: true (which is the cadvisor default).

Closes: #403

BryanQuigley avatar Aug 02 '24 19:08 BryanQuigley

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and the docs are now incorporated into main: https://prometheus-community.github.io/ansible/branch/main

github-actions[bot] avatar Aug 02 '24 19:08 github-actions[bot]

The failures seem unrelated to the PR - failing to pull image.

BryanQuigley avatar Aug 13 '24 16:08 BryanQuigley

@gardar are you the right person to review? Thanks!

BryanQuigley avatar Aug 21 '24 17:08 BryanQuigley

Thanks! Just wanted to double check if any other action is needed before merging.

BryanQuigley avatar Sep 10 '24 20:09 BryanQuigley

Thanks! Just wanted to double check if any other action is needed before merging.

No sorry, I just needed to fix up the CI config a bit for the tests to pass successfully.

gardar avatar Sep 13 '24 14:09 gardar