Skip to content

COLLECTIONS env variable is ignored by crowdsec-agent #322

Description

@hanspaerna

Hi. I've inspected the source of docker-start.sh and environment variables inside a deployed crowdsec-agent pod, and couldn't find any indications of this value being processed and used anyhow. Setting it has no effect on a list of installed collections.

/kind bug
/area agent

Activity

  1. github-actions commented on Jan 7, 2026

    @github-actions

    @hanspaerna: Thanks for opening an issue, it is currently awaiting triage.

    If you haven't already, please provide the following information:

    • kind : bug, enhancementor documentation
    • area : agent, appsec, configuration, cscli, local-api

    In the meantime, you can:

    1. Check Crowdsec Documentation to see if your issue can be self resolved.
    2. You can also join our Discord.
    3. Check Releases to make sure your agent is on the latest version.
    Details

    I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the forked project rr404/oss-governance-bot repository.

  2. github-actions commented on Jan 7, 2026

    @github-actions

    @hanspaerna: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.

    • /kind bug
    • /kind documentation
    • /kind enhancement
    Details

    I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the forked project rr404/oss-governance-bot repository.

  3. added
    kind/bugSomething isn't working
    and removed on Jan 7, 2026
  4. LaurenceJJones commented on Jan 7, 2026

    @LaurenceJJones
    Contributor

    the custom startup is only used for the LAPI pods (according to note at top of file :D ), where are you defining this environment as it should be only applied to agent containers and not LAPI?

    ## formatting is probably broken but just for reference 
    agent:
      env:
        - name: COLLECTIONS
          value: "crowdsecurity/linux"
  5. hanspaerna commented on Jan 7, 2026

    @hanspaerna
    Author

    Ah, so the custom startup script is not involved into this at all. I'm actually setting the COLLECTIONS env to crowdsec-agent pod, not LAPI. I can show you a piece of the manifest that I create with Kustomize patches and deploy:

    spec:
      selector:
        matchLabels:
          k8s-app: crowdsec
          type: agent
      template:
        metadata:
          annotations:
             ...
          labels:
            k8s-app: crowdsec
            type: agent
            version: v1
         spec:
           containers:
           - name: crowdsec-agent
             image: crowdsecurity/crowdsec:v1.7.4
             command:
             - sh
             - -c
             - cp /tmp_config/local_api_credentials.yaml /staging/etc/crowdsec/local_api_credentials.yaml
               && ./docker_start.sh
             env:
             - name: DISABLE_LOCAL_API
               value: "true"
             - name: DISABLE_ONLINE_API
               value: "true"
             - name: CROWDSEC_BYPASS_DB_VOLUME_CHECK
               value: "true"
             - name: LOCAL_API_URL
               value: http://crowdsec-service.crowdsec:8080
             - name: COLLECTIONS
               value: crowdsecurity/traefik
    
  6. hanspaerna commented on Jan 7, 2026

    @hanspaerna
    Author

    On the other hand, if the generated manifest has the variable declared in a right place, then this might be a problem with the Docker image itself.

  7. LaurenceJJones commented on Jan 7, 2026

    @LaurenceJJones
    Contributor

    After deploying what are the pod logs cause the the image will print out all the startup logs (including downloading the hub items from env)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions