From 8dc3a7f64de0ea1a8061556bbf99bdd6e51ce278 Mon Sep 17 00:00:00 2001 From: Richard87 Date: Tue, 10 Dec 2024 14:55:19 +0100 Subject: [PATCH] simplify structures --- pkg/apis/deployment/kubedeployment_test.go | 14 +-- pkg/apis/deployment/radixcomponent_test.go | 14 +-- pkg/apis/radix/v1/radixapptypes.go | 22 ----- pkg/apis/radix/v1/radixhealthchecktypes.go | 92 ++++++++++---------- pkg/apis/radix/v1/zz_generated.deepcopy.go | 57 +----------- pkg/apis/radixvalidators/validate_ra.go | 42 ++++----- pkg/apis/radixvalidators/validate_ra_test.go | 16 ++-- 7 files changed, 85 insertions(+), 172 deletions(-) diff --git a/pkg/apis/deployment/kubedeployment_test.go b/pkg/apis/deployment/kubedeployment_test.go index 3847a4f3b..54c694fa2 100644 --- a/pkg/apis/deployment/kubedeployment_test.go +++ b/pkg/apis/deployment/kubedeployment_test.go @@ -57,21 +57,21 @@ func TestComponentWithCustomHealthChecks(t *testing.T) { createProbe := func(handler v1.RadixProbeHandler, seconds int32) *v1.RadixProbe { return &v1.RadixProbe{ RadixProbeHandler: handler, - InitialDelaySeconds: pointers.Ptr(seconds), - TimeoutSeconds: pointers.Ptr(seconds + 1), - PeriodSeconds: pointers.Ptr(seconds + 2), - SuccessThreshold: pointers.Ptr(seconds + 3), - FailureThreshold: pointers.Ptr(seconds + 4), + InitialDelaySeconds: seconds, + TimeoutSeconds: seconds + 1, + PeriodSeconds: seconds + 2, + SuccessThreshold: seconds + 3, + FailureThreshold: seconds + 4, // TerminationGracePeriodSeconds: pointers.Ptr(int64(seconds + 5)), } } readynessProbe := createProbe(v1.RadixProbeHandler{HTTPGet: &v1.RadixProbeHTTPGetAction{ - Port: pointers.Ptr[int32](5000), + Port: 5000, }}, 10) livenessProbe := createProbe(v1.RadixProbeHandler{TCPSocket: &v1.RadixProbeTCPSocketAction{ - Port: pointers.Ptr[int32](5000), + Port: 5000, }}, 20) startuProbe := createProbe(v1.RadixProbeHandler{Exec: &v1.RadixProbeExecAction{ Command: []string{"echo", "hello"}, diff --git a/pkg/apis/deployment/radixcomponent_test.go b/pkg/apis/deployment/radixcomponent_test.go index bde0275cf..f787646c7 100644 --- a/pkg/apis/deployment/radixcomponent_test.go +++ b/pkg/apis/deployment/radixcomponent_test.go @@ -1052,18 +1052,18 @@ func Test_GetRadixComponents_CustomHealthChecks(t *testing.T) { createProbe := func(handler radixv1.RadixProbeHandler, seconds int32) *radixv1.RadixProbe { return &radixv1.RadixProbe{ RadixProbeHandler: handler, - InitialDelaySeconds: &seconds, - TimeoutSeconds: pointers.Ptr(seconds + 1), - PeriodSeconds: pointers.Ptr(seconds + 2), - SuccessThreshold: pointers.Ptr(seconds + 3), - FailureThreshold: pointers.Ptr(seconds + 4), + InitialDelaySeconds: seconds, + TimeoutSeconds: seconds + 1, + PeriodSeconds: seconds + 2, + SuccessThreshold: seconds + 3, + FailureThreshold: seconds + 4, // TerminationGracePeriodSeconds: pointers.Ptr(int64(seconds + 5)), } } - httpProbe := radixv1.RadixProbeHandler{HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: pointers.Ptr[int32](5000), Path: pointers.Ptr("/healthz"), Scheme: pointers.Ptr(corev1.URISchemeHTTP)}} + httpProbe := radixv1.RadixProbeHandler{HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: 5000, Path: "/healthz", Scheme: corev1.URISchemeHTTP}} execProbe := radixv1.RadixProbeHandler{Exec: &radixv1.RadixProbeExecAction{Command: []string{"/bin/sh", "-c", "/healthz /healthz"}}} - tcpProbe := radixv1.RadixProbeHandler{TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: pointers.Ptr[int32](8000)}} + tcpProbe := radixv1.RadixProbeHandler{TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: 8000}} testCases := []struct { description string diff --git a/pkg/apis/radix/v1/radixapptypes.go b/pkg/apis/radix/v1/radixapptypes.go index 70f27a040..7d604d68b 100644 --- a/pkg/apis/radix/v1/radixapptypes.go +++ b/pkg/apis/radix/v1/radixapptypes.go @@ -815,28 +815,6 @@ type RadixJobComponentPayload struct { Path string `json:"path"` } -type RadixHealthChecks struct { - // Periodic probe of container liveness. - // Container will be restarted if the probe fails. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // +optional - LivenessProbe *RadixProbe `json:"livenessProbe,omitempty"` - // Periodic probe of container service readiness. - // Container will be removed from service endpoints if the probe fails. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // Defaults to TCP Probe against the first listed port - // +optional - ReadinessProbe *RadixProbe `json:"readinessProbe,omitempty"` - // StartupProbe indicates that the Pod has successfully initialized. - // If specified, no other probes are executed until this completes successfully. - // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - // when it might take a long time to load data or warm a cache, than during steady-state operation. - // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - // +optional - StartupProbe *RadixProbe `json:"startupProbe,omitempty"` -} - // PrivateImageHubEntries defines authentication information for private image registries. type PrivateImageHubEntries map[string]*RadixPrivateImageHubCredential diff --git a/pkg/apis/radix/v1/radixhealthchecktypes.go b/pkg/apis/radix/v1/radixhealthchecktypes.go index 1ad2460fd..d8e67ece4 100644 --- a/pkg/apis/radix/v1/radixhealthchecktypes.go +++ b/pkg/apis/radix/v1/radixhealthchecktypes.go @@ -1,11 +1,32 @@ package v1 import ( - "github.com/equinor/radix-common/utils/pointers" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" ) +type RadixHealthChecks struct { + // Periodic probe of container liveness. + // Container will be restarted if the probe fails. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + LivenessProbe *RadixProbe `json:"livenessProbe,omitempty"` + // Periodic probe of container service readiness. + // Container will be removed from service endpoints if the probe fails. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // Defaults to TCP Probe against the first listed port + // +optional + ReadinessProbe *RadixProbe `json:"readinessProbe,omitempty"` + // StartupProbe indicates that the Pod has successfully initialized. + // If specified, no other probes are executed until this completes successfully. + // If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + // This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + // when it might take a long time to load data or warm a cache, than during steady-state operation. + // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + // +optional + StartupProbe *RadixProbe `json:"startupProbe,omitempty"` +} + // RadixProbe describes a health check to be performed against a container to determine whether it is // alive or ready to receive traffic. type RadixProbe struct { @@ -14,42 +35,31 @@ type RadixProbe struct { // Number of seconds after the container has started before liveness probes are initiated. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes // +optional - InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"` + InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"` // Number of seconds after which the probe times out. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes // +kubebuilder:validation:Minimum=1 // +default=1 // +optional - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` + TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` // How often (in seconds) to perform the probe. // +kubebuilder:validation:Minimum=1 // +default=10 // +optional - PeriodSeconds *int32 `json:"periodSeconds,omitempty"` + PeriodSeconds int32 `json:"periodSeconds,omitempty"` // Minimum consecutive successes for the probe to be considered successful after having failed. // Must be 1 for liveness and startup. // +kubebuilder:validation:Minimum=1 // +default=1 // +optional - SuccessThreshold *int32 `json:"successThreshold,omitempty"` + SuccessThreshold int32 `json:"successThreshold,omitempty"` // Minimum consecutive failures for the probe to be considered failed after having succeeded. // +kubebuilder:validation:Minimum=1 // +default=3 // +optional - FailureThreshold *int32 `json:"failureThreshold,omitempty"` - - // // Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - // // The grace period is the duration in seconds after the processes running in the pod are sent - // // a termination signal and the time when the processes are forcibly halted with a kill signal. - // // Set this value longer than the expected cleanup time for your process. - // // If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - // // value overrides the value provided by the pod spec. - // // Value must be non-negative integer. The value zero indicates stop immediately via - // // the kill signal (no opportunity to shut down). - // // This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - // // +kubebuilder:validation:Minimum=1 - // // +default=30 - // // +optional + FailureThreshold int32 `json:"failureThreshold,omitempty"` + + // Todo: This is a beta property that we might want to take in in the future // TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` } @@ -60,12 +70,11 @@ func (rp *RadixProbe) MapToCoreProbe() *corev1.Probe { return &corev1.Probe{ ProbeHandler: rp.RadixProbeHandler.MapToCoreProbe(), - InitialDelaySeconds: pointers.Val(rp.InitialDelaySeconds), - TimeoutSeconds: pointers.Val(rp.TimeoutSeconds), - PeriodSeconds: pointers.Val(rp.PeriodSeconds), - SuccessThreshold: pointers.Val(rp.SuccessThreshold), - FailureThreshold: pointers.Val(rp.FailureThreshold), - // TerminationGracePeriodSeconds: rp.TerminationGracePeriodSeconds, + InitialDelaySeconds: rp.InitialDelaySeconds, + TimeoutSeconds: rp.TimeoutSeconds, + PeriodSeconds: rp.PeriodSeconds, + SuccessThreshold: rp.SuccessThreshold, + FailureThreshold: rp.FailureThreshold, } } @@ -95,20 +104,20 @@ func (p RadixProbeHandler) MapToCoreProbe() corev1.ProbeHandler { type RadixProbeHTTPGetAction struct { // Path to access on the HTTP server. // +optional - Path *string `json:"path,omitempty"` + Path string `json:"path,omitempty"` // port number to access on the container. // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 - Port *int32 `json:"port"` + Port int32 `json:"port"` // Host name to connect to, defaults to the pod IP. You probably want to set // "Host" in httpHeaders instead. // +optional - Host *string `json:"host,omitempty"` + Host string `json:"host,omitempty"` // Scheme to use for connecting to the host. // Defaults to HTTP. // +optional // +kubebuilder:validation:Enum=HTTPS;HTTP - Scheme *corev1.URIScheme `json:"scheme,omitempty"` + Scheme corev1.URIScheme `json:"scheme,omitempty"` // Custom headers to set in the request. HTTP allows repeated headers. // +optional // +listType=atomic @@ -120,16 +129,11 @@ func (a *RadixProbeHTTPGetAction) MapToCoreProbe() *corev1.HTTPGetAction { return nil } - var port intstr.IntOrString - if a.Port != nil { - port = intstr.FromInt32(*a.Port) - } - return &corev1.HTTPGetAction{ - Path: pointers.Val(a.Path), - Port: port, - Host: pointers.Val(a.Host), - Scheme: pointers.Val(a.Scheme), + Path: a.Path, + Port: intstr.FromInt32(a.Port), + Host: a.Host, + Scheme: a.Scheme, HTTPHeaders: a.HTTPHeaders, } } @@ -161,24 +165,20 @@ type RadixProbeTCPSocketAction struct { // port number to access on the container. // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 - Port *int32 `json:"port"` + Port int32 `json:"port"` // Optional: Host name to connect to, defaults to the pod IP. // +optional - Host *string `json:"host,omitempty"` + Host string `json:"host,omitempty"` } func (a *RadixProbeTCPSocketAction) MapToCoreProbe() *corev1.TCPSocketAction { if a == nil { return nil } - var port intstr.IntOrString - if a.Port != nil { - port = intstr.FromInt32(*a.Port) - } return &corev1.TCPSocketAction{ - Port: port, - Host: pointers.Val(a.Host), + Port: intstr.FromInt32(a.Port), + Host: a.Host, } } diff --git a/pkg/apis/radix/v1/zz_generated.deepcopy.go b/pkg/apis/radix/v1/zz_generated.deepcopy.go index af753a6e4..6205a61b3 100644 --- a/pkg/apis/radix/v1/zz_generated.deepcopy.go +++ b/pkg/apis/radix/v1/zz_generated.deepcopy.go @@ -2846,31 +2846,6 @@ func (in *RadixPrivateImageHubCredential) DeepCopy() *RadixPrivateImageHubCreden func (in *RadixProbe) DeepCopyInto(out *RadixProbe) { *out = *in in.RadixProbeHandler.DeepCopyInto(&out.RadixProbeHandler) - if in.InitialDelaySeconds != nil { - in, out := &in.InitialDelaySeconds, &out.InitialDelaySeconds - *out = new(int32) - **out = **in - } - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - *out = new(int32) - **out = **in - } - if in.PeriodSeconds != nil { - in, out := &in.PeriodSeconds, &out.PeriodSeconds - *out = new(int32) - **out = **in - } - if in.SuccessThreshold != nil { - in, out := &in.SuccessThreshold, &out.SuccessThreshold - *out = new(int32) - **out = **in - } - if in.FailureThreshold != nil { - in, out := &in.FailureThreshold, &out.FailureThreshold - *out = new(int32) - **out = **in - } return } @@ -2929,26 +2904,6 @@ func (in *RadixProbeGRPCAction) DeepCopy() *RadixProbeGRPCAction { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RadixProbeHTTPGetAction) DeepCopyInto(out *RadixProbeHTTPGetAction) { *out = *in - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(string) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - if in.Host != nil { - in, out := &in.Host, &out.Host - *out = new(string) - **out = **in - } - if in.Scheme != nil { - in, out := &in.Scheme, &out.Scheme - *out = new(corev1.URIScheme) - **out = **in - } if in.HTTPHeaders != nil { in, out := &in.HTTPHeaders, &out.HTTPHeaders *out = make([]corev1.HTTPHeader, len(*in)) @@ -2983,7 +2938,7 @@ func (in *RadixProbeHandler) DeepCopyInto(out *RadixProbeHandler) { if in.TCPSocket != nil { in, out := &in.TCPSocket, &out.TCPSocket *out = new(RadixProbeTCPSocketAction) - (*in).DeepCopyInto(*out) + **out = **in } if in.GRPC != nil { in, out := &in.GRPC, &out.GRPC @@ -3006,16 +2961,6 @@ func (in *RadixProbeHandler) DeepCopy() *RadixProbeHandler { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RadixProbeTCPSocketAction) DeepCopyInto(out *RadixProbeTCPSocketAction) { *out = *in - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - if in.Host != nil { - in, out := &in.Host, &out.Host - *out = new(string) - **out = **in - } return } diff --git a/pkg/apis/radixvalidators/validate_ra.go b/pkg/apis/radixvalidators/validate_ra.go index 99929d179..304a8591e 100644 --- a/pkg/apis/radixvalidators/validate_ra.go +++ b/pkg/apis/radixvalidators/validate_ra.go @@ -838,52 +838,42 @@ func validateHealthChecks(app *radixv1.RadixApplication) error { continue } - if err := validateProbe(component.HealthChecks.StartupProbe, "StartupProbe"); err != nil { + if err := validateProbe(component.HealthChecks.StartupProbe); err != nil { errs = append(errs, ComponentHasInvalidHealthChecks(component.Name, "StartupProbe", err)) } - if err := validateProbe(component.HealthChecks.ReadinessProbe, "ReadinessProbe"); err != nil { + if err := validateProbe(component.HealthChecks.ReadinessProbe); err != nil { errs = append(errs, ComponentHasInvalidHealthChecks(component.Name, "ReadinessProbe", err)) } - if err := validateProbe(component.HealthChecks.LivenessProbe, "LivenessProbe"); err != nil { + if err := validateProbe(component.HealthChecks.LivenessProbe); err != nil { errs = append(errs, ComponentHasInvalidHealthChecks(component.Name, "LivenessProbe", err)) } + + // SuccessTreshold must be 0 (unset) or 1 for Startup Probe + if component.HealthChecks.StartupProbe != nil && component.HealthChecks.StartupProbe.SuccessThreshold > 1 { + errs = append(errs, ComponentHasInvalidHealthChecks(component.Name, "StartupProbe", fmt.Errorf("SuccessThreshold must be equal to 1"))) + } + + // SuccessTreshold must be 0 (unset) or 1 for Startup Probe + if component.HealthChecks.LivenessProbe != nil && component.HealthChecks.LivenessProbe.SuccessThreshold > 1 { + errs = append(errs, ComponentHasInvalidHealthChecks(component.Name, "LivenessProbe", fmt.Errorf("SuccessThreshold must be equal to 1"))) + } } return errors.Join(errs...) } -func validateProbe(probe *radixv1.RadixProbe, name string) error { +func validateProbe(probe *radixv1.RadixProbe) error { if probe == nil { return nil } - var errs []error if (probe.HTTPGet != nil && (probe.TCPSocket != nil || probe.Exec != nil)) || (probe.TCPSocket != nil && (probe.HTTPGet != nil || probe.Exec != nil)) || (probe.Exec != nil && (probe.HTTPGet != nil || probe.TCPSocket != nil)) { - errs = append(errs, fmt.Errorf("HTTPGet, TCPSocket and Exec are mutually exclusive")) - } - - if probe.InitialDelaySeconds != nil && *probe.InitialDelaySeconds < 1 { - errs = append(errs, fmt.Errorf("InitialDelaySeconds must be equal or greater than 1")) - } - - if probe.TimeoutSeconds != nil && *probe.TimeoutSeconds < 1 { - errs = append(errs, fmt.Errorf("TimeoutSeconds must be equal or greater than 1")) - } - - if probe.PeriodSeconds != nil && *probe.PeriodSeconds < 1 { - errs = append(errs, fmt.Errorf("PeriodSeconds must be equal or greater than 1")) - } - - if probe.SuccessThreshold != nil && *probe.SuccessThreshold < 1 { - errs = append(errs, fmt.Errorf("SuccessThreshold must be equal or greater than 1")) - } - if (name == "StartupProbe" || name == "LivenessProbe") && probe.SuccessThreshold != nil && *probe.SuccessThreshold != 1 { - errs = append(errs, fmt.Errorf("SuccessThreshold must be equal to 1 for Liveness and Startup probes")) + return fmt.Errorf("HTTPGet, TCPSocket and Exec are mutually exclusive") } - return errors.Join(errs...) + return nil } func getEnvVarNameMap(componentEnvVarsMap radixv1.EnvVarsMap, envsEnvVarsMap radixv1.EnvVarsMap) map[string]bool { diff --git a/pkg/apis/radixvalidators/validate_ra_test.go b/pkg/apis/radixvalidators/validate_ra_test.go index fa160e4d1..afc728ce0 100644 --- a/pkg/apis/radixvalidators/validate_ra_test.go +++ b/pkg/apis/radixvalidators/validate_ra_test.go @@ -612,13 +612,13 @@ func Test_invalid_ra(t *testing.T) { {"custom healthchecks are valid", nil, func(rr *radixv1.RadixApplication) { rr.Spec.Components[0].HealthChecks = &radixv1.RadixHealthChecks{ LivenessProbe: &radixv1.RadixProbe{ - RadixProbeHandler: radixv1.RadixProbeHandler{HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: pointers.Ptr[int32](5000), Path: pointers.Ptr("/healthz")}}, + RadixProbeHandler: radixv1.RadixProbeHandler{HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: 5000, Path: "/healthz"}}, }, ReadinessProbe: &radixv1.RadixProbe{ RadixProbeHandler: radixv1.RadixProbeHandler{Exec: &radixv1.RadixProbeExecAction{Command: []string{"/bin/sh", "-c", "/healthz"}}}, }, StartupProbe: &radixv1.RadixProbe{ - RadixProbeHandler: radixv1.RadixProbeHandler{TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: pointers.Ptr[int32](5000)}}, + RadixProbeHandler: radixv1.RadixProbeHandler{TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: 5000}}, }, } }}, @@ -626,23 +626,23 @@ func Test_invalid_ra(t *testing.T) { rr.Spec.Components[0].HealthChecks = &radixv1.RadixHealthChecks{ LivenessProbe: &radixv1.RadixProbe{ RadixProbeHandler: radixv1.RadixProbeHandler{ - HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: pointers.Ptr[int32](5000), Path: pointers.Ptr("/healthz")}, + HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: 5000, Path: "/healthz"}, Exec: &radixv1.RadixProbeExecAction{Command: []string{"/bin/sh", "-c", "/healthz"}}, - TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: pointers.Ptr[int32](5000)}, + TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: 5000}, }, }, ReadinessProbe: &radixv1.RadixProbe{ RadixProbeHandler: radixv1.RadixProbeHandler{ - HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: pointers.Ptr[int32](5000), Path: pointers.Ptr("/healthz")}, + HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: 5000, Path: "/healthz"}, Exec: &radixv1.RadixProbeExecAction{Command: []string{"/bin/sh", "-c", "/healthz"}}, - TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: pointers.Ptr[int32](5000)}, + TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: 5000}, }, }, StartupProbe: &radixv1.RadixProbe{ RadixProbeHandler: radixv1.RadixProbeHandler{ - HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: pointers.Ptr[int32](5000), Path: pointers.Ptr("/healthz")}, + HTTPGet: &radixv1.RadixProbeHTTPGetAction{Port: 5000, Path: "/healthz"}, Exec: &radixv1.RadixProbeExecAction{Command: []string{"/bin/sh", "-c", "/healthz"}}, - TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: pointers.Ptr[int32](5000)}, + TCPSocket: &radixv1.RadixProbeTCPSocketAction{Port: 5000}, }, }, }