diff --git a/internal/resources/relay_server.go b/internal/resources/relay_server.go index d17f1e5a..9e4c586e 100644 --- a/internal/resources/relay_server.go +++ b/internal/resources/relay_server.go @@ -108,8 +108,8 @@ func GetRelayServerIngress(relayserver *robotv1alpha1.RelayServer, ingressNamesp secretName := relayserver.Spec.TLSSecretReference.Name annotations := map[string]string{ - internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), - internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), + internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstance, rootDNSConfig.Host), + internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstance, rootDNSConfig.Host), internal.INGRESS_AUTH_RESPONSE_HEADERS_KEY: internal.INGRESS_AUTH_RESPONSE_HEADERS_VAL, internal.INGRESS_CONFIGURATION_SNIPPET_KEY: internal.INGRESS_IDE_CONFIGURATION_SNIPPET_VAL, internal.INGRESS_CERT_MANAGER_KEY: internal.INGRESS_CERT_MANAGER_VAL, @@ -125,14 +125,14 @@ func GetRelayServerIngress(relayserver *robotv1alpha1.RelayServer, ingressNamesp TLS: []networkingv1.IngressTLS{ { Hosts: []string{ - tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + tenancy.CloudInstance + "." + rootDNSConfig.Host, }, SecretName: secretName, }, }, Rules: []networkingv1.IngressRule{ { - Host: tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + Host: tenancy.CloudInstance + "." + rootDNSConfig.Host, IngressRuleValue: networkingv1.IngressRuleValue{ HTTP: &networkingv1.HTTPIngressRuleValue{ Paths: []networkingv1.HTTPIngressPath{ diff --git a/internal/resources/robot_ide.go b/internal/resources/robot_ide.go index 270355bd..fd1c0be7 100644 --- a/internal/resources/robot_ide.go +++ b/internal/resources/robot_ide.go @@ -174,8 +174,8 @@ func GetRobotIDEIngress(robotIDE *robotv1alpha1.RobotIDE, ingressNamespacedName secretName := robot.Spec.TLSSecretReference.Name annotations := map[string]string{ - internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), - internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), + internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstance, rootDNSConfig.Host), + internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstance, rootDNSConfig.Host), internal.INGRESS_AUTH_RESPONSE_HEADERS_KEY: internal.INGRESS_AUTH_RESPONSE_HEADERS_VAL, internal.INGRESS_CONFIGURATION_SNIPPET_KEY: internal.INGRESS_IDE_CONFIGURATION_SNIPPET_VAL, internal.INGRESS_CERT_MANAGER_KEY: internal.INGRESS_CERT_MANAGER_VAL, @@ -191,14 +191,14 @@ func GetRobotIDEIngress(robotIDE *robotv1alpha1.RobotIDE, ingressNamespacedName TLS: []networkingv1.IngressTLS{ { Hosts: []string{ - tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + tenancy.CloudInstance + "." + rootDNSConfig.Host, }, SecretName: secretName, }, }, Rules: []networkingv1.IngressRule{ { - Host: tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + Host: tenancy.CloudInstance + "." + rootDNSConfig.Host, IngressRuleValue: networkingv1.IngressRuleValue{ HTTP: &networkingv1.HTTPIngressRuleValue{ Paths: []networkingv1.HTTPIngressPath{ @@ -307,8 +307,8 @@ func GetRobotIDECustomIngress(robotIDE *robotv1alpha1.RobotIDE, ingressNamespace secretName := robot.Spec.TLSSecretReference.Name annotations := map[string]string{ - internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), - internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), + internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstance, rootDNSConfig.Host), + internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstance, rootDNSConfig.Host), internal.INGRESS_AUTH_RESPONSE_HEADERS_KEY: internal.INGRESS_AUTH_RESPONSE_HEADERS_VAL, internal.INGRESS_CONFIGURATION_SNIPPET_KEY: internal.INGRESS_IDE_CONFIGURATION_SNIPPET_VAL, internal.INGRESS_CERT_MANAGER_KEY: internal.INGRESS_CERT_MANAGER_VAL, @@ -349,14 +349,14 @@ func GetRobotIDECustomIngress(robotIDE *robotv1alpha1.RobotIDE, ingressNamespace TLS: []networkingv1.IngressTLS{ { Hosts: []string{ - tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + tenancy.CloudInstance + "." + rootDNSConfig.Host, }, SecretName: secretName, }, }, Rules: []networkingv1.IngressRule{ { - Host: tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + Host: tenancy.CloudInstance + "." + rootDNSConfig.Host, IngressRuleValue: networkingv1.IngressRuleValue{ HTTP: &networkingv1.HTTPIngressRuleValue{ Paths: ingressPaths, diff --git a/internal/resources/robot_vdi.go b/internal/resources/robot_vdi.go index 6d39a8d5..74c3dccc 100644 --- a/internal/resources/robot_vdi.go +++ b/internal/resources/robot_vdi.go @@ -270,8 +270,8 @@ func GetRobotVDIIngress(robotVDI *robotv1alpha1.RobotVDI, ingressNamespacedName secretName := robot.Spec.TLSSecretReference.Name annotations := map[string]string{ - internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), - internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), + internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstance, rootDNSConfig.Host), + internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstance, rootDNSConfig.Host), internal.INGRESS_AUTH_RESPONSE_HEADERS_KEY: internal.INGRESS_AUTH_RESPONSE_HEADERS_VAL, internal.INGRESS_CONFIGURATION_SNIPPET_KEY: internal.INGRESS_VDI_CONFIGURATION_SNIPPET_VAL, internal.INGRESS_CERT_MANAGER_KEY: internal.INGRESS_CERT_MANAGER_VAL, @@ -288,14 +288,14 @@ func GetRobotVDIIngress(robotVDI *robotv1alpha1.RobotVDI, ingressNamespacedName TLS: []networkingv1.IngressTLS{ { Hosts: []string{ - tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + tenancy.CloudInstance + "." + rootDNSConfig.Host, }, SecretName: secretName, }, }, Rules: []networkingv1.IngressRule{ { - Host: tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + Host: tenancy.CloudInstance + "." + rootDNSConfig.Host, IngressRuleValue: networkingv1.IngressRuleValue{ HTTP: &networkingv1.HTTPIngressRuleValue{ Paths: []networkingv1.HTTPIngressPath{ @@ -392,8 +392,8 @@ func GetRobotVDICustomIngress(robotVDI *robotv1alpha1.RobotVDI, ingressNamespace secretName := robot.Spec.TLSSecretReference.Name annotations := map[string]string{ - internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), - internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), + internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstance, rootDNSConfig.Host), + internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstance, rootDNSConfig.Host), internal.INGRESS_AUTH_RESPONSE_HEADERS_KEY: internal.INGRESS_AUTH_RESPONSE_HEADERS_VAL, internal.INGRESS_CONFIGURATION_SNIPPET_KEY: internal.INGRESS_IDE_CONFIGURATION_SNIPPET_VAL, internal.INGRESS_CERT_MANAGER_KEY: internal.INGRESS_CERT_MANAGER_VAL, @@ -434,14 +434,14 @@ func GetRobotVDICustomIngress(robotVDI *robotv1alpha1.RobotVDI, ingressNamespace TLS: []networkingv1.IngressTLS{ { Hosts: []string{ - tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + tenancy.CloudInstance + "." + rootDNSConfig.Host, }, SecretName: secretName, }, }, Rules: []networkingv1.IngressRule{ { - Host: tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + Host: tenancy.CloudInstance + "." + rootDNSConfig.Host, IngressRuleValue: networkingv1.IngressRuleValue{ HTTP: &networkingv1.HTTPIngressRuleValue{ Paths: ingressPaths, diff --git a/internal/resources/ros_bridge.go b/internal/resources/ros_bridge.go index 23ecaf0c..4c9ba424 100644 --- a/internal/resources/ros_bridge.go +++ b/internal/resources/ros_bridge.go @@ -105,8 +105,8 @@ func GetBridgeIngress(rosBridge *robotv1alpha1.ROSBridge, ingressNamespacedName secretName := robot.Spec.TLSSecretReference.Name annotations := map[string]string{ - internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), - internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstanceAlias, rootDNSConfig.Host), + internal.INGRESS_AUTH_URL_KEY: fmt.Sprintf(internal.INGRESS_AUTH_URL_VAL, tenancy.CloudInstance, rootDNSConfig.Host), + internal.INGRESS_AUTH_SIGNIN_KEY: fmt.Sprintf(internal.INGRESS_AUTH_SIGNIN_VAL, tenancy.CloudInstance, rootDNSConfig.Host), internal.INGRESS_AUTH_RESPONSE_HEADERS_KEY: internal.INGRESS_AUTH_RESPONSE_HEADERS_VAL, internal.INGRESS_CONFIGURATION_SNIPPET_KEY: internal.INGRESS_IDE_CONFIGURATION_SNIPPET_VAL, internal.INGRESS_CERT_MANAGER_KEY: internal.INGRESS_CERT_MANAGER_VAL, @@ -122,14 +122,14 @@ func GetBridgeIngress(rosBridge *robotv1alpha1.ROSBridge, ingressNamespacedName TLS: []networkingv1.IngressTLS{ { Hosts: []string{ - tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + tenancy.CloudInstance + "." + rootDNSConfig.Host, }, SecretName: secretName, }, }, Rules: []networkingv1.IngressRule{ { - Host: tenancy.CloudInstanceAlias + "." + rootDNSConfig.Host, + Host: tenancy.CloudInstance + "." + rootDNSConfig.Host, IngressRuleValue: networkingv1.IngressRuleValue{ HTTP: &networkingv1.HTTPIngressRuleValue{ Paths: []networkingv1.HTTPIngressPath{ diff --git a/pkg/api/roboscale.io/v1alpha1/shared_types.go b/pkg/api/roboscale.io/v1alpha1/shared_types.go index 559cf819..f7067aa0 100644 --- a/pkg/api/roboscale.io/v1alpha1/shared_types.go +++ b/pkg/api/roboscale.io/v1alpha1/shared_types.go @@ -75,7 +75,7 @@ type StepStatus struct { func GetRobotServiceDNSWithNodePort(robot Robot, prefix, port string) string { tenancy := label.GetTenancy(&robot) - connectionStr := tenancy.CloudInstanceAlias + "." + robot.Spec.RootDNSConfig.Host + ":" + port + connectionStr := tenancy.CloudInstance + "." + robot.Spec.RootDNSConfig.Host + ":" + port if prefix != "" { connectionStr = prefix + connectionStr @@ -86,7 +86,7 @@ func GetRobotServiceDNSWithNodePort(robot Robot, prefix, port string) string { func GetRobotServiceDNS(robot Robot, prefix, postfix string) string { tenancy := label.GetTenancy(&robot) - connectionStr := tenancy.CloudInstanceAlias + "." + robot.Spec.RootDNSConfig.Host + GetRobotServicePath(robot, postfix) + connectionStr := tenancy.CloudInstance + "." + robot.Spec.RootDNSConfig.Host + GetRobotServicePath(robot, postfix) if prefix != "" { connectionStr = prefix + connectionStr @@ -97,7 +97,7 @@ func GetRobotServiceDNS(robot Robot, prefix, postfix string) string { func GetRelayServerServiceDNS(rs RelayServer, prefix, postfix string) string { tenancy := label.GetTenancy(&rs) - connectionStr := tenancy.CloudInstanceAlias + "." + rs.Spec.RootDNSConfig.Host + GetRelayServerServicePath(rs, postfix) + connectionStr := tenancy.CloudInstance + "." + rs.Spec.RootDNSConfig.Host + GetRelayServerServicePath(rs, postfix) if prefix != "" { connectionStr = prefix + connectionStr @@ -110,7 +110,7 @@ func GetRobotServicePath(robot Robot, postfix string) string { tenancy := label.GetTenancy(&robot) connectionStr := "/" + tenancy.Team + "/" + tenancy.Region + - "/" + tenancy.CloudInstance + + "/" + tenancy.CloudInstanceAlias + "/" + robot.Namespace + "/" + robot.Name