mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 11:41:27 +00:00
Make Runner{Deployment,ReplicaSet} replicas actually optional (#186)
If omitted, it properly defaults to 1. Fixes #64
This commit is contained in:
2
acceptance/testdata/runnerdeploy.yaml
vendored
2
acceptance/testdata/runnerdeploy.yaml
vendored
@@ -3,7 +3,7 @@ kind: RunnerDeployment
|
||||
metadata:
|
||||
name: example-runnerdeploy
|
||||
spec:
|
||||
replicas: 1
|
||||
# replicas: 1
|
||||
template:
|
||||
spec:
|
||||
repository: mumoshu/actions-runner-controller-ci
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ spec:
|
||||
description: RunnerReplicaSetSpec defines the desired state of RunnerDeployment
|
||||
properties:
|
||||
replicas:
|
||||
nullable: true
|
||||
type: integer
|
||||
template:
|
||||
properties:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user