Skip to content
Snippets Groups Projects
Unverified Commit 1976b57b authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

feat(manager/kubernetes): strip go templates before parsing (#28816)

parent 7d41ab34
No related branches found
No related tags found
No related merge requests found
{- if .Values.configMap.enabled | default false }
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
...@@ -5,3 +6,4 @@ metadata: ...@@ -5,3 +6,4 @@ metadata:
labels: labels:
app: nginx app: nginx
data: {} data: {}
{- end }
...@@ -71,7 +71,10 @@ function extractApis( ...@@ -71,7 +71,10 @@ function extractApis(
try { try {
// TODO: use schema (#9610) // TODO: use schema (#9610)
doc = parseYaml(content); doc = parseYaml(content, null, {
filename: packageFile,
removeTemplates: true,
});
} catch (err) { } catch (err) {
logger.debug({ err, packageFile }, 'Failed to parse Kubernetes manifest.'); logger.debug({ err, packageFile }, 'Failed to parse Kubernetes manifest.');
return []; return [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment