mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Fix container name on NewDeployment()
The paramter is used as a container name, not an image name in the function. To avoid confusion, this fxies the name.
This commit is contained in:
parent
00aab6312f
commit
db87fe139c
@ -38,7 +38,7 @@ func UpdateDeploymentWithRetries(c clientset.Interface, namespace, name string,
|
||||
}
|
||||
|
||||
// NewDeployment returns a deployment spec with the specified argument.
|
||||
func NewDeployment(deploymentName string, replicas int32, podLabels map[string]string, imageName, image string, strategyType appsv1.DeploymentStrategyType) *appsv1.Deployment {
|
||||
func NewDeployment(deploymentName string, replicas int32, podLabels map[string]string, containerName, image string, strategyType appsv1.DeploymentStrategyType) *appsv1.Deployment {
|
||||
zero := int64(0)
|
||||
return &appsv1.Deployment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@ -59,7 +59,7 @@ func NewDeployment(deploymentName string, replicas int32, podLabels map[string]s
|
||||
TerminationGracePeriodSeconds: &zero,
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: imageName,
|
||||
Name: containerName,
|
||||
Image: image,
|
||||
SecurityContext: &v1.SecurityContext{},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user