@@ -61,6 +61,10 @@ func (a *AppResource) getV1Resource(b *Build) (*types.Resource, error) {
})
}
+ if a.RunOnce != nil {
+ config.OnlyCreate = *a.RunOnce
+ }
+
rawConfig := make(map[string]any)
err := mapstructure.Decode(config, &rawConfig)
@@ -43,6 +43,7 @@ type AppResource struct {
BuildRef *string `yaml:"build_ref"`
// Deploy map[*string]*any `yaml:"deploy"`
HelmValues map[string]any `yaml:"helm_values"`
+ RunOnce *bool `yaml:"run_once"`
type AddonResource struct {
@@ -19,6 +19,7 @@ apps:
- name: setup-job
depends_on:
- postgres
+ run_once: true
helm_chart:
name: job
build_ref: job