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

feat: add huaweicloud metadata support. #27607

Merged
merged 4 commits into from
Sep 22, 2021

Conversation

Colstuwjx
Copy link
Contributor

@Colstuwjx Colstuwjx commented Aug 26, 2021

Signed-off-by: colstuwjx colstuwjx@gmail.com

  • Enhancement

What does this PR do?

This PR is going to add Huawei cloud metadata provider support.

Why is it important?

There are lots of company are using huaweicloud ecs, and this PR will help them collect ECS level metadata.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 26, 2021
@cla-checker-service
Copy link

cla-checker-service bot commented Aug 26, 2021

💚 CLA has been signed

@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 26, 2021

💚 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

  • Start Time: 2021-09-20T11:14:17.722+0000

  • Duration: 144 min 58 sec

  • Commit: 5915055

Test stats 🧪

Test Results
Failed 0
Passed 54044
Skipped 5327
Total 59371

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 54044
Skipped 5327
Total 59371

@Colstuwjx
Copy link
Contributor Author

I signed it!

@jsoriano jsoriano added the Team:Integrations Label for the Integrations team label Sep 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 13, 2021
@jsoriano
Copy link
Member

/test

Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Hey @Colstuwjx,

Thanks for your contribution! Code-wise it looks good to me, but could you please add a changelog entry in CHANGELOG.next.asciidoc?

@kaiyan-sheng could you please also have a second look?

@kaiyan-sheng
Copy link
Contributor

Code looks good to me too. One question, @jsoriano should Huawei be enabled by default? I remember we have to disable Alibaba Cloud and Tencent cloud providers because they require to access a remote host.

@jsoriano
Copy link
Member

should Huawei be enabled by default? I remember we have to disable Alibaba Cloud and Tencent cloud providers because they require to access a remote host.

This provider gets the data from 169.254.169.254, as for AWS, Azure or GCP, so I guess that it can be enabled by default.

@jsoriano jsoriano added the backport-v7.16.0 Automated backport with mergify label Sep 14, 2021
@mergify
Copy link
Contributor

mergify bot commented Sep 14, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b huaweicloud-metadata upstream/huaweicloud-metadata
git merge upstream/master
git push upstream huaweicloud-metadata

@jsoriano
Copy link
Member

could you please add a changelog entry in CHANGELOG.next.asciidoc?

I have added it, this would be ready to merge.

@Colstuwjx
Copy link
Contributor Author

Code looks good to me too. One question, @jsoriano should Huawei be enabled by default? I remember we have to disable Alibaba Cloud and Tencent cloud providers because they require to access a remote host.

HuaweiCloud is similar to openstack, it's using 169.254.169.254, which should be local call, so I think it's ok to enable by default.

I've been rebased with master! Now I think it's ready to merge!

@Colstuwjx
Copy link
Contributor Author

Fixed a rebase issue, the PR commits are clear right now.

@jsoriano
Copy link
Member

/test

@mergify
Copy link
Contributor

mergify bot commented Sep 19, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b huaweicloud-metadata upstream/huaweicloud-metadata
git merge upstream/master
git push upstream huaweicloud-metadata

@Colstuwjx
Copy link
Contributor Author

@jsoriano @kaiyan-sheng Anything updates? If there is any issue left, please let me know.

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@kaiyan-sheng kaiyan-sheng merged commit 86004dd into elastic:master Sep 22, 2021
mergify bot pushed a commit that referenced this pull request Sep 22, 2021
Signed-off-by: colstuwjx <colstuwjx@gmail.com>
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
(cherry picked from commit 86004dd)
@Colstuwjx Colstuwjx deleted the huaweicloud-metadata branch September 22, 2021 03:06
kaiyan-sheng added a commit that referenced this pull request Sep 28, 2021
* feat: add huaweicloud metadata support. (#27607)

Signed-off-by: colstuwjx <colstuwjx@gmail.com>
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
(cherry picked from commit 86004dd)

* Update CHANGELOG.next.asciidoc

Co-authored-by: Jacky Wu <Colstuwjx@gmail.com>
Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
Signed-off-by: colstuwjx <colstuwjx@gmail.com>
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
kaiyan-sheng added a commit that referenced this pull request Feb 1, 2024
* Remove huaweicloud - revert #27607

The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations.

* make huawei an alias for openstack

* change doc

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
mergify bot pushed a commit that referenced this pull request Feb 1, 2024
* Remove huaweicloud - revert #27607

The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations.

* make huawei an alias for openstack

* change doc

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 07c559b)

# Conflicts:
#	libbeat/processors/add_cloud_metadata/docs/add_cloud_metadata.asciidoc
#	libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go
#	libbeat/processors/add_cloud_metadata/provider_huawei_cloud_test.go
#	libbeat/processors/add_cloud_metadata/providers.go
mergify bot pushed a commit that referenced this pull request Feb 1, 2024
* Remove huaweicloud - revert #27607

The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations.

* make huawei an alias for openstack

* change doc

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 07c559b)
kaiyan-sheng added a commit that referenced this pull request Feb 1, 2024
* Remove huaweicloud - revert #27607 (#35184)

* Remove huaweicloud - revert #27607

The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations.

* make huawei an alias for openstack

* change doc

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 07c559b)

* Update CHANGELOG.next.asciidoc

* fix footnote

---------

Co-authored-by: Maximilian Stinsky <26960620+mstinsky@users.noreply.github.com>
Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
kaiyan-sheng added a commit that referenced this pull request Feb 1, 2024
* Remove huaweicloud - revert #27607 (#35184)

* Remove huaweicloud - revert #27607

The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations.

* make huawei an alias for openstack

* change doc

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
(cherry picked from commit 07c559b)

# Conflicts:
#	libbeat/processors/add_cloud_metadata/docs/add_cloud_metadata.asciidoc
#	libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go
#	libbeat/processors/add_cloud_metadata/provider_huawei_cloud_test.go
#	libbeat/processors/add_cloud_metadata/providers.go

* Update CHANGELOG.next.asciidoc

* Update add_cloud_metadata.asciidoc

* Update providers.go

* fix doc

* fix lint

---------

Co-authored-by: Maximilian Stinsky <26960620+mstinsky@users.noreply.github.com>
Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
* Remove huaweicloud - revert elastic#27607

The huaweicloud is just openstack therefore revert elastic#27607 to fix detection of all public and private openstack installations.

* make huawei an alias for openstack

* change doc

* Update CHANGELOG.next.asciidoc

---------

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.16.0 Automated backport with mergify Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants