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

proxy-support #105

Merged
merged 7 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add support for configuring outgoing proxy for the cluster.
- Allow configuration of loadbalancer for Control Plane API (`internet-facing` will be default).

## [0.8.7] - 2022-08-26
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Service]
Environment="HTTP_PROXY={{ .Values.proxy.http_proxy }}"
Environment="HTTPS_PROXY={{ .Values.proxy.https_proxy }}"
1 change: 1 addition & 0 deletions helm/cluster-aws/templates/_control_plane.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ spec:
files:
{{- include "sshFiles" . | nindent 4 }}
{{- include "diskFiles" . | nindent 4 }}
{{- if .Values.proxy.enabled }}{{- include "proxyFiles" . | nindent 4 }}{{- end }}
{{- include "kubernetesFiles" . | nindent 4 }}
initConfiguration:
localAPIEndpoint:
Expand Down
7 changes: 7 additions & 0 deletions helm/cluster-aws/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ room for such suffix.
encoding: base64
content: {{ $.Files.Get "files/opt/init-disks.sh" | b64enc }}
{{- end -}}
{{- define "proxyFiles" -}}
- path: /etc/systemd/system/containerd.service.d/http-proxy.conf
permissions: "0644"
encoding: base64
content: {{ tpl ($.Files.Get "files/etc/systemd/system/containerd.service.d/http-proxy.conf") . | b64enc }}
{{- end -}}


{{- define "kubernetesFiles" -}}
- path: /etc/kubernetes/policies/audit-policy.yaml
Expand Down
3 changes: 3 additions & 0 deletions helm/cluster-aws/templates/_machine_pools.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ spec:
{{- include "sshPostKubeadmCommands" . | nindent 2 }}
users:
{{- include "sshUsers" . | nindent 2 }}
files:
{{- include "sshFiles" $ | nindent 2 }}
Copy link
Member

Choose a reason for hiding this comment

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

Where's this line come from? Had we missed it off in the past?

Copy link
Contributor Author

@calvix calvix Sep 6, 2022

Choose a reason for hiding this comment

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

I was just adding a comment to it but it seems like it wasn't added at all :(

Yeah I found this is missing for some unknown reason

{{- if $.Values.proxy.enabled }}{{- include "proxyFiles" $ | nindent 2 }}{{- end }}
---
{{ end }}
{{- end -}}
14 changes: 14 additions & 0 deletions helm/cluster-aws/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,20 @@
"organization": {
"type": "string"
},
"proxy": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"http_proxy": {
"type": "string"
},
"https_proxy": {
"type": "string"
}
}
},
"releaseVersion": {
"type": "string"
},
Expand Down
5 changes: 5 additions & 0 deletions helm/cluster-aws/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ oidc:
usernameClaim: ""
groupsClaim: ""

proxy:
enabled: false
http_proxy: ""
https_proxy: ""

# Used by `cluster-shared` library chart
includeClusterResourceSet: true
kubectlImage:
Expand Down