Skip to content

Commit

Permalink
fix: set keyFormat in controller ConfigMap (#208)
Browse files Browse the repository at this point in the history
* fix: set keyFormat in controller ConfigMap
  • Loading branch information
NohaIhab committed Dec 2, 2024
1 parent e9eca39 commit 9e5dde6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charms/argo-controller/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

from components.pebble_component import (
ARGO_CONTROLLER_CONFIGMAP,
ARGO_KEYFORMAT,
METRICS_PORT,
ArgoControllerPebbleService,
)
Expand Down Expand Up @@ -154,6 +155,7 @@ def _context_callable(self):
f"{self.object_storage_relation.component.get_data()['port']}"
),
"kubelet_insecure": self.model.config["kubelet-insecure"],
"key_format": ARGO_KEYFORMAT,
}


Expand Down
7 changes: 7 additions & 0 deletions charms/argo-controller/src/components/pebble_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
logger = logging.getLogger(__name__)

ARGO_CONTROLLER_CONFIGMAP = "argo-workflow-controller-configmap"
ARGO_KEYFORMAT = (
"artifacts/{{workflow.name}}/"
"{{workflow.creationTimestamp.Y}}/"
"{{workflow.creationTimestamp.m}}/"
"{{workflow.creationTimestamp.d}}/"
"{{pod.name}}"
)
EXECUTOR_IMAGE_CONFIG_NAME = "executor-image"
LIVENESS_PROBE_PORT = "6060"
METRICS_PORT = "9090"
Expand Down
2 changes: 2 additions & 0 deletions charms/argo-controller/src/templates/minio_configmap.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ data:
s3:
endpoint: {{ s3_minio_endpoint }}
bucket: {{ s3_bucket }}
# keyFormat defines how artifacts will be organized in a bucket.
keyFormat: {{ key_format }}
# insecure will disable TLS. Primarily used for minio installs not configured with TLS
insecure: {{ kubelet_insecure }}
accessKeySecret:
Expand Down

0 comments on commit 9e5dde6

Please sign in to comment.