Skip to content

Commit 19e40c9

Browse files
AlinsRanCopilot
andauthored
fix: use https_verify_certificate for standalone health checks (#2755)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 878e501 commit 19e40c9

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

api/adc/types.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,16 @@ type ClientTLS struct {
198198
// UpstreamActiveHealthCheck defines the active upstream health check configuration.
199199
// +k8s:deepcopy-gen=true
200200
type UpstreamActiveHealthCheck struct {
201-
Type string `json:"type,omitempty" yaml:"type,omitempty"`
202-
Timeout int `json:"timeout,omitempty" yaml:"timeout,omitempty"`
203-
Concurrency int `json:"concurrency,omitempty" yaml:"concurrency,omitempty"`
204-
Host string `json:"host,omitempty" yaml:"host,omitempty"`
205-
Port int32 `json:"port,omitempty" yaml:"port,omitempty"`
206-
HTTPPath string `json:"http_path,omitempty" yaml:"http_path,omitempty"`
207-
HTTPSVerifyCert bool `json:"https_verify_cert,omitempty" yaml:"https_verify_cert,omitempty"`
208-
HTTPRequestHeaders []string `json:"req_headers,omitempty" yaml:"req_headers,omitempty"`
209-
Healthy UpstreamActiveHealthCheckHealthy `json:"healthy,omitempty" yaml:"healthy,omitempty"`
210-
Unhealthy UpstreamActiveHealthCheckUnhealthy `json:"unhealthy,omitempty" yaml:"unhealthy,omitempty"`
201+
Type string `json:"type,omitempty" yaml:"type,omitempty"`
202+
Timeout int `json:"timeout,omitempty" yaml:"timeout,omitempty"`
203+
Concurrency int `json:"concurrency,omitempty" yaml:"concurrency,omitempty"`
204+
Host string `json:"host,omitempty" yaml:"host,omitempty"`
205+
Port int32 `json:"port,omitempty" yaml:"port,omitempty"`
206+
HTTPPath string `json:"http_path,omitempty" yaml:"http_path,omitempty"`
207+
HTTPSVerifyCertificate bool `json:"https_verify_certificate,omitempty" yaml:"https_verify_certificate,omitempty"`
208+
HTTPRequestHeaders []string `json:"req_headers,omitempty" yaml:"req_headers,omitempty"`
209+
Healthy UpstreamActiveHealthCheckHealthy `json:"healthy,omitempty" yaml:"healthy,omitempty"`
210+
Unhealthy UpstreamActiveHealthCheckUnhealthy `json:"unhealthy,omitempty" yaml:"unhealthy,omitempty"`
211211
}
212212

213213
// UpstreamPassiveHealthCheck defines the passive health check configuration for an upstream.

internal/adc/translator/apisixupstream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ func translateUpstreamActiveHealthCheck(config *apiv2.ActiveHealthCheck) (*adc.U
323323
active.HTTPRequestHeaders = config.RequestHeaders
324324

325325
if config.StrictTLS == nil || *config.StrictTLS {
326-
active.HTTPSVerifyCert = true
326+
active.HTTPSVerifyCertificate = true
327327
}
328328

329329
if config.Healthy != nil {

0 commit comments

Comments
 (0)