diff --git a/packages/core/src/Helm.ts b/packages/core/src/Helm.ts index 5ce0e2c..11a1a71 100644 --- a/packages/core/src/Helm.ts +++ b/packages/core/src/Helm.ts @@ -71,7 +71,7 @@ export class Helm { let tmpValuesDir = ''; if (args.valuesObject) { try { - const content = yaml.stringify(args.valuesObject); + const content = yaml.stringify(args.valuesObject, { schema: 'yaml-1.1' }); tmpValuesDir = fs.mkdtempSync(path.join(os.tmpdir(), 'k8skonf-helm-values-'), { encoding: 'utf-8', }); diff --git a/packages/core/src/K8sApp.ts b/packages/core/src/K8sApp.ts index 9df3dab..5954a78 100644 --- a/packages/core/src/K8sApp.ts +++ b/packages/core/src/K8sApp.ts @@ -24,7 +24,7 @@ export class K8sApp { } toYaml() { - return `---\n${this.resources.map((resource) => yaml.stringify(resource)).join('---\n')}`; + return `---\n${this.resources.map((resource) => yaml.stringify(resource, { schema: 'yaml-1.1' })).join('---\n')}`; } save() { @@ -41,7 +41,7 @@ export class K8sApp { ); fs.writeFileSync( path.join(this.outputName, `${r.kind}.${r.metadata.name}.yaml`), - yaml.stringify(r), + yaml.stringify(r, { schema: 'yaml-1.1' }), ); } } else {