Skip to content

Commit

Permalink
overrides: Allow nullable replicas (PROJQUAY-6474)
Browse files Browse the repository at this point in the history
- Allow user to set overrides for replicas to null in order to completely remove default value
- This prevents conflicts with HPA in the event that a user wants to use an unmanaged HPA
  • Loading branch information
jonathankingfc committed Jul 24, 2024
1 parent 0d4ef10 commit 39b6ed6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
13 changes: 7 additions & 6 deletions apis/quay/v1/quayregistry_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,13 @@ type Component struct {

// Override describes configuration overrides for the given managed component
type Override struct {
VolumeSize *resource.Quantity `json:"volumeSize,omitempty"`
Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
Replicas *int32 `json:"replicas,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
VolumeSize *resource.Quantity `json:"volumeSize,omitempty"`
Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
// +nullable
Replicas *int32 `json:"replicas,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}

type ConditionType string
Expand Down
1 change: 1 addition & 0 deletions bundle/manifests/quayregistries.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ spec:
type: object
replicas:
format: int32
nullable: true
type: integer
volumeSize:
anyOf:
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/quay.redhat.com_quayregistries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ spec:
type: object
replicas:
format: int32
nullable: true
type: integer
volumeSize:
anyOf:
Expand Down

0 comments on commit 39b6ed6

Please sign in to comment.