Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Apply kubernetes namespaces before all other objects #602

Closed
squaremo opened this issue Jun 7, 2017 · 5 comments
Closed

Apply kubernetes namespaces before all other objects #602

squaremo opened this issue Jun 7, 2017 · 5 comments

Comments

@squaremo
Copy link
Member

squaremo commented Jun 7, 2017

At the minute we load all the manifests and apply them one by one. If you have, say, resources in a namespace that is new, they can fail if the namespace is not created before the files are.

Ultimately, this will succeed on the next sync. But it would have faster turnaround, and look less worrying, if it succeeded the first time around. As an approximation, just running namespaces before resources would be a start.

@tamarakaufler
Copy link
Contributor

The implementation is in incorrectly named branch

756-include-errors-in-sync-events

@marccarre
Copy link
Contributor

Since:

  1. Flux (alpha) now supports Helm, and
  2. Helm exposes a dependencies.yml file listing explicitly all dependencies,

does that mean we effectively get this automatically for Helm users?
If not, we might want to try to integrate Flux with this feature of Helm.

@squaremo
Copy link
Member Author

does that mean we effectively get this automatically for Helm users?

It looks like Helm does a crude but effective sort, such that it applies kinds that can be dependencies before other kinds.

We could do that too, since we stage everything before applying.

@samb1729
Copy link
Contributor

Note that the original issue as it was originally filed was fixed by #812.

@samb1729 samb1729 changed the title Do sync in dependency order, to avoid dependency failures Apply kubernetes namespaces before all other objects Mar 23, 2018
@samb1729
Copy link
Contributor

@marccarre "dependencies" in this issue specifically referred to the dependency a namespaced kubernetes object has on the namespace object itself. Applying resources used to fail depending on the order in which it was done because we could attempt to create an object in a namespace which hasn't yet been created.

Helm dependencies are entirely separate from this aspect of Flux. If you think it's something we should be paying attention to, please file a new issue.

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

No branches or pull requests

4 participants