distribution: notification endpoints cannot be configured with environment variables
We are using the notification API to build an index of images pushed for building a search API. We have a configuration like -
notifications:
endpoints:
- name: pandora
url: http://our-event-server.orgname.net/events
timeout: 1s
threshold: 10
backoff: 1s
disabled: false
Can we do something like REGISTRY_NOTIFICATIONS_ENDPOINTS_NAME_URL=<the_url_here> Since the endpoints is a list, I am not really sure what is the convention for defining environment variables are for this section.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 25 (4 by maintainers)
FYI
I’ve just adapted the @sshipway solution to a
docker-compose.ymlfile, and this works nicely:What about taking the
REGISTRY_NOTIFICATIONS_ENDPOINTS_*variables like arrays/slices? confd is doing something similar with environment variables. Than you should be able to do something like this:Since its yet not clear if things do work out and i found this issue searching for something else - it does work out setting it using the ENV variables
https://github.com/EugenMayer/docker-rancher-extra-catalogs/blob/master/templates/registry-slim/12/docker-compose.yml#L60
Or like in this concrete setup: https://github.com/EugenMayer/docker-image-portus/blob/master/test/docker-compose.yml#L68
I ran into this problem too.
I wanted to configure an Storage Middleware and only could do it with @lifeisfoo solution.
In spirit of trying to find a solution, I did write some Go Code (taken that I’m not a native go developer) and with my naive approach I could make what @tboerger suggested work.
However I don’t quite know how to contribute this, or if there’s a pending discussion or if it’s even good enough Go code 😂
Code is here
I just ran into this It’s a bit confusing, I think, in that you have a subset of the configuration options that are “special” and can’t be configured like everything else can when running using the pre-built container. I couldn’t find this documented anywhere and spent many hours trying to figure out why it wasn’t working.
Perhaps implementing support for EVs for configuring a single notification target is a suitable solution which will meet the needs of most people?
But for now, What do I use as the base for the configuration file? I want to ensure that I don’t inadvertently change something else by not using the correct starting point. Is it safe to create a new file and only specify the options I was previously using EVs for?