fix: service and ingress names
for app names with leading digits.
Prefixed with `i-` and `s-` strings to hide such.
@@ -250,7 +250,7 @@ func newAppDeployment(stageID string, deployParams deployParam) (*appsv1.Deploym
func newAppService(app models.AppRef) (*v1.Service, error) {
serviceData := v1.Service{
ObjectMeta: metav1.ObjectMeta{
- Name: app.Name,
+ Name: "s-" + app.Name,
Namespace: app.Org,
Annotations: map[string]string{
"kubernetes.io/ingress.class": "traefik",
@@ -288,7 +288,7 @@ func newAppIngress(appRef models.AppRef, route string) (*networkingv1.Ingress, e
ingressData := networkingv1.Ingress{
ObjectMeta: metav1.ObjectMeta{
- Name: appRef.Name,
+ Name: "i-" + appRef.Name,
Annotations: map[string]string{
"traefik.ingress.kubernetes.io/router.entrypoints": "websecure",
"traefik.ingress.kubernetes.io/router.tls": "true",
@@ -311,7 +311,7 @@ func newAppIngress(appRef models.AppRef, route string) (*networkingv1.Ingress, e
{
Backend: networkingv1.IngressBackend{
Service: &networkingv1.IngressServiceBackend{
- Name: appRef.Name,
+ Name: "s-" + appRef.Name,
Port: networkingv1.ServiceBackendPort{
Number: 8080,
},
