mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-11 17:55:42 +00:00
Create container name after dropped ":" and "@" both separately
When image has ":" after "@", kubectl create deployment fails due to invalid container name. This patch changes to create the container name after drooping ":" and "@" both separately.
This commit is contained in:
@@ -37,7 +37,7 @@ func TestDeploymentBasicGenerate(t *testing.T) {
|
||||
{
|
||||
name: "deployment name and images ok",
|
||||
deploymentName: "images-name-ok",
|
||||
images: []string{"nn/image1", "registry/nn/image2", "nn/image3:tag", "nn/image4@digest"},
|
||||
images: []string{"nn/image1", "registry/nn/image2", "nn/image3:tag", "nn/image4@digest", "nn/image5@sha256:digest"},
|
||||
expected: &extensionsv1beta1.Deployment{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "images-name-ok",
|
||||
@@ -58,6 +58,7 @@ func TestDeploymentBasicGenerate(t *testing.T) {
|
||||
{Name: "image2", Image: "registry/nn/image2"},
|
||||
{Name: "image3", Image: "nn/image3:tag"},
|
||||
{Name: "image4", Image: "nn/image4@digest"},
|
||||
{Name: "image5", Image: "nn/image5@sha256:digest"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user