argo by kube invocation

This commit is contained in:
mr
2025-02-14 12:00:29 +01:00
parent df6e3d5a46
commit 34547e8b2f
11 changed files with 602 additions and 414 deletions

View File

@@ -60,8 +60,18 @@ type TemplateMetadata struct {
Labels map[string]string `yaml:"labels,omitempty"`
}
type Secret struct {
Name string `yaml:"name"`
Key string `yaml:"key"`
}
type Key struct {
Key string `yaml:"key"`
Key string `yaml:"key"`
Bucket string `yaml:"bucket"`
EndPoint string `yaml:"endpoint"`
Insecure bool `yaml:"insecure"`
AccessKeySecret *Secret `yaml accessKeySecret`
SecretKeySecret *Secret `yaml secretKeySecret`
}
type Artifact struct {
@@ -85,7 +95,7 @@ type Template struct {
Resource ServiceResource `yaml:"resource,omitempty"`
}
func (template *Template) CreateContainer(processing *resources.ProcessingResource, dag *Dag) {
func (template *Template) CreateContainer(processing *resources.ProcessingResource, dag *Dag, templateName string) {
instance := processing.GetSelectedInstance()
if instance == nil {
return
@@ -106,6 +116,7 @@ func (template *Template) CreateContainer(processing *resources.ProcessingResour
template.Outputs.Parameters = append(template.Inputs.Parameters, Parameter{Name: v.Name})
}
cmd := strings.ReplaceAll(inst.Access.Container.Command, container.Image, "")
container.Args = append(container.Args, "echo "+templateName+" && ") // a casual echo to know where we are for logs purpose
for _, a := range strings.Split(cmd, " ") {
container.Args = append(container.Args, template.ReplacePerEnv(a, inst.Env))
}