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

Enroll proxy settings #26514

Merged
merged 49 commits into from
Jun 30, 2021
Merged

Enroll proxy settings #26514

merged 49 commits into from
Jun 30, 2021

Conversation

urso
Copy link

@urso urso commented Jun 28, 2021

  • Enhancement

What does this PR do?

Add CLI flags for configuring an http proxy during enrollment.

Why is it important?

Support enrollment when a remote Fleet Server is behind a proxy.

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 Jun 28, 2021
@botelastic
Copy link

botelastic bot commented Jun 28, 2021

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 28, 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

Expand to view the summary

Build stats

  • Build Cause: Pull request #26514 updated

  • Start Time: 2021-06-29T22:01:28.350+0000

  • Duration: 84 min 13 sec

  • Commit: 77c3981

Test stats 🧪

Test Results
Failed 0
Passed 6972
Skipped 16
Total 6988

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 6972
Skipped 16
Total 6988

@urso urso requested a review from blakerouse June 29, 2021 20:28
@urso urso added the backport-v7.14.0 Automated backport with mergify label Jun 29, 2021
@urso urso marked this pull request as ready for review June 29, 2021 21:02
if localFleetServer {
// Ensure that the agent does not use a proxy configuration
// when connecting to the local fleet server.
c.remoteConfig.Transport.Proxy.Disable = true
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this persist after enrollment? This looks like it will work for enrollment, but how does the restarted Elastic Agent after enrollment ensure that it talks to its local Fleet Server not over the proxy? Does this Disable = true get persisted into the fleet.yml so that Elastic Agent knows not to use the proxy?

Copy link
Author

Choose a reason for hiding this comment

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

Updated PR. The config for agent is serialized in fleetServerBootstrap.

Copy link
Contributor

@blakerouse blakerouse 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.

@urso urso merged commit 26325b0 into elastic:master Jun 30, 2021
@urso urso deleted the enroll-proxy-settings branch June 30, 2021 10:56
mergify bot pushed a commit that referenced this pull request Jun 30, 2021
(cherry picked from commit 26325b0)

# Conflicts:
#	x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go
mdelapenya added a commit to mdelapenya/beats that referenced this pull request Jul 1, 2021
* master:
  [MetricBeat] [AWS] Fix aws metric tags with resourcegroupstaggingapi paginator (elastic#26385) (elastic#26443)
  Move openmetrics module to oss (elastic#26561)
  Skip flaky test TestFilestreamMetadataUpdatedOnRename (elastic#26609)
  [filebeat][fortinet] Use default add_locale for fortinet.firewall (elastic#26524)
  Enroll proxy settings (elastic#26514)
v1v added a commit to v1v/beats that referenced this pull request Jul 5, 2021
…stage-failed-within-same-build

* upstream/master: (36 commits)
  Revert "[CI] fight the flakiness with some retry option in the CI only for the Pull Requests (elastic#26617)" (elastic#26704)
  Packaging: linux/armv7 is not supported (elastic#26706)
  Cyberarkpas: Link to official docs on how to setup TLS (elastic#26614)
  Make network_direction, registered_domain and convert processors compatible with ES older than 7.13.0 (elastic#26676)
  Disable armv7 packaging (elastic#26679)
  [Heartbeat] use --params flag for synthetics (elastic#26674)
  Update dependent package to avoid downloading a suspicious file (elastic#26406)
  [mergify] set title and allow bp in any direction (elastic#26648)
  Fix memory leak in SQL helper when database is not available (elastic#26607)
  [CI] fight the flakiness with some retry option in the CI only for the Pull Requests (elastic#26617)
  [mergify] automate PRs that change the backport rules (elastic#26641)
  [Metricbeat] Add Airflow module in xpack (elastic#26220)
  chore: add-backport-next (elastic#26620)
  [metricbeat] Add state_job metricset (elastic#26479)
  CI: jenkins labels are less time consuming now (elastic#26613)
  [MetricBeat] [AWS] Fix aws metric tags with resourcegroupstaggingapi paginator (elastic#26385) (elastic#26443)
  Move openmetrics module to oss (elastic#26561)
  Skip flaky test TestFilestreamMetadataUpdatedOnRename (elastic#26609)
  [filebeat][fortinet] Use default add_locale for fortinet.firewall (elastic#26524)
  Enroll proxy settings (elastic#26514)
  ...
@urso
Copy link
Author

urso commented Jul 6, 2021

@Mergifyio backport 7.14

mergify bot pushed a commit that referenced this pull request Jul 6, 2021
(cherry picked from commit 26325b0)

# Conflicts:
#	x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go
@mergify
Copy link
Contributor

mergify bot commented Jul 6, 2021

Command backport 7.14: success

Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.14.0 Automated backport with mergify needs_docs needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants