Skip to content

Commit ece5d77

Browse files
committed
chore: let controller-gen can generate crds correctly
revert some changes from tektoncd#6445
1 parent 24e0af9 commit ece5d77

18 files changed

+14
-30
lines changed

pkg/apis/pipeline/v1/container_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ type Step struct {
140140
Ref *Ref `json:"ref,omitempty"`
141141
// Params declares parameters passed to this step action.
142142
// +optional
143-
// +listType=atomic
144143
Params Params `json:"params,omitempty"`
145144
// Results declares StepResults produced by the Step.
146145
//

pkg/apis/pipeline/v1/matrix_types.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ type Matrix struct {
3131
// Params takes only `Parameters` of type `"array"`
3232
// Each array element is supplied to the `PipelineTask` by substituting `params` of type `"string"` in the underlying `Task`.
3333
// The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.
34-
// +listType=atomic
3534
Params Params `json:"params,omitempty"`
3635

3736
// Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
3837
// +optional
39-
// +listType=atomic
4038
Include IncludeParamsList `json:"include,omitempty"`
4139
}
4240

4341
// IncludeParamsList is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
42+
// +listType=atomic
4443
type IncludeParamsList []IncludeParams
4544

4645
// IncludeParams allows passing in a specific combinations of Parameters into the Matrix.
@@ -50,7 +49,6 @@ type IncludeParams struct {
5049

5150
// Params takes only `Parameters` of type `"string"`
5251
// The names of the `params` must match the names of the `params` in the underlying `Task`
53-
// +listType=atomic
5452
Params Params `json:"params,omitempty"`
5553
}
5654

pkg/apis/pipeline/v1/param_types.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ type ParamSpec struct {
6262
}
6363

6464
// ParamSpecs is a list of ParamSpec
65+
// +listType=atomic
6566
type ParamSpecs []ParamSpec
6667

6768
// PropertySpec defines the struct for object keys
@@ -268,6 +269,7 @@ func (p Param) ParseTaskandResultName() (string, string) {
268269
}
269270

270271
// Params is a list of Param
272+
// +listType=atomic
271273
type Params []Param
272274

273275
// ExtractParamArrayLengths extract and return the lengths of all array params
@@ -482,11 +484,11 @@ var AllParamTypes = []ParamType{ParamTypeString, ParamTypeArray, ParamTypeObject
482484
// Used in JSON unmarshalling so that a single JSON field can accept
483485
// either an individual string or an array of strings.
484486
type ParamValue struct {
485-
Type ParamType // Represents the stored type of ParamValues.
486-
StringVal string
487+
Type ParamType `json:"type"` // Represents the stored type of ParamValues.
488+
StringVal string `json:"stringVal"`
487489
// +listType=atomic
488-
ArrayVal []string
489-
ObjectVal map[string]string
490+
ArrayVal []string `json:"arrayVal"`
491+
ObjectVal map[string]string `json:"objectVal"`
490492
}
491493

492494
// UnmarshalJSON implements the json.Unmarshaller interface.

pkg/apis/pipeline/v1/pipeline_types.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ type PipelineSpec struct {
114114
Tasks []PipelineTask `json:"tasks,omitempty"`
115115
// Params declares a list of input parameters that must be supplied when
116116
// this Pipeline is run.
117-
// +listType=atomic
118117
Params ParamSpecs `json:"params,omitempty"`
119118
// Workspaces declares a set of named workspaces that are expected to be
120119
// provided by a PipelineRun.
@@ -218,7 +217,6 @@ type PipelineTask struct {
218217

219218
// Parameters declares parameters passed to this task.
220219
// +optional
221-
// +listType=atomic
222220
Params Params `json:"params,omitempty"`
223221

224222
// Matrix declares parameters used to fan out this task.

pkg/apis/pipeline/v1/pipelinerun_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,6 @@ type PipelineRunSpec struct {
251251
// +optional
252252
PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"`
253253
// Params is a list of parameter names and values.
254-
// +listType=atomic
255254
Params Params `json:"params,omitempty"`
256255

257256
// Used for cancelling a pipelinerun (and maybe more later on)

pkg/apis/pipeline/v1/resolver_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,5 @@ type ResolverRef struct {
3333
// "repo" or "path" but the set of params ultimately depends on
3434
// the chosen resolver.
3535
// +optional
36-
// +listType=atomic
3736
Params Params `json:"params,omitempty"`
3837
}

pkg/apis/pipeline/v1/task_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ type TaskSpec struct {
8080
// must be supplied as inputs in TaskRuns unless they declare a default
8181
// value.
8282
// +optional
83-
// +listType=atomic
8483
Params ParamSpecs `json:"params,omitempty"`
8584

8685
// DisplayName is a user-facing name of the task that may be

pkg/apis/pipeline/v1/taskrun_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ type TaskRunSpec struct {
3636
// +optional
3737
Debug *TaskRunDebug `json:"debug,omitempty"`
3838
// +optional
39-
// +listType=atomic
4039
Params Params `json:"params,omitempty"`
4140
// +optional
4241
ServiceAccountName string `json:"serviceAccountName"`

pkg/apis/pipeline/v1alpha1/stepaction_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ type StepActionSpec struct {
121121
// Params is a list of input parameters required to run the stepAction.
122122
// Params must be supplied as inputs in Steps unless they declare a defaultvalue.
123123
// +optional
124-
// +listType=atomic
125124
Params v1.ParamSpecs `json:"params,omitempty"`
126125
// Results are values that this StepAction can output
127126
// +optional

pkg/apis/pipeline/v1beta1/container_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ type Step struct {
235235
Ref *Ref `json:"ref,omitempty"`
236236
// Params declares parameters passed to this step action.
237237
// +optional
238-
// +listType=atomic
239238
Params Params `json:"params,omitempty"`
240239
// Results declares StepResults produced by the Step.
241240
//

0 commit comments

Comments
 (0)