Skip to content

Commit

Permalink
Merge pull request #340 from krasi-georgiev/insecureSkipVerify
Browse files Browse the repository at this point in the history
don't set tls server name with insecureSkipVerify
  • Loading branch information
openshift-merge-robot committed Jun 29, 2020
2 parents e801ab5 + ab7567e commit 7413e5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jsonnet/telemeter/lib/list.libsonnet
Expand Up @@ -136,7 +136,7 @@
if object.kind == 'ServiceMonitor' then {
spec+: {
endpoints: [
e + if std.objectHas(e, 'tlsConfig') then {
e + if std.objectHas(e, 'tlsConfig') && !std.objectHas(e.tlsConfig, 'insecureSkipVerify') then {
tlsConfig+: if std.length(std.split(super.tlsConfig.serverName, '.')) == 3 && std.split(super.tlsConfig.serverName, '.')[1] == _config.namespace && std.split(e.tlsConfig.serverName, '.')[2] == 'svc' then {
serverName: '%s.%s.svc' % [std.split(e.tlsConfig.serverName, '.')[0], '${NAMESPACE}'],
} else {},
Expand Down

0 comments on commit 7413e5f

Please sign in to comment.