[go: up one dir, main page]

Skip to content
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

Wishlist: Support inserting dependencies #38

Open
haegar opened this issue Nov 11, 2021 · 4 comments
Open

Wishlist: Support inserting dependencies #38

haegar opened this issue Nov 11, 2021 · 4 comments

Comments

@haegar
Copy link
haegar commented Nov 11, 2021

Moin,

Kubernet manifests are rarely completely standalone, they often have some prerequisits to be installed before, even if it is just that the kubernetes cluster needs to be there first.

I am using the kubernetes yaml files as authitative, and regenerate the tf files using tfk8s through Makefiles whenever the yaml (or helm chart) changes.

So it would be nice to have some commandline parameter to insert depends_on = [ ... ] option lists into the generated .tf output.

Could be for example

--depends google_container_cluster.my_cluster --depends google_compute_address.ingress-ip

or

--depends google_container_cluster.my_cluster,google_compute_address.ingress-ip

Additionally it would be nice to have a parameter to make multiple manifests from one tfk8s call / input (file/stdin) sequential - meaning that the second manifest generated from one file depends on the first, the third manifest depends on the two before, etc.

@jrhouston
Copy link
Owner

Could be for example

--depends google_container_cluster.my_cluster --depends google_compute_address.ingress-ip

This makes sense to me – can do.

Additionally it would be nice to have a parameter to make multiple manifests from one tfk8s call / input (file/stdin) sequential - meaning that the second manifest generated from one file depends on the first, the third manifest depends on the two before, etc.

I'm not exactly sure what you mean here. Are you proposing an option that if the YAML file contains multiple resources, each resource is a dependency of the one that comes after it in the file?

@haegar
Copy link
Author
haegar commented Nov 17, 2021

Could be for example
--depends google_container_cluster.my_cluster --depends google_compute_address.ingress-ip

This makes sense to me – can do.
Thanks!

Additionally it would be nice to have a parameter to make multiple manifests from one tfk8s call / input (file/stdin) sequential - meaning that the second manifest generated from one file depends on the first, the third manifest depends on the two before, etc.

I'm not exactly sure what you mean here. Are you proposing an option that if the YAML file contains multiple resources, each resource is a dependency of the one that comes after it in the file?

The opposite order.
When multiple resources are in one yaml file then each (after the first) has a dependency on the resource before. The second has a dependency on the first, the third on the second, the fourth on the third, and so on.
(In addition to dependencies given on the commandline, which would get added to each of them)

Would make it possible from one input file for example to first create a namespace and then place objects into it, or to add a CustomResourceDefinition followed by a resource of that new type.

@jrhouston
Copy link
Owner

Gotcha. Not sure what we could call the flag. --chain-depends maybe?

@haegar
Copy link
Author
haegar commented Dec 9, 2021

I'm also not good with naming, but --chain-depends sounds usable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants