Skip to content
This repository has been archived by the owner on Jun 23, 2020. It is now read-only.

Commit

Permalink
update imagePullSecrets
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed Jan 11, 2019
1 parent 6576d4b commit 32a76e0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion engine/kube/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ func toPod(spec *engine.Spec, step *engine.Step) *v1.Pod {
mounts = append(mounts, toVolumeMounts(spec, step)...)
mounts = append(mounts, toConfigMounts(spec, step)...)

var pullSecrets []v1.LocalObjectReference
if len(spec.Docker.Auths) > 0 {
pullSecrets = []v1.LocalObjectReference{{
Name: "docker-auth-config", // TODO move name to a const
}}
}

return &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: step.Metadata.UID,
Expand All @@ -263,7 +270,8 @@ func toPod(spec *engine.Spec, step *engine.Step) *v1.Pod {
Ports: toPorts(step),
Resources: toResources(step),
}},
Volumes: volumes,
ImagePullSecrets: pullSecrets,
Volumes: volumes,
},
}
}
Expand Down

0 comments on commit 32a76e0

Please sign in to comment.