Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default for daemonset/deployment in eck-beats & eck-agent Helm Charts #6621

Merged

Conversation

naemono
Copy link
Contributor

@naemono naemono commented Mar 29, 2023

resolves #6330

Since helm/helm#11440 is still open/unresolved, we really need to not set a default deployment/daemonset for both eck-agent and eck-beats helm charts as they simply cannot be removed when using a "parent" helm chart pattern, such as in eck-stack.

open question, should we do the same for eck-fleet-server, since that deployment mechanism is typically a deployment?

# deployment.yaml
eck-elasticsearch:
  enabled: false

eck-kibana:
  enabled: false

eck-beats:
  enabled: true

  version: 8.5.3
  spec:
    type: filebeat
    daemonSet: null
    config:
      filebeat.inputs:
      - type: container
        paths:
        - /var/log/containers/*.log
      processors:
      - add_host_metadata: {}
      - add_cloud_metadata: {}
    deployment:
      replicas: 1
      podTemplate:
        spec:
          containers:
            - name: filebeat
              securityContext:
                runAsUser: 1000
# Note that `daemonSet` cannot be removed when using a parent chart pattern, such as `eck-stack`
❯ helm template eck-stack  . --values ./examples/beats/deployment.yaml | yq e '.spec' -
version: 8.5.3
type: filebeat
config:
  filebeat.inputs:
    - paths:
        - /var/log/containers/*.log
      type: container
  processors:
    - add_host_metadata: {}
    - add_cloud_metadata: {}
daemonSet: {} <==== Note this still exists
deployment:
  podTemplate:
    spec:
      containers:
        - name: filebeat
          securityContext:
            runAsUser: 1000
  replicas: 1
elasticsearchRef:
  name: elasticsearch
type: filebeat

… Helm Chart.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
@naemono naemono added the >bug Something isn't working label Mar 29, 2023
# until https://github.com/helm/helm/pull/11440
# is merged
spec:
daemonSet: {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this or change how we run helm lint?

Because running the linter without it doesn't fail there is just an extra INFO level log.

> helm lint --strict .; echo $?
engine.go:176: [INFO] Missing required value: A Beat type is required
engine.go:189: [INFO] Fail: At least one of daemonSet or deployment is required for a functional Beat
==> Linting .

1 chart(s) linted, 0 chart(s) failed
0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thbkrkr I swore mine was failing without this in place.. I'll verify/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the Fail confused me, I think, and I didn't check the return value. I've removed this.

# ref: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-beat-configuration.html#k8s-beat-chose-the-deployment-model
#
daemonSet: {}
# daemonSet: {}
# deployment: {}
Copy link
Contributor

@thbkrkr thbkrkr Apr 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not from your PR, but we are not consistent with the daemonSet/deployment defaults for Beats and Agent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I made them look consistent in the values @thbkrkr lmk.

Make daemonset/deployment values consistent.

Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Copy link
Contributor

@thbkrkr thbkrkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@thbkrkr thbkrkr added the v2.8.0 label Apr 6, 2023
@naemono
Copy link
Contributor Author

naemono commented Apr 6, 2023

@elasticmachine run elasticsearch-ci/docs

@naemono naemono merged commit f7569b4 into elastic:main Apr 10, 2023
@naemono naemono deleted the 6330-remove-default-daemonset-agent-beat-helm branch April 10, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eck-beats chart does not support kind=deployment
2 participants