Adapted some of the steps of the executeInside()'s method to work with the updated Admiralty environment, using execution id as namespace, serviceAccount naming convention and adding the serviceAccount in the workflow's YAML. Logging not working yet.

This commit is contained in:
pb
2025-04-14 18:20:49 +02:00
parent 9aefa18ea8
commit e2ceb6e58d
5 changed files with 28 additions and 13 deletions

View File

@@ -52,6 +52,7 @@ func NewKubernetesTool() (Tool, error) {
if err != nil {
return nil, errors.New("Error creating Kubernetes versionned client: " + err.Error())
}
return &KubernetesTools{
Set: clientset,
VersionedSet: clientset2,
@@ -149,7 +150,7 @@ func (k *KubernetesTools) CreateArgoWorkflow(path string, ns string) (string, er
if err != nil {
return "", errors.New("failed to create workflow: " + err.Error())
}
fmt.Printf("workflow %s created in namespace %s\n", createdWf.Name, "argo")
fmt.Printf("workflow %s created in namespace %s\n", createdWf.Name, ns)
return createdWf.Name, nil
}