Hello, I am trying to override `filebeatConfig` co...
# kubernetes
h
Hello, I am trying to override
filebeatConfig
config with backticks using following code and it doesn't work. I used debug in pulumi up command and it doesn't show much. Errors: template: filebeat/templates/daemonset.yaml2927: executing "filebeat/templates/daemonset.yaml" at <include (print .Template.BasePath "/configmap.yaml") .>: error calling include: template: filebeat/templates/configmap.yaml1335: executing "filebeat/templates/configmap.yaml" at <.Values.filebeatConfig>: range can't iterate over filebeat.yml Chart used: https://github.com/elastic/helm-charts/blob/master/filebeat/values.yaml Pulumi specific code using the chart:
getFilebeatChart(elkChart: k8s.helm.v2.Chart, kibanaChart: k8s.helm.v2.Chart): k8s.helm.v2.Chart | undefined {
if (!this.enabled) {
return undefined;
}
const filebeatVersion = this.getConfig("filebeatVersion");
const fileBeatConfiguration = this.getConfig("fileBeatConfiguration");
return new k8s.helm.v2.Chart("filebeat", {
path: "../helm_packages_v1/elastic-helm-charts-7.7.0/filebeat",
transformations: [obj => {
if (obj.kind === "DeamonSet" ) {
obj.metadata.annotations=  {"<http://pulumi.com/timeoutSeconds|pulumi.com/timeoutSeconds>": this.esTimeout}
}
}],
values: {
imageTag: this.esVersion,
filebeatConfig:
``filebeat.yml: |`
filebeat.inputs:
- type: docker
containers.ids:
- '*'
processors:
- add_kubernetes_metadata:
in_cluster: true
,
Copy code
},
Copy code
}, { dependsOn: [ elkChart, kibanaChart], providers: { "kubernetes": this.cluster.provider } ,customTimeouts: {`
create: "2m",
delete: "2m",
update: "2m",
}});
}