Skip to content

Commit 4f95713

Browse files
authored
Add Channel to Operator API (#171)
Just add the Channel to the API Fixes #169 Fixes OPRUN-2916 Signed-off-by: Todd Short <[email protected]>
1 parent 2f839d0 commit 4f95713

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

api/v1alpha1/operator_types.go

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ type OperatorSpec struct {
3737
//
3838
// For more information on semver, please see https://semver.org/
3939
Version string `json:"version,omitempty"`
40+
41+
//+kubebuilder:validation:MaxLength:=48
42+
//+kubebuilder:validation:Pattern:=^[a-z0-9]+(-[a-z0-9]+)*$
43+
// Channel constraint defintion
44+
Channel string `json:"channel,omitempty"`
4045
}
4146

4247
const (

config/crd/bases/operators.operatorframework.io_operators.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ spec:
3535
spec:
3636
description: OperatorSpec defines the desired state of Operator
3737
properties:
38+
channel:
39+
description: Channel constraint defintion
40+
maxLength: 48
41+
pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
42+
type: string
3843
packageName:
3944
maxLength: 48
4045
pattern: ^[a-z0-9]+(-[a-z0-9]+)*$

0 commit comments

Comments
 (0)