Configuring Applications
To define an application, create a Prodvana config.
application:
name: my-app # replace with your desired app name
releaseChannels:
- name: staging
runtimes:
- runtime: my-runtime
- name: production
runtimes:
- runtime: my-other-runtime # can be the same runtime as the previous step
preconditions:
- releaseChannelStable:
releaseChannel: staging
- manualApproval: {}
# add or remove release channels as needed
preconditions
control what must be true before services can deploy in that release channel. In the config above, staging must be deployed before production and a manual approval must be submitted for production.
Use pvnctl to apply this config file:
pvnctl configs apply path/to/my-app.pvn.yaml
Once applied, you can see your newly created application in my-demo-organization.prodvana.io -> Applications.
Common Examples
Using an Existing Namespace
Each release channel maps to a namespace in Kubernetes. By default, Prodvana will automatically create and use a namespace of the format pvn-{app}-rc-{release_channel}
. To use an already existing namespace instead, set the following in the release channel config as part of the runtimes section:
application:
name: my-app # replace with your desired app name
releaseChannels:
- name: staging
runtimes:
- runtime: my-runtime
containerOrchestration:
k8s:
namespace: my-existing-staging-namespace
- name: production
runtimes:
- runtime: my-other-runtime # can be same or different runtime as previous step
containerOrchestration:
k8s:
namespace: my-existing-production-namespace
preconditions:
- releaseChannelStable:
releaseChannel: staging
- manualApproval: {}
Note that if namespace is explicitly set, then you are responsible for making sure the namespace exists and for deleting it if the release channel is deleted.
Updated 16 days ago