Skip to content

Commit 2190d2e

Browse files
committed
add nil check
1 parent 3c0bfee commit 2190d2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/k8s/controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ type NewLoadBalancerControllerInput struct {
249249
// NewLoadBalancerController creates a controller
250250
func NewLoadBalancerController(input NewLoadBalancerControllerInput) *LoadBalancerController {
251251
otelTrustedCertSecret := ""
252-
if input.NginxConfigurator.CfgParams.MainOtelExporterTrustedCA != "" {
252+
if input.NginxConfigurator != nil && input.NginxConfigurator.CfgParams.MainOtelExporterTrustedCA != "" {
253253
otelTrustedCertSecret = fmt.Sprintf("%s/%s", input.ControllerNamespace, input.NginxConfigurator.CfgParams.MainOtelExporterTrustedCA)
254254
}
255255
specialSecrets := specialSecrets{

0 commit comments

Comments
 (0)