Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add omitempty for SchedulerName, ImagePullSecrets, HostNetwork #3032

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"`
danielhelfand marked this conversation as resolved.
Show resolved Hide resolved

// 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