-
Notifications
You must be signed in to change notification settings - Fork 533
Support for partial override (variable substitutes) for CRD attributes #546
Comments
Overrides already allow per-cluster variation, just at the field level. For the use case you describe the entire image name would have to be provided for each cluster. Do you think the complexity of defining variables and a substitution mechanism are justified for such a use case, or is this use case a trivial example of something more involved? |
I realized the fed-v2 already allow change the whole value with Json path which is useful. But I would not feel this is a trivial example, especially for people continuously roll out applications. For a fast pace team, I want to deploy and roll out dozens times a day. If every time I have to make a call to change the deploymentoverrides config then change the deployment config, that would be really a bummer. Even getting harder with kubectl. Plus this is not something hard to implement, for a POC, it is easy enough to do something with a regex pattern like:
Certainly, for multi-cloud environments, there could be more involved use cases such as change annotations per release etc. |
@marun Please let me know if this a good thing to add in your mind. I can code the initial POC. With more thought over the weekends, I think this is a bigger multi-cluster (or cloud) |
@senyan I don't think variable substitution in overrides is something that fedv2 should support directly. There are many longstanding threads on this in Kubernetes, and I think for good reason efforts to incorporate it have been rejected time and again. There are many solutions outside of core Kube that do support variable substitution, and I encourage you to investigate them instead (e.g. helm, kustomize, envsubst, etc). Separetely, are you aware that varying the image for a deployment with overrides is not supported today (let alone with variable substitution)? |
@marun The exists of So, all CRD types includes deployment can be customized per cluster. And more advanced multi-cluster workflow can be supported. Wonder if you or people from |
The current API of fedv2 is intended to be low-level and not necessarily user-facing - it's intended to drive controllers. The integration point for higher-level functionality is intended to be the API rather than adding an explicit plugin mechanism to the controller manager. Higher-level functionality could be implemented as webhooks on the federation api types, or as new API types that could be acted upon by new controllers to generate the federated API types. As I alluded to in my previous comment, there are also a ton of tools outside the API (including ci/cd pipelines like Spinnaker) that could be used to customize how the federation resources were composed. |
To be very direct, I know there are other cicd tools could do the job, but that defeats the purpose of fedv2 in my opinion. The attraction part of federation for us is that tools works for single cluster could transparently work for multiple clusters at least for common objects like |
Tools that work for a single cluster do not transparently work across multiple clusters, at least beyond extremely limited use cases. Coordinating configuration across multiple clusters is simply a hard problem. In fedv2, each Kubernetes type (e.g. The current state of fedv2 is tightly focused on defining and propagating configuration across multiple cluster, experimenting with scheduling of propagation for workload types, and supporting multicluster services and ingress via dns. That doesn't preclude adding additional layers or integrating with other solutions, and I encourage you to continuing engaging with the community to better understand where our thinking is, how we got there, and where we hope to go next. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What would you like to be added:
Support for partial override for CRD attribute
Why is this needed:
for example if I have a federated deployment with an multi-cloud environment, we would like to use the docker registry of that local cloud with different url, it would be nice to be able to do
image:
<registry>
/app1:v1where
<registry>
is a variable and being override while deploy to different federated clusters. So when I deploy one version of the container to one cluster, it is smart enough to substitute the while fan out the deployment to federated clusters./kind feature
The text was updated successfully, but these errors were encountered: