diff --git a/CHANGELOG.md b/CHANGELOG.md index d383bb5..fd9394a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ Versioning](http://semver.org/spec/v2.0.0.html). ## Unreleased +## [0.5.0] - 2023-02-09 + +## Changed +- Update sensu-plugin-sdk, use new option types +- Use github.com/sensu/core instead of github.com/sensu/sensu-go/api/core +- Propagate hostname verification skipping option to Sensu HTTP client + ## [0.4.0] - 2022-12-02 ### Changed diff --git a/main.go b/main.go index 8edcc0b..4559d91 100644 --- a/main.go +++ b/main.go @@ -81,7 +81,7 @@ var ( Path: "insecure-skip-tls-verify", Env: "PUPPET_INSECURE_SKIP_TLS_VERIFY", Argument: "insecure-skip-tls-verify", - Usage: "skip SSL verification", + Usage: "skip TLS verification for Puppet and sensu-backend", Value: &handler.puppetInsecureSkipVerify, }, &sensu.PluginConfigOption[string]{ @@ -295,6 +295,9 @@ func deregisterEntity(event *corev2.Event) error { config.CACert = cert } + if handler.puppetInsecureSkipVerify { + config.InsecureSkipVerify = true + } client := httpclient.NewCoreClient(config) request, err := httpclient.NewResourceRequest("core/v2", "Entity", event.Entity.Namespace, event.Entity.Name) if err != nil {