Svc name must consist of lower case alphanumeric characters

This commit is contained in:
Laszlo Fogas
2019-05-28 11:36:27 +02:00
parent afb7dfde76
commit e6846228a7
2 changed files with 2 additions and 2 deletions

View File

@@ -24,7 +24,7 @@ func Service(namespace, name, podName string, ports []string) (*v1.Service, erro
return &v1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: dnsName(name),
Name: dnsName("dr-" + name),
Namespace: namespace,
},
Spec: v1.ServiceSpec{

View File

@@ -11,7 +11,7 @@ func TestService(t *testing.T) {
expected := `
{
"metadata": {
"name": "bar",
"name": "dr-bar",
"namespace": "foo",
"creationTimestamp": null
},