Skip to content

Add ssl.certificate_authorities configuration - #2613

Merged
tetianakravchenko merged 7 commits into
elastic:mainfrom
tetianakravchenko:k8s-add-ssl-fields
Feb 2, 2022
Merged

Add ssl.certificate_authorities configuration#2613
tetianakravchenko merged 7 commits into
elastic:mainfrom
tetianakravchenko:k8s-add-ssl-fields

Conversation

@tetianakravchenko

@tetianakravchenko tetianakravchenko commented Jan 28, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: Tetiana Kravchenko tetiana.kravchenko@elastic.co

What does this PR do?

To support Openshift k8s package is missing some configuration settings - for more details - https://github.com/elastic/observability-docs/pull/1498/files and https://github.com/elastic/beats/pull/30054/files

for kubernetes.state_*:
no way to set:

  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
  ssl.certificate_authorities:
    - /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt

to all datastreams that connnect to https://${env.NODE_NAME}:10250 (like kubernetes.container) no way to set:

  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
  ssl.certificate_authorities:
    - /path/to/ca-bundle.crt

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

How to test this PR locally

Related issues

Screenshots

For kubernetes.state_* resources:
Screenshot 2022-01-28 at 14 19 40

for kubernetes.container:
Screenshot 2022-01-28 at 11 42 18

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
title: SSL Certificate Authorities
multi: true
required: false
show_user: false

@tetianakravchenko tetianakravchenko Jan 28, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did not set here a default value, though it is mostly standard - /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt (for kubernetes.state_* datasets) just to avoid getting ssl.certificate_authorities setting in final config.
@ChrsMark @MichaelKatsoulis is there any better way to handle it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think leaving it blank is just fine since you have the ifs in the handlebars file (stream.yml.hbs ).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1

@tetianakravchenko tetianakravchenko changed the title add ssl.certificate_authorities configuration Jan 28, 2022

@ChrsMark ChrsMark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice @tetianakravchenko ! Could you maybe move node and namespace settings under advanced settings too? This would make the basic setting panel more compact.

@elasticmachine

elasticmachine commented Jan 28, 2022

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Reason: null

  • Start Time: 2022-02-02T11:34:42.431+0000

  • Duration: 38 min 9 sec

  • Commit: 6f48fba

Test stats 🧪

Test Results
Failed 0
Passed 116
Skipped 0
Total 116

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko

Copy link
Copy Markdown
Contributor Author

@ChrsMark done f5bb008, also updated the screenshot in description

@ChrsMark

ChrsMark commented Feb 2, 2022

Copy link
Copy Markdown
Member

Thank you @tetianakravchenko ! It looks good now but there are some conflicts to be resolved.

@tetianakravchenko
tetianakravchenko merged commit a30b182 into elastic:main Feb 2, 2022
@tetianakravchenko
tetianakravchenko deleted the k8s-add-ssl-fields branch February 2, 2022 15:36
orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
* add ssl.certificate_authorities configuration

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* update changelog

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* set show_user to false for node and namespace fields

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* fix typo

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants