Skip to content

Commit

Permalink
fix: do not omit 0 replica (#556)
Browse files Browse the repository at this point in the history
* fix: do not omit 0 replica

Signed-off-by: Aylei <rayingecho@gmail.com>

* fix

Signed-off-by: Aylei <rayingecho@gmail.com>

---------

Signed-off-by: Aylei <rayingecho@gmail.com>
  • Loading branch information
aylei authored Oct 12, 2024
1 parent bf9d35b commit 5e68358
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 2 deletions.
3 changes: 1 addition & 2 deletions api/core/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ type PodSet struct {
Overlay *Overlay `json:"overlay,omitempty"`

// Replicas is the desired number of pods of this set
// +optional
Replicas int32 `json:"replicas,omitempty"`
Replicas int32 `json:"replicas"`

// TopologyEvenSpread specifies what topology domains the Pods in set should be
// evenly spread in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
required:
- deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
status:
description: CNSetStatus Figure out what status should be exposed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
status:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ spec:
type: string
type: object
required:
- replicas
- sharedStorage
- volume
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
cnGroups:
description: CNGroups are CN pod sets that have different spec like
Expand Down Expand Up @@ -770,6 +772,7 @@ spec:
type: object
required:
- name
- replicas
type: object
type: array
x-kubernetes-list-map-keys:
Expand Down Expand Up @@ -959,6 +962,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
imagePullPolicy:
description: PullPolicy describes a policy for if/when to pull a container
Expand Down Expand Up @@ -1252,6 +1257,7 @@ spec:
type: string
type: object
required:
- replicas
- sharedStorage
- volume
type: object
Expand Down Expand Up @@ -1421,6 +1427,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
restoreFrom:
type: string
Expand Down Expand Up @@ -1614,6 +1622,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
topologySpread:
description: |-
Expand Down Expand Up @@ -1973,6 +1983,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
version:
description: |-
Expand Down Expand Up @@ -2141,6 +2153,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
required:
- logService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
status:
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
status:
properties:
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/core.matrixorigin.io_cnpools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
required:
- deps
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/core.matrixorigin.io_cnsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
status:
description: CNSetStatus Figure out what status should be exposed
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/core.matrixorigin.io_dnsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
status:
properties:
Expand Down
1 change: 1 addition & 0 deletions deploy/crds/core.matrixorigin.io_logsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ spec:
type: string
type: object
required:
- replicas
- sharedStorage
- volume
type: object
Expand Down
14 changes: 14 additions & 0 deletions deploy/crds/core.matrixorigin.io_matrixoneclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
cnGroups:
description: CNGroups are CN pod sets that have different spec like
Expand Down Expand Up @@ -770,6 +772,7 @@ spec:
type: object
required:
- name
- replicas
type: object
type: array
x-kubernetes-list-map-keys:
Expand Down Expand Up @@ -959,6 +962,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
imagePullPolicy:
description: PullPolicy describes a policy for if/when to pull a container
Expand Down Expand Up @@ -1252,6 +1257,7 @@ spec:
type: string
type: object
required:
- replicas
- sharedStorage
- volume
type: object
Expand Down Expand Up @@ -1421,6 +1427,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
restoreFrom:
type: string
Expand Down Expand Up @@ -1614,6 +1622,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
topologySpread:
description: |-
Expand Down Expand Up @@ -1973,6 +1983,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
version:
description: |-
Expand Down Expand Up @@ -2141,6 +2153,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
required:
- logService
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/core.matrixorigin.io_proxysets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ spec:
items:
type: string
type: array
required:
- replicas
type: object
status:
properties:
Expand Down
2 changes: 2 additions & 0 deletions deploy/crds/core.matrixorigin.io_webuis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ spec:
can be unavailable during the update process.
x-kubernetes-int-or-string: true
type: object
required:
- replicas
type: object
status:
properties:
Expand Down

0 comments on commit 5e68358

Please sign in to comment.