diff --git a/api/v1/devcontainerapp_types.go b/api/v1/devcontainerapp_types.go index 49cb554..7ed34e6 100644 --- a/api/v1/devcontainerapp_types.go +++ b/api/v1/devcontainerapp_types.go @@ -65,7 +65,7 @@ type StatefulSetSpec struct { Image string `json:"image"` Command []string `json:"command"` - // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Minimum=1 // +optional ContainerPort uint16 `json:"containerPort,omitempty"` } @@ -77,7 +77,7 @@ type ServiceSpec struct { // +optional NodePort uint16 `json:"nodePort,omitempty"` - // +kubebuilder:validation:Minimum=0 + // +kubebuilder:validation:Minimum=1 // +optional ServicePort uint16 `json:"servicePort,omitempty"` } diff --git a/config/crd/bases/devcontainer.devstar.cn_devcontainerapps.yaml b/config/crd/bases/devcontainer.devstar.cn_devcontainerapps.yaml index 4dfc850..dc352e8 100644 --- a/config/crd/bases/devcontainer.devstar.cn_devcontainerapps.yaml +++ b/config/crd/bases/devcontainer.devstar.cn_devcontainerapps.yaml @@ -54,7 +54,7 @@ spec: minimum: 30000 type: integer servicePort: - minimum: 0 + minimum: 1 type: integer type: object startingDeadlineSeconds: @@ -72,7 +72,7 @@ spec: type: string type: array containerPort: - minimum: 0 + minimum: 1 type: integer image: type: string