Expose an App Deployment
You can expose the IP address and port, or the ingress domain and path of an App Deployment by using pre-defined objectOutputRefs. By adding the pre-defined objectOutputRefs to your Workload profile you enable the ability to expose an access point through the Access Button in the App Deployment list view or in the App Deployment details page.

Predefined ObjectOutputs
Below are the two patterns for exposing either a Service's IP address and port, or an Ingress's domain and path. The patterns expect the following objectOutput names to exist:
webserverIpwebserverPortingressDomainingressPathhttpScheme
Only change the lines highlighted below. If the item name of the objectOutputRef is changed from the predefined value listed above, then PaletteAI will be unable to expose the application.
IP Address and Port
To expose a Service's IP address and port, use the following code snippet in your objectOutputRefs. Replace replace_me_with_service_name with the name of the service that your application will expose, and replace_namespace_of_service with the namespace of where your service is located.
objectOutputRefs:
- name: webserverIp
pathRef:
name: <replace_me_with_service_name>
namespace: <replace_namespace_of_service>
path: .status.loadBalancer.ingress[0].ip
apiVersion: v1
kind: Service
- name: webserverPort
pathRef:
name: <replace_me_with_service_name>
namespace: <replace_namespace_of_service>
path: .spec.ports[0].port
apiVersion: v1
kind: Service
Domain and Path
To expose an Ingress's domain and path, use the following code snippet in your objectOutputRefs. Replace replace_me_with_ingress_name with the name of the service that your application will expose, and namespace_of_ingress with the namespace of where your Ingress is located.
objectOutputRefs:
- name: ingressDomain
pathRef:
name: <replace_me_with_ingress_name>
namespace: <replace_namespace_of_service>
path: .spec.rules[0].host
apiVersion: networking.k8s.io/v1
kind: Ingress
- name: ingressPath
pathRef:
name: <replace_me_with_ingress_name>
namespace: <replace_namespace_of_service>
path: .spec.rules[0].http.paths[0].path
apiVersion: networking.k8s.io/v1
kind: Ingress
- name: httpScheme
pathRef:
name: <replace_me_with_ingress_name>
namespace: <replace_namespace_of_service>
path: .spec.tls[0].hosts[0]
apiVersion: networking.k8s.io/v1
kind: Ingress
To determine wether to expose the URL with an HTTP or HTTPS prefixes. The Ingress's spec, spec.tls.[0].hosts[0] is inspected for a TLS host entry. If an entry is found in the list, then PaletteAI will prepend https:// to the URL when a user clicks on the Access App button. Otherwise, http:// is prefixed.
Expose App
Use the following steps to expose connectivity to your application.
Prerequisites
-
Editor access or the ability to create a Workload Profile. To create a Workload Profile you must have
createfor theWorkloadProfilecustom resource definition. -
Understand the name of the Ingress or Service exposed by the Application.
-
If you are using Ingress, ensure an SSL certificate is generated for your application. Otherwise, HTTPS will be unavailable.
Add ObejctOutputs
-
Login to PaletteAI and navigate to the left Main Menu and select Workload Profile.
-
Click on Create Profile to access the profile builder wizard.
-
Add the required components and traits for your Workload Profile.
-
Next, navigate to the bottom left corner of the wizard and click on the Code Editor button. This will display the YAML of the Application profile.
-
Refer to the Predefined ObjectOutputs and add the
objectOutputRefspattern that is valid for your application. The example below is for ClearML in an Ingress scenario.objectOutputRefs:
- name: ingressDomain
pathRef:
name: clearml-webserver
namespace: '{{ .var.clearml-namespace }}'
path: .spec.rules[0].host
apiVersion: networking.k8s.io/v1
kind: Ingress
- name: ingressPath
pathRef:
name: clearml-webserver
namespace: '{{ .var.clearml-namespace }}'
path: .spec.rules[0].http.paths[0].path
apiVersion: networking.k8s.io/v1
kind: Ingress
- name: httpScheme
pathRef:
name: clearml-webserver
namespace: '{{ .var.clearml-namespace }}'
path: .spec.tls[0].hosts[0]
apiVersion: networking.k8s.io/v1
kind: Ingress -
Click on Submit to save and create the Workload profile.
Validation
Verify the Workload profile was created with the expected objectOutputRefs.
-
Login to PaletteAI and navigate to the left Main Menu and select App Profile.
-
Select the Workload profile you created and click on the three-dot Menu and select View Details.
-
Click on the Code Editor button to access the YAML editor view.
-
Verify the Ingress name or the Service name, along with the namespace is replaced with the expected value.
-
Lastly, deploy an Application with a PaletteAI Template that has the Workload profile so that you ensure the application is accessible.