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 committed Jul 30, 2020
1 parent 3fc7c03 commit ca8e352
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 ca8e352

Please sign in to comment.