Skip to content
Draft
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions config/300-crds/300-pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ spec:
hostNetwork:
description: HostNetwork specifies whether the pod may use the node network namespace
type: boolean
hostUsers:
type: boolean
imagePullSecrets:
description: ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
type: array
Expand Down Expand Up @@ -1146,6 +1148,8 @@ spec:
hostNetwork:
description: HostNetwork specifies whether the pod may use the node network namespace
type: boolean
hostUsers:
type: boolean
imagePullSecrets:
description: ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
type: array
Expand Down Expand Up @@ -3496,6 +3500,8 @@ spec:
hostNetwork:
description: HostNetwork specifies whether the pod may use the node network namespace
type: boolean
hostUsers:
type: boolean
imagePullSecrets:
description: ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
type: array
Expand Down Expand Up @@ -4139,6 +4145,8 @@ spec:
hostNetwork:
description: HostNetwork specifies whether the pod may use the node network namespace
type: boolean
hostUsers:
type: boolean
imagePullSecrets:
description: ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
type: array
Expand Down
4 changes: 4 additions & 0 deletions config/300-crds/300-taskrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ spec:
hostNetwork:
description: HostNetwork specifies whether the pod may use the node network namespace
type: boolean
hostUsers:
type: boolean
imagePullSecrets:
description: ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
type: array
Expand Down Expand Up @@ -2572,6 +2574,8 @@ spec:
hostNetwork:
description: HostNetwork specifies whether the pod may use the node network namespace
type: boolean
hostUsers:
type: boolean
imagePullSecrets:
description: ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified
type: array
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/pipeline/pod/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ type Template struct {
// +optional
RuntimeClassName *string `json:"runtimeClassName,omitempty" protobuf:"bytes,2,opt,name=runtimeClassName"`

HostUsers *bool `json:"hostUsers,omitempty" protobuf:"bytes,2,opt,name=hostUsers"`

// AutomountServiceAccountToken indicates whether pods running as this
// service account should have an API token automatically mounted.
// +optional
Expand Down Expand Up @@ -202,6 +204,9 @@ func MergePodTemplateWithDefault(tpl, defaultTpl *PodTemplate) *PodTemplate {
if tpl.RuntimeClassName == nil {
tpl.RuntimeClassName = defaultTpl.RuntimeClassName
}
if tpl.HostUsers == nil {
tpl.HostUsers = defaultTpl.HostUsers
}
if tpl.AutomountServiceAccountToken == nil {
tpl.AutomountServiceAccountToken = defaultTpl.AutomountServiceAccountToken
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/pipeline/pod/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pkg/apis/pipeline/v1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/apis/pipeline/v1/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
"description": "HostNetwork specifies whether the pod may use the node network namespace",
"type": "boolean"
},
"hostUsers": {
"type": "boolean"
},
"imagePullSecrets": {
"description": "ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified",
"type": "array",
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/pipeline/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/apis/pipeline/v1alpha1/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
"description": "HostNetwork specifies whether the pod may use the node network namespace",
"type": "boolean"
},
"hostUsers": {
"type": "boolean"
},
"imagePullSecrets": {
"description": "ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified",
"type": "array",
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/pipeline/v1beta1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/apis/pipeline/v1beta1/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@
"description": "HostNetwork specifies whether the pod may use the node network namespace",
"type": "boolean"
},
"hostUsers": {
"type": "boolean"
},
"imagePullSecrets": {
"description": "ImagePullSecrets gives the name of the secret used by the pod to pull the image if specified",
"type": "array",
Expand Down
1 change: 1 addition & 0 deletions pkg/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ func (b *Builder) Build(ctx context.Context, taskRun *v1.TaskRun, taskSpec v1.Ta
Affinity: podTemplate.Affinity,
SecurityContext: podTemplate.SecurityContext,
RuntimeClassName: podTemplate.RuntimeClassName,
HostUsers: podTemplate.HostUsers,
AutomountServiceAccountToken: podTemplate.AutomountServiceAccountToken,
SchedulerName: podTemplate.SchedulerName,
HostNetwork: podTemplate.HostNetwork,
Expand Down
Loading