-
Notifications
You must be signed in to change notification settings - Fork 7
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
Inconsistent handling of the userame
for container-registries
in .lagoon.yml
#309
Comments
There is an alternative way to solve this (since #263) that the documentation needs to be updated to explain. The way we address this, and the way we will support now, is to add variable(s) to the project or environment in the API that are named like this.
This way you don't need to update the the If you use an alternative registry, and your
Then your variables would be this, where the registry name
The downside to this is that you still need to define both the
|
@shreddedbacon Is this a deliberate approach or a defect? |
Yes, I know. We don't plan to have it ever consume a variable that is defined in the |
This issue is not about any new ways of providing those variables. It is about inconsistency in handling configuration: one config value supports variables and another does not. this is weird.
|
Yes, I understand your frustration. The documentation needs to be updated to indicate the recommended path. The way the password is consumed using a variable override is NOT going to be our recommended approach, and the documentation will be updated to reflect this. The recommended approach will be to use the
I understand the concern here, but this is just because the name is matched against what is defined in the |
This PR #263 allows you to override what is already defined in But
Does it mean that i must have As a developer, I want to have 1 way and I want it to be consistent. |
Yes, I mentioned that above. I know this isn't great, but we need to work out how we can address it in a different way.
|
@shreddedbacon Does this whole thing need to be so complicated? Can we just have 2 ways without magic naming like
and
At the end, it all adds up to the developer's experience. |
It isn't really that complicated though, the reason we decided to go with the As it is possible to have multiple container-registries, for example if I had the following registries:
I know that I can quickly change the password for It also means a user can on the fly change a hardcoded password in the |
@shreddedbacon But my original question still stands: why is |
It was a decision that was made at the time container registry support was introduced. At the time it was initially introduced we needed support for being able to change passwords. Usernames were probably not considered as something that would be changing often and hardcoding them was seen as acceptable. After seeing how the majority of our customers in AIO cloud utilised this feature, and some feedback we received from one of our larger customers, we revised it and ended up on the It is also possible that in the future you may be able to define container-registries entirely in the API without needing to set anything in your |
Thank you for explaining. Looks like this was an intentional decision. It would help people like me, who set up projects, to have a consistent way to define both username and password. To me, this issue is still relevant, but please feel free to close if there’s no intention to support this way going forward. |
We will get the documentation updated to mention using the The current method described in the docs will be moved to a "still supported, but not recommended" section to remain backwards compatible. |
Docs say
This works.
username: DOCKER_USER
does not take the value from the $DOCKER_USER variable. It usesDOCKER_USER
as a literal string.But the expectation is that a username can also be provided from a variable.
It is not clear why this configuration item is treated in a custom way.
This adds an additional step to the project setup where I need to explicitly modify the
.lagoon.yml
file to put the name instead of just populate the config map with another variable.The text was updated successfully, but these errors were encountered: