diff --git a/acceptance/testdata/runnerdeploy.yaml b/acceptance/testdata/runnerdeploy.yaml index 684a2725..bff2ce38 100644 --- a/acceptance/testdata/runnerdeploy.yaml +++ b/acceptance/testdata/runnerdeploy.yaml @@ -3,7 +3,7 @@ kind: RunnerDeployment metadata: name: example-runnerdeploy spec: - replicas: 1 +# replicas: 1 template: spec: repository: mumoshu/actions-runner-controller-ci diff --git a/api/v1alpha1/runnerdeployment_types.go b/api/v1alpha1/runnerdeployment_types.go index f6b68a2f..8a79d306 100644 --- a/api/v1alpha1/runnerdeployment_types.go +++ b/api/v1alpha1/runnerdeployment_types.go @@ -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"` diff --git a/api/v1alpha1/runnerreplicaset_types.go b/api/v1alpha1/runnerreplicaset_types.go index ffc357fa..eaef7fd7 100644 --- a/api/v1alpha1/runnerreplicaset_types.go +++ b/api/v1alpha1/runnerreplicaset_types.go @@ -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"` } diff --git a/config/crd/bases/actions.summerwind.dev_runnerdeployments.yaml b/config/crd/bases/actions.summerwind.dev_runnerdeployments.yaml index 54600d6d..e0b4e02a 100644 --- a/config/crd/bases/actions.summerwind.dev_runnerdeployments.yaml +++ b/config/crd/bases/actions.summerwind.dev_runnerdeployments.yaml @@ -41,6 +41,7 @@ spec: description: RunnerReplicaSetSpec defines the desired state of RunnerDeployment properties: replicas: + nullable: true type: integer template: properties: diff --git a/config/crd/bases/actions.summerwind.dev_runnerreplicasets.yaml b/config/crd/bases/actions.summerwind.dev_runnerreplicasets.yaml index 522a2e19..e243ce43 100644 --- a/config/crd/bases/actions.summerwind.dev_runnerreplicasets.yaml +++ b/config/crd/bases/actions.summerwind.dev_runnerreplicasets.yaml @@ -41,6 +41,7 @@ spec: description: RunnerReplicaSetSpec defines the desired state of RunnerReplicaSet properties: replicas: + nullable: true type: integer template: properties: @@ -1533,7 +1534,6 @@ spec: type: object type: object required: - - replicas - template type: object status: