Predefined Variables
When you deploy a Spring Boot application using the Oracle Backend for Microservices and AI CLI or Visual Code extension, a number of predefined environment variables will be injected into the pod definition. You may reference any of these variables in your application.
The predefined variables are as follows:
app.container.port, for example8080.
This sets the listen port for the pod and service. The Spring Boot application will listen on this port. The default is8080. This can be set using the--portparameter on thedeploycommand in the CLI.spring.profiles.active, for exampledefault.
This sets the Spring profiles that will be active in the application. The default value isdefault. This can be changed set the--service-profileparameter on thedeploycommand in the CLI.spring.config.label, for example0.0.1.
This is a label that can be used with Spring Config to look up externalized configuration from Spring Config Server, along with the application name and the profile.eureka.instance.preferIpAddress, for exampletrue.
This tells the Eureka discovery client to use thepreferIpAddresssetting. This is required in Kubernetes so that service discover will work correctly.eureka.instance.hostname, for examplecustomer32.application.
This sets the hostname that Eureka will use for this application.MP_LRA_COORDINATOR_URL, for examplehttp://otmm-tcs.otmm.svc.cluster.local:9000/api/v1/lra-coordinator.
This is the URL for the transaction manager which is required when using Eclipse Microprofile Long Running Actions in your application.MP_LRA_PARTICIPANT_URL, for examplehttp://customer32.application.svc.cluster.local:8080.
This is the participant URL which is required when using Eclipse Microprofile Long Running Actions in your application.eureka.client.register-with-eureka, for exampletrue.
This tells the Eureka discovery client to register with the Eureka server.eureka.client.fetch-registry, for exampletrue.
This tells the Eureka discovery client to make a local copy of the registry by fetching it from the Eureka server.eureka.client.service-url.defaultZone, for examplehttp://eureka.eureka:8761/eureka.
This is the default zone for the Eureka discovery client.OTEL_EXPORTER_OTLP_ENDPOINT, for examplehttp://obaas-signoz-otel-collector.observability:4318.
This is the URL of the OpenTelemetry (OTLP protocol) collector which can be used by your application to send observability data to the the SigNoz platform.config.server.url, for examplehttp://config-server.config-server.svc.cluster.local:8080.
This is the URL of the Spring Config Server provided by the platform.liquibase.datasource.username, for example set to the keydb.usernamein secretadmin-liquibasedb-secrets.
This sets the (admin) user that should be used to run Liquibase, if used in your service.liquibase.datasource.password, for example set to the keydb.passwordin secretadmin-liquibasedb-secrets.
This sets the (admin) user’s password that should be used to run Liquibase, if used in your service.spring.datasource.username, for example set to the keydb.usernamein secretcustomer32-db-secrets.
This sets the (regular) user for your application to use to connect to the database (if you use JPA or JDBC in your application).spring.datasource.password:, for example set to the keydb.passwordin secretcustomer32-db-secrets.
This sets the (regular) user’s password for your application to use to connect to the database (if you use JPA or JDBC in your application).DB_SERVICE, for example set to the keydb.servicein secretcustomer32-db-secrets.
This sets the database service name (the TNS name) for your application to use to connect to the database (if you use JPA or JDBC in your application).spring.datasource.url, for examplejdbc:oracle:thin:@$(DB_SERVICE)?TNS_ADMIN=/oracle/tnsadmin.
This sets the data source URL for your application to use to connect to the database (if you use JPA or JDBC in your application).CONNECT_STRING, for examplejdbc:oracle:thin:@$(DB_SERVICE)?TNS_ADMIN=/oracle/tnsadmin.
This sets the data source URL for your application to use to connect to the database (if you use JPA or JDBC in your application).