Make Runner{Deployment,ReplicaSet} replicas actually optional (#186)

If omitted, it properly defaults to 1.

Fixes #64
This commit is contained in:
Yusuke Kuoka
2020-11-14 22:06:33 +09:00
committed by GitHub
parent 9a22bb5086
commit 1658f51fcb
5 changed files with 7 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ const (
// RunnerReplicaSetSpec defines the desired state of RunnerDeployment
type RunnerDeploymentSpec struct {
// +optional
// +nullable
Replicas *int `json:"replicas,omitempty"`
Template RunnerTemplate `json:"template"`

View File

@@ -22,7 +22,9 @@ import (
// RunnerReplicaSetSpec defines the desired state of RunnerReplicaSet
type RunnerReplicaSetSpec struct {
Replicas *int `json:"replicas"`
// +optional
// +nullable
Replicas *int `json:"replicas,omitempty"`
Template RunnerTemplate `json:"template"`
}