Skip to content

Commit

Permalink
argo-controller: Add executor-image to config (#125)
Browse files Browse the repository at this point in the history
Add executor-image field in the charm's config file in order to avoid deducing it based on the tag of the container image.

Closes #115
  • Loading branch information
orfeas-k authored Aug 29, 2023
1 parent 6bc4e93 commit 3c600d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions charms/argo-controller/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ options:
Runtime executor for workflow containers. Defaults to `emissary` as it is the default in both Argo Workflows and
the upstream Kubeflow project. Cannot be `docker` on containerd, for a full list of executors, see:
https://argoproj.github.io/argo-workflows/workflow-executors/#workflow-executors
executor-image:
type: string
default: argoproj/argoexec:v3.3.8
description: |
Image to use for runtime executor. Should be updated alongside updating the rest of the charm's images.
kubelet-insecure:
type: boolean
default: false
Expand Down
5 changes: 1 addition & 4 deletions charms/argo-controller/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ def main(self, event):
self.model.unit.status = MaintenanceStatus("Setting pod spec")

# Sync the argoproj/argoexec image to the same version
metadata = yaml.safe_load(Path("metadata.yaml").read_bytes())
version = metadata["resources"]["oci-image"]["upstream-source"].split(":")[-1]
executor_image = f"argoproj/argoexec:{version}"
self.log.info(f"using executorImage {executor_image}")
executor_image = self.model.config["executor-image"]

config_map = {
"containerRuntimeExecutor": self.model.config["executor"],
Expand Down

0 comments on commit 3c600d0

Please sign in to comment.