Skip to content
Merged
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
1 change: 1 addition & 0 deletions internal/collector/otelcol.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ exporters:
tls:
insecure: {{ if .TLS -}}false{{ else -}}true{{- end }}
{{- if .TLS }}
insecure_skip_verify: {{ .TLS.SkipVerify }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a way to set this if SkipVerify is provided and if not, set it to false, which is a good default to have?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If TLS.SkipVerify is not set, it'll default to false (default value for a bool: https://github.com/nginx/agent/blob/v3/internal/config/types.go#L278)

{{ if gt (len .TLS.Ca) 0 -}}ca_file: "{{- .TLS.Ca -}}"{{- end }}
{{ if gt (len .TLS.Cert) 0 -}}cert_file: "{{- .TLS.Cert -}}"{{- end }}
{{ if gt (len .TLS.Key) 0 -}}key_file: "{{- .TLS.Key -}}"{{- end }}
Expand Down