Compare commits
3 Commits
d069baa8ce
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5dea87e410 | |||
| ced35dad67 | |||
| 3889f20250 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,3 +22,4 @@
|
|||||||
go.work
|
go.work
|
||||||
|
|
||||||
argo_workflows/*
|
argo_workflows/*
|
||||||
|
env.env
|
||||||
2
Makefile
2
Makefile
@@ -12,7 +12,7 @@ clean:
|
|||||||
rm -rf oc-monitord
|
rm -rf oc-monitord
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
DOCKER_BUILDKIT=1 docker build -t oc-monitord: -f Dockerfile .
|
DOCKER_BUILDKIT=1 docker build -t oc-monitord -f Dockerfile .
|
||||||
docker tag oc-monitord oc/oc-monitord:0.0.1
|
docker tag oc-monitord oc/oc-monitord:0.0.1
|
||||||
|
|
||||||
publish-kind:
|
publish-kind:
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ type Dag struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type TemplateMetadata struct {
|
type TemplateMetadata struct {
|
||||||
Labels map[string]string `yaml:"labels,omitempty"`
|
Labels map[string]string `yaml:"labels,omitempty"`
|
||||||
Annotations map[string]string `yaml:"annotations,omitempty"`
|
Annotations map[string]string `yaml:"annotations,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,10 +143,10 @@ func (template *Template) ReplacePerEnv(arg string, envs []models.Param) string
|
|||||||
|
|
||||||
// Add the metadata that allow Admiralty to pick up an Argo Workflow that needs to be reparted
|
// Add the metadata that allow Admiralty to pick up an Argo Workflow that needs to be reparted
|
||||||
// The value of "clustername" is the peerId, which must be replaced by the node name's for this specific execution
|
// The value of "clustername" is the peerId, which must be replaced by the node name's for this specific execution
|
||||||
func (t *Template) AddAdmiraltyAnnotations(peerId string){
|
func (t *Template) AddAdmiraltyAnnotations(peerId string) {
|
||||||
if t.Metadata.Annotations == nil {
|
if t.Metadata.Annotations == nil {
|
||||||
t.Metadata.Annotations = make(map[string]string)
|
t.Metadata.Annotations = make(map[string]string)
|
||||||
}
|
}
|
||||||
t.Metadata.Annotations["multicluster.admiralty.io/elect"] = ""
|
t.Metadata.Annotations["multicluster.admiralty.io/elect"] = ""
|
||||||
t.Metadata.Annotations["multicluster.admiralty.io/clustername"] = peerId
|
t.Metadata.Annotations["multicluster.admiralty.io/clustername"] = peerId
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user