Skip to content

Commit

Permalink
Merge pull request #45 from xco-sk/44-fix-code-scanning-alert-disable…
Browse files Browse the repository at this point in the history
…d-tls-certificate-check

#44 Fix code scanning alert - Disabled TLS certificate check
  • Loading branch information
xco-sk authored Oct 27, 2022
2 parents a348faa + f009180 commit 8b8ee1e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions charts/eck-custom-resources-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ maintainers:
email: [email protected]
url: https://github.com/xco-sk
type: application
version: 0.4.3
appVersion: 0.4.0
version: 0.4.4
appVersion: 0.4.1
2 changes: 1 addition & 1 deletion charts/eck-custom-resources-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Helm chart for eck-custom-resources

![Version: 0.4.3](https://img.shields.io/badge/Version-0.4.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.0](https://img.shields.io/badge/AppVersion-0.4.0-informational?style=flat-square)
![Version: 0.4.4](https://img.shields.io/badge/Version-0.4.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.1](https://img.shields.io/badge/AppVersion-0.4.1-informational?style=flat-square)

Helm chart for eck-custom-resources operator

Expand Down
2 changes: 1 addition & 1 deletion controllers/kibana.eck/visualization_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (r *VisualizationReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return utils.GetRequeueResult(), err
}

logger.Info("Creating/Updating saved search", "id", req.Name)
logger.Info("Creating/Updating visualization", "id", req.Name)
res, err := kibanaUtils.UpsertSavedObject(kibanaClient, savedObjectType, visualization.ObjectMeta, visualization.Spec.GetSavedObject())

if err == nil {
Expand Down
3 changes: 2 additions & 1 deletion utils/kibana/kibana_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"net/http"
"strings"

Expand Down Expand Up @@ -75,7 +76,7 @@ func (kClient Client) getHttpClient() (*http.Client, error) {
InsecureSkipVerify: false,
}
} else if strings.HasPrefix(kClient.KibanaSpec.Url, "https://") {
tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
return nil, errors.New("Failed to configure http client, certificate not configured (kibana.certificate)")
}

httpClient := &http.Client{
Expand Down

0 comments on commit 8b8ee1e

Please sign in to comment.