Skip to content

Gcloud failing - file referenced in environment variable needs volume mapping #3

@Haulien

Description

@Haulien

So I've been updating my server from 8.3 and have run into an issue regarding Traefik.

With the 8.5 rewrite to make Traefik more modular (nice work!) it has broken providers that reference files in their environment variables. For example, Google Cloud's GCE_SERVICE_ACCOUNT_FILE environment variable, which gets mapped to a volume in v8.4 for later usage.

The fix for this is to go the old way, add the file referenced in the env variable as a volume. I hardcoded it in my fork, however obviously this isn't ideal....


Traefik also started erroring when using GCE_SERVICE_ACCOUNT_FILE,:

cannot get ACME client googlecloud: unable to get Google Cloud client: google: could not find default credentials

however changing the environment variable to GOOGLE_APPLICATION_CREDENTIALS as per Google's documentation, which is now also supported by go-acme/lego (and as such Traefik) it started to work with no issues (after the above hardcoding in my fork, without it it said the file referenced in the env was not found...)

I'd recommend switching GCE_SERVICE_ACCOUNT_FILE to GOOGLE_APPLICATION_CREDENTIALS however it could pose issues with those using gcloud currently... though for those using gcloud currently it's unlikely Traefik is working for them anyway using the newer versions...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions