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

Support partial apply #1231

Open
cwrau opened this issue Aug 15, 2024 · 2 comments
Open

Support partial apply #1231

cwrau opened this issue Aug 15, 2024 · 2 comments
Labels
wontfix This will not be worked on

Comments

@cwrau
Copy link

cwrau commented Aug 15, 2024

Often one installs dependent configuration at the same time, think postgres-operator and the application with the postgresql.

With flux this is, currently, not possible, as the kustomize-controller fails with

Warning  ReconciliationFailed  3m23s  kustomize-controller  postgresql/discourse/discourse-db dry-run failed: no matches for kind "postgresql" in version "acid.zalan.do/v1"

The current solutions would be to

  1. create the resources step-by-step, splitting up normal PRs to multiple:
    1. install postgres-operator
    2. apply application
  2. apply the intermediate resources by hand every time

Both of these solutions have the disadvantage to not work with a full recovery with an existing repo.

In my opinion, an option with partialApply: true would be amazing, which would just apply everything that's possible and ignore what's not working, but still failing at the end.

And during the next reconciliation trying again, which,, in time,, would result in a complete working cluster.

@stefanprodan
Copy link
Member

There is spec.dependsOn made for this, see here how to use it: https://github.com/fluxcd/flux2-kustomize-helm-example?tab=readme-ov-file#infrastructure

@stefanprodan stefanprodan added the wontfix This will not be worked on label Aug 15, 2024
@cwrau
Copy link
Author

cwrau commented Aug 15, 2024

There is spec.dependsOn made for this

But what if I don't have anything that can use depensOn or the dependee can't be depended upon?

Imagine the following scenario;

  • have application.yaml with plain k8s resources, including a custom postgresql resource
  • have operator.yaml with a flux HelmRelease with the operator

that won't work with the dependsOn (or need the solution below)

, see here how to use it: fluxcd/flux2-kustomize-helm-example#infrastructure

And in this example, I'd need to have multiple kustomizations, which,, in my use-case,, really only serve the purpose for ordering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants