Skip to content

Commit

Permalink
add image pull secret
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Lin committed Sep 1, 2018
1 parent 6233407 commit 7bcad55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ func CreateDeployment(sp *serviceprovider.Container, deploy *entity.Deployment)
Affinity: generateAffinity(nodeAffinity),
RestartPolicy: corev1.RestartPolicyAlways,
HostNetwork: hostNetwork,
ImagePullSecrets: []corev1.LocalObjectReference{
{Name: "dockerhub-token"},
},
},
},
},
Expand Down
3 changes: 3 additions & 0 deletions src/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ func CreatePod(sp *serviceprovider.Container, pod *entity.Pod) error {
Affinity: generateAffinity(nodeAffinity),
RestartPolicy: corev1.RestartPolicy(pod.RestartPolicy),
HostNetwork: hostNetwork,
ImagePullSecrets: []corev1.LocalObjectReference{
{Name: "dockerhub-token"},
},
},
}

Expand Down

0 comments on commit 7bcad55

Please sign in to comment.