Skip to content
Snippets Groups Projects
Unverified Commit 10c81820 authored by lstoeferle's avatar lstoeferle Committed by GitHub
Browse files

feat: add support for go-templates in argocd yaml files (#27766)

parent 8dc81756
Branches
Tags
No related merge requests found
......@@ -128,4 +128,13 @@ spec:
helm:
valueFiles:
- $foo/values.yaml
---
{{- if .Values.enabled }}
apiVersion: argoproj.io/v1alpha1
kind: Application
spec:
source:
chart: somechart
repoURL: https://git.example.com/foo/bar.git
targetRevision: 3.2.1
{{- end }}
......@@ -165,6 +165,12 @@ spec:
depName: 'somechart',
registryUrls: ['https://foo.io/repo'],
},
{
currentValue: '3.2.1',
datasource: 'helm',
depName: 'somechart',
registryUrls: ['https://git.example.com/foo/bar.git'],
},
],
});
});
......
......@@ -36,6 +36,7 @@ export function extractPackageFile(
definitions = parseYaml(content, null, {
customSchema: ApplicationDefinition,
failureBehaviour: 'filter',
removeTemplates: true,
});
} catch (err) {
logger.debug({ err, packageFile }, 'Failed to parse ArgoCD definition.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment