Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions api/v1alpha/workloaddeployment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ type WorkloadDeploymentSpec struct {
//
// +kubebuilder:validation:Required
ScaleSettings HorizontalScaleSettings `json:"scaleSettings"`

// Replicas is the current desired replica target for this deployment. When
// unset, the deployment reconciles to scaleSettings.minReplicas.
//
// +kubebuilder:validation:Optional
Replicas *int32 `json:"replicas,omitempty"`
}

// WorkloadDeploymentStatus defines the observed state of WorkloadDeployment
Expand Down Expand Up @@ -65,6 +71,11 @@ type WorkloadDeploymentStatus struct {
// The number of instances which are ready.
ReadyReplicas int32 `json:"readyReplicas"`

// Selector is the label selector that identifies Pods backing this deployment.
//
// +kubebuilder:validation:Optional
Selector string `json:"selector,omitempty"`

// The most recent generation observed by the deployment controller. When
// this matches metadata.generation, the controller has reconciled the
// latest spec (e.g. a restart request).
Expand All @@ -84,6 +95,7 @@ const (

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
// +kubebuilder:metadata:annotations="discovery.miloapis.com/parent-contexts=Project"

// WorkloadDeployment is the Schema for the workloaddeployments API
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ spec:
placementName:
description: The placement in the workload which is driving a deployment
type: string
replicas:
description: |-
Replicas is the current desired replica target for this deployment. When
unset, the deployment reconciles to scaleSettings.minReplicas.
format: int32
type: integer
scaleSettings:
description: Scale settings such as minimum and maximum replica counts.
properties:
Expand Down Expand Up @@ -1173,6 +1179,10 @@ spec:
description: The number of instances created
format: int32
type: integer
selector:
description: Selector is the label selector that identifies Pods backing
this deployment.
type: string
updatedReplicas:
description: |-
The number of instances updated to the latest template revision, i.e.
Expand All @@ -1192,4 +1202,8 @@ spec:
served: true
storage: true
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}
Loading
Loading