Skip to content

Commit 87302d2

Browse files
danielhelfandtekton-robot
authored andcommitted
add omitempty for SchedulerName, ImagePullSecrets, HostNetwork
1 parent e175400 commit 87302d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/apis/pipeline/pod/template.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,15 @@ type Template struct {
9292
PriorityClassName *string `json:"priorityClassName,omitempty" protobuf:"bytes,7,opt,name=priorityClassName"`
9393
// SchedulerName specifies the scheduler to be used to dispatch the Pod
9494
// +optional
95-
SchedulerName string `json:"schedulerName"`
95+
SchedulerName string `json:"schedulerName,omitempty"`
9696

9797
// ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
98-
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets"`
98+
// +optional
99+
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
99100

100101
// HostNetwork specifies whether the pod may use the node network namespace
101102
// +optional
102-
HostNetwork bool `json:"hostNetwork"`
103+
HostNetwork bool `json:"hostNetwork,omitempty"`
103104
}
104105

105106
func (tpl *Template) Equals(other *Template) bool {

0 commit comments

Comments
 (0)