Skip to content

Commit

Permalink
add omitempty for SchedulerName, ImagePullSecrets, HostNetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhelfand authored and tekton-robot committed Jul 30, 2020
1 parent e175400 commit 87302d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/apis/pipeline/pod/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ type Template struct {
PriorityClassName *string `json:"priorityClassName,omitempty" protobuf:"bytes,7,opt,name=priorityClassName"`
// SchedulerName specifies the scheduler to be used to dispatch the Pod
// +optional
SchedulerName string `json:"schedulerName"`
SchedulerName string `json:"schedulerName,omitempty"`

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

// HostNetwork specifies whether the pod may use the node network namespace
// +optional
HostNetwork bool `json:"hostNetwork"`
HostNetwork bool `json:"hostNetwork,omitempty"`
}

func (tpl *Template) Equals(other *Template) bool {
Expand Down

0 comments on commit 87302d2

Please sign in to comment.