This topic describes how to configure an application from a developer perspective.
The connector component is responsible for discovering the application and registering it with Application Live View. The connector is deployed in the same namespace as the application. Labels are required to be added to the application PodSpec for the application to be discovered by the connector.
Below are the mandatory labels required:
tanzu.app.live.view="true"
tanzu.app.live.view.application.name="<app-name>"
Example: If the user wants to deploy a Spring boot application, below is the sample deployment yaml file with necessary labels.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: example-app
name: example-app
spec:
replicas: 1
selector:
matchLabels:
app: example-app
template:
metadata:
labels:
app: example-app
tanzu.app.live.view: "true" #Enable pod to be discovered by connector
tanzu.app.live.view.application.name: example-app #application name
spec:
containers:
- image: ${EXAMPLE_APP_IMAGE} #Application image
name: example-app
ports:
- containerPort: 8080
There are other optional fields which can be configured by the user as per their requirement.
Exclusive list of labels available are listed below:
Label Name | Mandatory | Type | Default | Significance |
---|---|---|---|---|
tanzu.app.live.view | true | Boolean | None | toggle to disable / enable pod discovery |
tanzu.app.live.view.application.name | true | String | None | application name |
tanzu.app.live.view.application.port | false | Integer | 8080 | application port |
tanzu.app.live.view.application.path | false | String | / | application context path |
tanzu.app.live.view.application.actuator.port | false | Integer | 8080 | application actuator port |
tanzu.app.live.view.application.actuator.path | false | String | /actuator | actuator context path |
tanzu.app.live.view.application.protocol | false | http / https | http | protocol scheme |
tanzu.app.live.view.application.actuator.health.port | false | Integer | 8080 | health endpoint port |
tanzu.app.live.view.application.flavours | false | comma separated string | spring-boot | application flavours |