Skip to content

Commit

Permalink
fix: remove creation of mlpipeline_minio_artifact secret
Browse files Browse the repository at this point in the history
This secret should be created and managed by the kfp-profile-controller
and not by the argo-controller operator.
  • Loading branch information
DnPlas committed Oct 4, 2023
1 parent 8b3e336 commit 424ac64
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
10 changes: 1 addition & 9 deletions charms/argo-controller/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"""

import logging
from base64 import b64encode

import lightkube
from charmed_kubeflow_chisme.components import SdiRelationDataReceiverComponent
Expand Down Expand Up @@ -43,7 +42,6 @@
"src/templates/auth_manifests.yaml.j2",
"src/templates/crds.yaml",
"src/templates/minio_configmap.yaml.j2",
"src/templates/mlpipeline_minio_artifact_secret.yaml.j2",
]
METRICS_PATH = "/metrics"

Expand Down Expand Up @@ -149,13 +147,7 @@ def _context_callable(self):
return lambda: {
"app_name": self.app.name,
"namespace": self.model.name,
"access_key": b64encode(
self.object_storage_relation.component.get_data()["access-key"].encode("utf-8")
).decode("utf-8"),
"secret_key": b64encode(
self.object_storage_relation.component.get_data()["secret-key"].encode("utf-8")
).decode("utf-8"),
"mlpipeline_minio_artifact_secret": "mlpipeline-minio-artifact-secret",
"mlpipeline_minio_artifact_secret": "mlpipeline-minio-artifact",
"argo_controller_configmap": ARGO_CONTROLLER_CONFIGMAP,
"s3_bucket": self.model.config["bucket"],
"s3_minio_endpoint": (
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion charms/argo-controller/tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_kubernetes_created_method(

# Assert
# FIXME: why is it counting 50?
assert mocked_lightkube_client.apply.call_count == 50
assert mocked_lightkube_client.apply.call_count == 48
assert isinstance(harness.charm.kubernetes_resources.status, ActiveStatus)


Expand Down

0 comments on commit 424ac64

Please sign in to comment.