Skip to content

Commit

Permalink
Do not proxy kubernetes internal traffic (#920)
Browse files Browse the repository at this point in the history
* Do not proxy kubernetes internal traffic

* Update terraform tests

* Generate new 'setup-sumologic.yaml.tmpl'

Co-authored-by: Travis CI <travis@travis-ci.org>
  • Loading branch information
sumo-drosiek and Travis CI authored Sep 17, 2020
1 parent 4e0443d commit 388c1be
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions deploy/helm/sumologic/conf/setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export SUMOLOGIC_BASE_URL=${SUMOLOGIC_BASE_URL%v1*}
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}

COLLECTOR_NAME="{{- if .Values.sumologic.collectorName }}{{ .Values.sumologic.collectorName }}{{- else}}{{ .Values.sumologic.clusterName }}{{- end}}"

Expand Down
2 changes: 2 additions & 0 deletions deploy/helm/sumologic/templates/setup/setup-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ spec:
value: {{ .Values.sumologic.httpProxy }}
- name: HTTPS_PROXY
value: {{ .Values.sumologic.httpsProxy }}
- name: NO_PROXY
value: {{ .Values.sumologic.noProxy }}
{{ end }}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ sumologic:
## proxy urls
httpProxy: ""
httpsProxy: ""
## Exclude kubernetes internal traffic from proxy
noProxy: kubernetes.default.svc

## Collector name
#collectorName: ""
Expand Down
3 changes: 3 additions & 0 deletions deploy/kubernetes/setup-sumologic.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ data:
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}

COLLECTOR_NAME="$COLLECTOR_NAME"

Expand Down Expand Up @@ -282,5 +283,7 @@ spec:
value:
- name: HTTPS_PROXY
value:
- name: NO_PROXY
value: kubernetes.default.svc


1 change: 1 addition & 0 deletions tests/terraform/static/all_fields.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ data:
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}
COLLECTOR_NAME="kubernetes"
Expand Down
1 change: 1 addition & 0 deletions tests/terraform/static/collector_fields.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ data:
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}
COLLECTOR_NAME="kubernetes"
Expand Down
1 change: 1 addition & 0 deletions tests/terraform/static/conditional_sources.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ data:
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}
COLLECTOR_NAME="kubernetes"
Expand Down
1 change: 1 addition & 0 deletions tests/terraform/static/default.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ data:
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}
COLLECTOR_NAME="kubernetes"
Expand Down
1 change: 1 addition & 0 deletions tests/terraform/static/strip_extrapolation.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ data:
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}
COLLECTOR_NAME="kubernetes"
Expand Down
1 change: 1 addition & 0 deletions tests/terraform/static/traces.output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ data:
# Support proxy for terraform
export HTTP_PROXY=${HTTP_PROXY:=""}
export HTTPS_PROXY=${HTTPS_PROXY:=""}
export NO_PROXY=${NO_PROXY:=""}
COLLECTOR_NAME="kubernetes"
Expand Down

0 comments on commit 388c1be

Please sign in to comment.