-
Notifications
You must be signed in to change notification settings - Fork 66
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
Helm chart config for individual hubs as separate files rather than one cluster-level config #857
Comments
I think this issue will also need to be thought about in terms of #818 as well. The current proposal there is:
So a directory tree might look something like:
|
<name>.cluster.yaml
files into <name>.chart-config.yaml
files?<k8s-cluster-name>.cluster.yaml
files into <hub-name>.hub.chart-config.yaml
files?
<k8s-cluster-name>.cluster.yaml
files into <hub-name>.hub.chart-config.yaml
files?<k8s-cluster-name>.cluster.yaml
files into <hub-name>.hub.helm-chart-config.yaml
files?
Thanks @sgibson91 for chiming in! I'll try to chime in at #818 regarding that as well but will try to avoid mixing the scopes of these issues that still represents somewhat different needs. If we can reach agreement on extracting the helm chart config into a standalone file is a good idea, its a big step forward for this issue no matter what is done with regards to the bigger structure refactoring in #818. |
Just jumping in quickly from vacation to say that I think the proposal in #818 (comment) sounds reasonable to me. It feels to me that resolving this issue / that comment could be considered a precursor to resolving #818 (or sub-task of resolving it). If we think we are heading in the direction of factoring out hub- and cluster-specific configuration into separate config, I'd be +1 on going for it now. Anything that can lay a long-term groundwork that we are happy with is a good idea to do now, while there are relatively fewer unique clusters/hubs to maintain. Can anybody give a strong reason why we want to keep the configuration combined? If not, I think we should just put this on our backlog and do it |
Right now, we can use YAML anchors to refer to a prod hub that has the same config as a staging hub - like in
|
I suggest that the deployer script is then made able to recognize multiple separate values files, just like |
This is interesting: https://stackoverflow.com/questions/44910886/pyyaml-include-file-and-yaml-aliases-anchors-references, although it feels unstable, not reliable enough... |
@damianavila what did this pattern refer to in "maybe we should avoid running with this pattern?" If we want to have shared configuration between hubs etc, I'm thinking we can handle it by having shared values files rather than anchors in a single massive file, and to have the shared values files be used like For me, the R2R is improved by reduced complexity and ease of comprehension to a large extent. I'm thinking that spitting apart the k8s cluster config files we currently have into helm chart native values files is an improvement regarding complexity and ease of comprehension. |
The pattern of relying on anchors to avoid duplication... I am thinking if it makes sense to be repetitive for the sake of explicity...
I totally agree with that! And I think your proposal with several "value" files is probably a good compromise between easiness to comprehend and not being so repetitive... |
Ah thanks for clarifying @damianavila! |
Update: let's make a proposalIn our team meeting today, we agreed that we have had enough discussion around this that it's time to make a proposal for configuration structure that we can iterate on. @consideRatio and @sgibson91 were interested in working together to come up with something that we can then iterate on. |
<k8s-cluster-name>.cluster.yaml
files into <hub-name>.hub.helm-chart-config.yaml
files?
A summary of the work I see needed to resolve this and other related issuesThis issue was created about one goal, but I hope to see multiple goals solved with the proposed API changes to our configuration that the deployer script reads.
I'm not sure what proposal of changes to our custom configuration structure is needed, but I'd like us to consider these kinds of challenges when coming up with a config structure proposal. |
RE: swapping YAML anchors for separate values file, I wonder if it's a good idea to replicate the |
About So, concretely - the deployer script will deploy a helm chart based on values files explicitly specified - not by naming convention. I think that will solve situations where you for example want to have multiple common.yaml files that you opt into. There is a restriction though, which is that multiple values files that are coalesced will merge in the |
Some concrete ideas
(I'm taking a computer break for today now!) |
So long as I can still write I'm also think I need some help understanding/visualising your other suggestions and how that relates to just isolating config for validation or deployment? (But we can iterate on that!) |
Absolutely, I'm thinking the values files are explicit because they are part of the deployer scripts configuration. |
The currently proposal is outline in https://hackmd.io/@29EjZnuAQx-ME7Olgi2JXw/Sk5S7xP6F and looks something like the following (exact details TBD) config
└── clusters
├── cluster_1
│ ├── cluster.yaml
│ ├── prod.hub.values.yaml
│ ├── staging.hub.values.yaml
│ └── support.values.yaml
└── cluster_2
├── cluster.yaml
├── prod.hub.values.yaml
├── staging.hub.values.yaml
└── support.values.yaml @choldgraf asked what a version for communities for with more than one hub on a cluster might look like, possibly something like this config
└── clusters
├── cluster_1
| ├── community_A
| | ├── staging.hub.values.yaml
| | └── prod.hub.values.yaml
│ ├── cluster.yaml
│ ├── prod.hub.values.yaml
│ ├── staging.hub.values.yaml
│ └── support.values.yaml
└── cluster_2
├── cluster.yaml
├── prod.hub.values.yaml
├── staging.hub.values.yaml
└── support.values.yaml I think we would have to be careful in terms of name clashing here though... ... Actually maybe a better to address this is to have the filename convention
|
In that case, I guess we would not have a |
@damianavila The thought still needs fleshing out, but I don't think it's critical right now as we don't currently host any hubs following that pattern. |
I think that with the recent refactors, we could now close this one some relevant PRs:
is that right? |
I believe so, unless it is strongly felt that the support config is also included in this umbrella? |
Hmm - I'll leave the answer to that question up to the @2i2c-org/tech-team because I don't understand the implications. Is there a strong reason to block closing this issue on grouping the support config as well? |
Let's close and start fresh for anything remaining! |
I think it is a recurring pain point that the helm chart config are embedded in
config/hubs/<k8s-cluster-name>.cluster.yaml
files that doesn't have a typical helm chart config. I have found this to be troublesome for myself during local development and debugging, and I'm now running into a situation where additional complexity would be required to do somehelm template
validation logic for our CI system to resolve #279.I'd like to propose that we extract the helm chart specific config from
<k8s-cluster-name>.cluster.yaml
into<hub-name>.hub.helm-chart-config.yaml
for example.I would argue that doing this will reduce the overall complexity of things as well, and that it would move us in the right direction with regards to ease of maintenance and supporting a practical right to replicate.
Tasks to close issue
Work blocked by this
I'll wait with investing more time into trying to resolve #279 until we have an agreement on what to do with regards to having the helm chart config embedded in a non-helm-chart config yaml file.
If we agree to extract the helm chart specific config, I can keep working on a PR to close #279 that can be merged as soon as we have resolved this.
The text was updated successfully, but these errors were encountered: