-
|
I'm trying to read the code of Did I miss something? If yes can somebody point it out? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
|
bump? |
Beta Was this translation helpful? Give feedback.
-
|
@krystian-kulgawczuk , as you guessed, it fails... My use case is use kube-prometheus-stack Helm chart to install the Prometheus Operator, which includes bunch of CRDs, including ServiceMontior. Before the Helm chart is installed, any Kustomization that refers to ServiceMonitor will fail validation, example message below: This is my directory structure, which does not work. |
Beta Was this translation helpful? Give feedback.
-
|
If you really want to do what you're describing, you can disable apply-time validation and ensure that validation is done some other way, like CI checks such as validate.sh as shown in the flux2-helm-kustomize examples. Check out in the Kustomization spec This has the risk that any invalid configuration you promote will be partially applied without raising any alarms. This is closer to the behavior in flux v1 and sounds like what you are looking to be able to do. The standard behavior of validating is designed to prevent invalid resources from being partially applied to the cluster, and that means you can't use a CRD before it has been applied. This is by design but it can be worked around in places where it is undesirable to split them up. |
Beta Was this translation helpful? Give feedback.
-
|
@yebyen , thanks very much for the pointer to "dependsOn", works beautifully. |
Beta Was this translation helpful? Give feedback.
If you really want to do what you're describing, you can disable apply-time validation and ensure that validation is done some other way, like CI checks such as validate.sh as shown in the flux2-helm-kustomize examples.
Check out in the Kustomization spec
validatewhich can be set tononeThis has the risk that any invalid configuration you promote will be partially applied without raising any alarms. This is closer to the behavior in flux v1 and sounds like what you are looking to be able to do.
The standard behavior of validating is designed to prevent invalid resources from being partially applied to the cluster, and that means you can't use a CRD before it has been applied. This is by…