Skip to content

Commit

Permalink
proxy-support (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvix authored Sep 6, 2022
1 parent 7faa3d9 commit b2811a5
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 0 deletions.
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 }}
{{- 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

0 comments on commit b2811a5

Please sign in to comment.