Skip to content

Commit

Permalink
Add some missing json annotations.
Browse files Browse the repository at this point in the history
* Without these annotations kubebuilder's controller-gen will choke
  trying to generate code from these structs which makes it difficult
  to embed PipelineRun into other custom resources.
  • Loading branch information
Jeremy Lewi authored and tekton-robot committed Jul 10, 2020
1 parent 73e531c commit 5eeb17f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/pod/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type Template struct {
SchedulerName string `json:"schedulerName"`

// ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
ImagePullSecrets []corev1.LocalObjectReference
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"`

// HostNetwork specifies whether the pod may use the node network namespace
// +optional
Expand Down
6 changes: 3 additions & 3 deletions pkg/apis/pipeline/v1beta1/param_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ var AllParamTypes = []ParamType{ParamTypeString, ParamTypeArray}
// Used in JSON unmarshalling so that a single JSON field can accept
// either an individual string or an array of strings.
type ArrayOrString struct {
Type ParamType // Represents the stored type of ArrayOrString.
StringVal string
ArrayVal []string
Type ParamType `json:"type"` // Represents the stored type of ArrayOrString.
StringVal string `json:"stringVal"`
ArrayVal []string `json:"arrayVal"`
}

// UnmarshalJSON implements the json.Unmarshaller interface.
Expand Down

0 comments on commit 5eeb17f

Please sign in to comment.