Skip to content

Commit d739fcc

Browse files
committed
Remove unused structs
1 parent 652a0c6 commit d739fcc

2 files changed

Lines changed: 0 additions & 211 deletions

File tree

common/types.go

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
v1 "k8s.io/api/core/v1"
1010
networkingv1 "k8s.io/api/networking/v1"
1111
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
12-
"k8s.io/apimachinery/pkg/util/intstr"
1312
)
1413

1514
// StatusConditionType ...
@@ -196,90 +195,6 @@ type BaseComponentStatefulSet interface {
196195
GetAnnotations() map[string]string
197196
}
198197

199-
// This struct is taken from the Probe specification in https://github.com/kubernetes/api/blob/v0.33.4/core/v1/types.go
200-
// +kubebuilder:object:generate=true
201-
type BaseComponentProbe struct {
202-
// The action taken to determine the health of a container
203-
BaseComponentProbeHandler `json:",inline"`
204-
// Number of seconds after the container has started before liveness probes are initiated.
205-
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
206-
// +optional
207-
InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty"`
208-
// Number of seconds after which the probe times out.
209-
// Defaults to 1 second. Minimum value is 1.
210-
// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
211-
// +optional
212-
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`
213-
// How often (in seconds) to perform the probe.
214-
// Default to 10 seconds. Minimum value is 1.
215-
// +optional
216-
PeriodSeconds int32 `json:"periodSeconds,omitempty"`
217-
// Minimum consecutive successes for the probe to be considered successful after having failed.
218-
// Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
219-
// +optional
220-
SuccessThreshold int32 `json:"successThreshold,omitempty"`
221-
// Minimum consecutive failures for the probe to be considered failed after having succeeded.
222-
// Defaults to 3. Minimum value is 1.
223-
// +optional
224-
FailureThreshold int32 `json:"failureThreshold,omitempty"`
225-
// Optional duration in seconds the pod needs to terminate gracefully upon probe failure.
226-
// The grace period is the duration in seconds after the processes running in the pod are sent
227-
// a termination signal and the time when the processes are forcibly halted with a kill signal.
228-
// Set this value longer than the expected cleanup time for your process.
229-
// If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this
230-
// value overrides the value provided by the pod spec.
231-
// Value must be non-negative integer. The value zero indicates stop immediately via
232-
// the kill signal (no opportunity to shut down).
233-
// This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate.
234-
// Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset.
235-
// +optional
236-
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
237-
}
238-
239-
// This struct is taken from the ProbeHandler specification in https://github.com/kubernetes/api/blob/v0.33.4/core/v1/types.go
240-
// +kubebuilder:object:generate=true
241-
type BaseComponentProbeHandler struct {
242-
// Exec specifies the action to take.
243-
// +optional
244-
Exec *corev1.ExecAction `json:"exec,omitempty"`
245-
// HTTPGet specifies the http request to perform.
246-
// +optional
247-
HTTPGet *OptionalHTTPGetAction `json:"httpGet,omitempty"`
248-
// TCPSocket specifies an action involving a TCP port.
249-
// +optional
250-
TCPSocket *corev1.TCPSocketAction `json:"tcpSocket,omitempty"`
251-
252-
// GRPC specifies an action involving a GRPC port.
253-
// This is a beta field and requires enabling GRPCContainerProbe feature gate.
254-
// +featureGate=GRPCContainerProbe
255-
// +optional
256-
GRPC *corev1.GRPCAction `json:"grpc,omitempty"`
257-
}
258-
259-
// This struct is based upon the HTTPGetAction specification in https://github.com/kubernetes/api/blob/v0.33.4/core/v1/types.go
260-
// +kubebuilder:object:generate=true
261-
type OptionalHTTPGetAction struct {
262-
// Path to access on the HTTP server.
263-
// +optional
264-
Path *string `json:"path,omitempty"`
265-
// Name or number of the port to access on the container.
266-
// Number must be in the range 1 to 65535.
267-
// Name must be an IANA_SVC_NAME.
268-
// +optional
269-
Port *intstr.IntOrString `json:"port,omitempty"`
270-
// Host name to connect to, defaults to the pod IP. You probably want to set
271-
// "Host" in httpHeaders instead.
272-
// +optional
273-
Host *string `json:"host,omitempty"`
274-
// Scheme to use for connecting to the host.
275-
// Defaults to HTTP.
276-
// +optional
277-
Scheme *corev1.URIScheme `json:"scheme,omitempty"`
278-
// Custom headers to set in the request. HTTP allows repeated headers.
279-
// +optional
280-
HTTPHeaders *[]corev1.HTTPHeader `json:"httpHeaders,omitempty"`
281-
}
282-
283198
// BaseComponentProbes describes the probes for application container
284199
type BaseComponentProbes interface {
285200
GetLivenessProbe() *corev1.Probe

common/zz_generated.deepcopy.go

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)