Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🍒]Skip pre-upgrade jobs for patch revisions and improve version comparison #140

Closed
wants to merge 7 commits into from
36 changes: 35 additions & 1 deletion api/v1alpha1/cdapmaster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ type CDAPMasterSpec struct {
// Logs is specification for the CDAP logging service.
Logs LogsSpec `json:"logs,omitempty"`
// Messaging is specification for the CDAP messaging service.
Messaging MessagingSpec `json:"messaging,omitempty"`
// To disable this service: either omit or set the field to nil
// To enable this service: set it to a pointer to a MessagingSpec struct (can be an empty struct)
Messaging *MessagingSpec `json:"messaging,omitempty"`
// Metadata is specification for the CDAP metadata service.
Metadata MetadataSpec `json:"metadata,omitempty"`
// Metrics is specification for the CDAP metrics service.
Expand Down Expand Up @@ -174,6 +176,10 @@ type CDAPServiceSpec struct {
Lifecycle *corev1.Lifecycle `json:"lifecycle,omitempty"`
// Affinity describes node affinity scheduling rules for the service.
Affinity *corev1.Affinity `json:"affinity,omitempty"`
// StartupProbe is an optional field to configure startup probe for the main container in the service pods.
// To disable startup probe: either omit or set the field to nil.
// To enable startup probe: set it to a pointer to a StartupProbe struct.
StartupProbe *StartupProbe `json:"startupProbe,omitempty"`
}

// CDAPScalableServiceSpec defines the base specification for master services that can have more than one instance.
Expand Down Expand Up @@ -221,6 +227,14 @@ type CDAPScalableStatefulServiceSpec struct {
// AppFabricSpec defines the specification for the AppFabric service.
type AppFabricSpec struct {
CDAPScalableServiceSpec `json:",inline"`
// StorageSize is specification for the persistent volume size used by the service.
// Note: This is added for backward compatibility where Appfabric runs as CDAP stateful service.
// This field can be set to nil if appfabric is run as CDAP scalable service.
StorageSize *string `json:"storageSize,omitempty"`
// StorageClassName is the name of the StorageClass for the persistent volume used by the service.
// Note: This is added for backward compatibility where Appfabric runs as CDAP stateful service.
// This field can be set to nil if appfabric is run as CDAP scalable service.
StorageClassName *string `json:"storageClassName,omitempty"`
}

// AppFabricProcessorSpec defines the specification for the AppFabric Processor service.
Expand Down Expand Up @@ -293,6 +307,26 @@ type SystemMetricExporterSpec struct {
CDAPServiceSpec `json:",inline"`
}

// StartupProbe defines the fields for setting corev1.Probe for the main containers in the service pods.
// For Probe config see:
// https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes.
type StartupProbe struct {
// Port is the port on which the CDAP service is running in the container.
Port int32 `json:"port,omitempty"`
// Number of seconds after the container has started before probes are initiated.
// Defaults to 0 seconds. Minimum value is 0.
InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty"`
// How often (in seconds) to perform the probe.
// Default to 10 seconds. The minimum value is 1.
PeriodSeconds *int32 `json:"periodSeconds,omitempty"`
// Number of seconds after which the probe times out.
// Defaults to 1 second. Minimum value is 1.
TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"`
// Number of consecutive failures before considering the service not ready.
// Defaults to 3. Minimum value is 1.
FailureThreshold *int32 `json:"failureThreshold,omitempty"`
}

// CDAPMasterStatus defines the observed state of CDAPMaster
type CDAPMasterStatus struct {
status.Meta `json:",inline"`
Expand Down
57 changes: 55 additions & 2 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading