Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Aug 27, 2024
1 parent 96b57e0 commit a77733e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/docs/reference/api-reference/metrics/v1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ _Appears in:_
| `type` _string_ | Type represents the provider type. This can be one of cortex, datadog, dql, dynatrace, prometheus or thanos. || x | Optional: {} <br />Pattern: `cortex|datadog|dql|dynatrace|prometheus|thanos` <br /> |
| `targetServer` _string_ | TargetServer defines URL (including port and protocol) at which the metrics provider is reachable. || x | |
| `secretKeyRef` _[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#secretkeyselector-v1-core)_ | SecretKeyRef defines an optional secret for access credentials to the metrics provider. ||| Optional: {} <br /> |
| `skipVerifyCertificate` _boolean_ | SkipVerifyCertificate skips verification of the certificate |false|| |
| `insecureSkipTlsVerify` _boolean_ | InsecureSkipTlsVerify skips verification of the tls certificate |false|| |


#### ObjectReference
Expand Down
4 changes: 2 additions & 2 deletions metrics-operator/api/v1/keptnmetricsprovider_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ type KeptnMetricsProviderSpec struct {
// SecretKeyRef defines an optional secret for access credentials to the metrics provider.
// +optional
SecretKeyRef corev1.SecretKeySelector `json:"secretKeyRef,omitempty"`
// SkipVerifyCertificate skips verification of the certificate
// InsecureSkipTlsVerify skips verification of the tls certificate
// +kubebuilder:default:=false
// +optional
SkipVerifyCertificate bool `json:"skipVerifyCertificate,omitempty"`
InsecureSkipTlsVerify bool `json:"insecureSkipTlsVerify,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ spec:
spec:
description: KeptnMetricsProviderSpec defines the desired state of KeptnMetricsProvider
properties:
insecureSkipTlsVerify:
default: false
description: InsecureSkipTlsVerify skips verification of the tls certificate
type: boolean
secretKeyRef:
description: SecretKeyRef defines an optional secret for access credentials
to the metrics provider.
Expand All @@ -63,10 +67,6 @@ spec:
- key
type: object
x-kubernetes-map-type: atomic
skipVerifyCertificate:
default: false
description: SkipVerifyCertificate skips verification of the certificate
type: boolean
targetServer:
description: TargetServer defines URL (including port and protocol)
at which the metrics provider is reachable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (d *keptnDynatraceDQLProvider) ensureDTClientIsSetUp(ctx context.Context, p
http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: provider.Spec.SkipVerifyCertificate,
InsecureSkipVerify: provider.Spec.InsecureSkipTlsVerify,
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions metrics-operator/controllers/common/providers/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func NewProvider(provider *metricsapi.KeptnMetricsProvider, log logr.Logger, k8s
HttpClient: http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: provider.Spec.SkipVerifyCertificate,
InsecureSkipVerify: provider.Spec.InsecureSkipTlsVerify,
},
},
},
Expand All @@ -48,15 +48,15 @@ func NewProvider(provider *metricsapi.KeptnMetricsProvider, log logr.Logger, k8s
return dynatrace.NewKeptnDynatraceDQLProvider(
k8sClient,
dynatrace.WithLogger(log),
dynatrace.WithSkipVerifyCertificate(provider.Spec.SkipVerifyCertificate),
dynatrace.WithSkipVerifyCertificate(provider.Spec.InsecureSkipTlsVerify),
), nil
case DataDogProviderType:
return &datadog.KeptnDataDogProvider{
Log: log,
HttpClient: http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: provider.Spec.SkipVerifyCertificate,
InsecureSkipVerify: provider.Spec.InsecureSkipTlsVerify,
},
},
},
Expand Down

0 comments on commit a77733e

Please sign in to comment.