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

Add proxy config setup when generating CAPI objects in apibuilder #2262

Merged
merged 5 commits into from
Jun 1, 2022

Conversation

jiayiwang7
Copy link
Member

@jiayiwang7 jiayiwang7 commented May 25, 2022

Issue #, if available:

#1574

Description of changes:

Add proxy config setup when generating CAPI objects in apibuilder

Testing (if applicable):

  • Unit tests
  • E2E --- PASS: TestSnowKubernetes121UbuntuProxyConfig (848.70s)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 25, 2022
# Conflicts:
#	cmd/integration_test/build/buildspecs/test-eks-a-cli.yml
@jiayiwang7 jiayiwang7 requested a review from g-gaston May 25, 2022 20:35
@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #2262 (437421f) into main (fe5aec8) will increase coverage by 0.06%.
The diff coverage is 73.21%.

@@            Coverage Diff             @@
##             main    #2262      +/-   ##
==========================================
+ Coverage   51.80%   51.86%   +0.06%     
==========================================
  Files         313      315       +2     
  Lines       25967    26054      +87     
==========================================
+ Hits        13451    13514      +63     
- Misses      11226    11242      +16     
- Partials     1290     1298       +8     
Impacted Files Coverage Δ
pkg/clusterapi/apibuilder.go 93.10% <ø> (+2.67%) ⬆️
pkg/providers/vsphere/vsphere.go 64.54% <0.00%> (ø)
pkg/providers/snow/apibuilder.go 84.67% <33.33%> (-7.71%) ⬇️
pkg/clusterapi/registry_mirror.go 67.85% <66.66%> (ø)
pkg/clusterapi/proxy.go 80.95% <80.95%> (ø)
pkg/clusterapi/systemctl.go 100.00% <100.00%> (ø)
pkg/providers/cloudstack/cloudstack.go 62.79% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe5aec8...437421f. Read the comment docs.

@jiayiwang7 jiayiwang7 changed the title Snow proxy Add proxy config setup when generating CAPI objects in apibuilder May 25, 2022

var restartContainerdCommands = []string{
"sudo systemctl daemon-reload",
"sudo systemctl restart containerd",
Copy link
Member

Choose a reason for hiding this comment

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

These commands only apply to OS with systemctl (unless I'm missing something)
Should we build this in a different way so it's opt-in from the provider? Or maybe even run it from the provider

Copy link
Member Author

Choose a reason for hiding this comment

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

called in provider

pkg/clusterapi/proxy.go Outdated Show resolved Hide resolved
}

return bootstrapv1.File{
Path: "/etc/systemd/system/containerd.service.d/http-proxy.conf",
Copy link
Member

Choose a reason for hiding this comment

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

Similar comment here about different OS
I believe this works differently for Bottlerocket (for example)

Copy link
Member Author

Choose a reason for hiding this comment

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

proxy config setup in provider now

@eks-distro-bot eks-distro-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 31, 2022
@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit ccc024f into aws:main Jun 1, 2022
@jiayiwang7 jiayiwang7 deleted the snow-proxy branch June 28, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants