cloud-on-k8s
cloud-on-k8s copied to clipboard
Incorrect templating of Logstash object when using pipelinesRef parameter
Bug Report
What did you do? We wanted to define our pipeline via secret, so we have configured pipelinesRef in values:
eck-logstash:
enabled: true
pipelinesRef:
secretName: logstash-pipelines-secret
What did you expect to see? We expected helmchart to be deployed successfully and see the Logstash object containing only pipelinesRef parameter.
What did you see instead? Under which circumstances? Templated Logstash object contains both pipelines and pipelinesRef parameters:
apiVersion: logstash.k8s.elastic.co/v1alpha1
kind: Logstash
metadata:
name: release-name-eck-logstash
labels:
helm.sh/chart: eck-logstash-0.12.0
app.kubernetes.io/name: eck-logstash
app.kubernetes.io/instance: release-name
app.kubernetes.io/managed-by: Helm
annotations:
eck.k8s.elastic.co/license: basic
spec:
version: 8.15.0
count: 1
pipelinesRef:
secretName: logstash-pipelines-secret
pipelines:
[]
volumeClaimTemplates:
- metadata:
name: logstash-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
storageClassName: storage-del
elasticsearchRefs:
[]
Helmchart cannot be deployed since validating webhook returns this error:
one or more synchronization tasks completed unsuccessfully, reason: admission webhook "elastic-logstash-validation-v1alpha1.k8s.elastic.co" denied the request: Logstash.logstash.k8s.elastic.co "ecn-monitoring-eck-logstash" is invalid: [spec.pipelines: Forbidden: Specify at most one of [`pipelines`, `pipelinesRef`], not both, spec.pipelinesRef: Forbidden: Specify at most one of [`pipelines`, `pipelinesRef`], not both] (retried 5 times).
Environment
-
ECK version:
v2.14.0