You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I specify the YamlOutputType as FOLDER_PER_CHART_FILE_PER_RESOURCE for synth, I expect the resources in the folder created to be named in such a way as to honor their dependency order. However, the resources are created without an index prefix, and so will be applied in alphabetical order by kubectl/fluxcd/whatever.
I see two options:
Prefix the filenames with their index, I think this will work
(Better option IMO) Create a kustomize.yaml with a resources block that lists each file in order
Reproduction Steps:
class MyChart extends Chart {
constructor(scope: Construct, id: string) {
super(scope, id, {
namespace: constants.databases.namespace
});
const resource1 = // ...create resource here
const resource2 = // ...create resource here
resource1.addDependency(resource2)
}
const app = new App({
yamlOutputType: YamlOutputType.FOLDER_PER_CHART_FILE_PER_RESOURCE
});
const chart = new MyChart(app, 'mychart');
app.synth();
This will generate two files:
resource1.yaml
resource2.yaml
Which will be applied in that order, despite resource1 needing resource2 to be applied first.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered:
We should prefix the file names with an index, just like we do with charts. Generating a kustomize.yaml file is an option, but I prefer to avoid since it limits the way an application can be deployed.
Description of the bug:
If I specify the
YamlOutputType
asFOLDER_PER_CHART_FILE_PER_RESOURCE
for synth, I expect the resources in the folder created to be named in such a way as to honor their dependency order. However, the resources are created without an index prefix, and so will be applied in alphabetical order by kubectl/fluxcd/whatever.I see two options:
kustomize.yaml
with aresources
block that lists each file in orderReproduction Steps:
This will generate two files:
Which will be applied in that order, despite
resource1
needingresource2
to be applied first.This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: