-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add httpproxy external patch #115
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5bb4f6c
feat: add httpproxy external patch
mhrabovcin 355046a
feat: add unique name multiplexing
mhrabovcin e2827e9
fix: go mod tidy
mhrabovcin 4463506
feat: http-proxy docs
mhrabovcin 48301ea
fix: linter issues
mhrabovcin 76f7a8e
chore: address PR feedback
mhrabovcin 577364f
fix: linter
mhrabovcin 6cfc10d
fix: update docs
mhrabovcin 06894ce
fix: linter
mhrabovcin 5b749f5
chore: add http proxy handler logging
mhrabovcin 8bc0277
fix: improve docs
mhrabovcin 05e6646
chore: improve code readability
mhrabovcin d1a11a8
chore: improve logging context
mhrabovcin 518b58a
fix: rename handler names
mhrabovcin 48c3ca1
fix: helm generated docs
mhrabovcin 0639776
fix: http proxy patch handler name
mhrabovcin fc8b789
chore: update kind to latest version
mhrabovcin 0881a6b
fix: proxy patch handler name
mhrabovcin 152357b
Merge remote-tracking branch 'origin/main' into mh/ep-http-proxy
jimmidyson 7f26649
fixup! refactor: Satisfy linter
jimmidyson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
"hadolint@latest", | ||
"helm-docs@latest", | ||
"[email protected]", | ||
"kind@latest", | ||
"kubebuilder@latest", | ||
"kubectl@latest", | ||
"kubernetes-controller-tools@latest", | ||
|
@@ -32,6 +31,7 @@ | |
"shfmt@latest", | ||
"upx@latest", | ||
"yamale@latest", | ||
"yamllint@latest" | ||
"yamllint@latest", | ||
"kind@latest" | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: "HTTP proxy" | ||
--- | ||
|
||
In some network environments it is necessary to use HTTP proxy to successfuly execute HTTP requests. | ||
To configure Kubernetes components (`containerd`, `kubelet`) to use HTTP proxy use the `httpproxypatch` | ||
external patch that will generate appropriate configuration for control plane and worker nodes. | ||
|
||
To enable the http proxy enable the `httpproxypatch` external patch on `ClusterClass`. | ||
|
||
```yaml | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: ClusterClass | ||
metadata: | ||
name: <NAME> | ||
spec: | ||
patches: | ||
- name: http-proxy | ||
external: | ||
generateExtension: "httpproxypatch.<external-config-name>" | ||
discoverVariablesExtension: "httpproxyvars.<external-config-name>" | ||
``` | ||
|
||
On the cluster resource then specify desired HTTP proxy values: | ||
|
||
```yaml | ||
apiVersion: cluster.x-k8s.io/v1beta1 | ||
kind: Cluster | ||
metadata: | ||
name: <NAME> | ||
spec: | ||
topology: | ||
variables: | ||
name: proxy | ||
values: | ||
http: http://example.com | ||
https: http://example.com | ||
no: | ||
- http://no-proxy-1.example.com | ||
- http://no-proxy-2.example.com | ||
``` | ||
|
||
Applying this configuration will result in new bootstrap files on the `KubeadmControlPlaneTemplate` | ||
and `KubeadmConfigTemplate`. | ||
|
||
This hook is enabled by default, and can be explicitly disabled by omitting the `HTTPProxyVars` | ||
and `HTTPProxyPatch` hook from the `--runtimehooks.enabled-handlers` flag. | ||
|
||
If deploying via Helm, then this can be disabled by setting `handlers.HTTProxyVars.enabled=false` and | ||
`handlers.HTTPProxyPatch.enabled=false`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.