Skip to content

Commit

Permalink
Continue to label manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess committed Mar 1, 2025
1 parent 6d8fe47 commit 1a54ea8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/manifests_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ def adjust_container_specs(self, obj: AnyResource) -> None:

for c in obj.spec.template.spec.containers:
for idx in range(len(c.args)):
if original_dn in c.args[idx]:
if original_dn in c.args[idx] and updated_dn not in c.args[idx]:
c.args[idx] = c.args[idx].replace(original_dn, updated_dn)
if "/var/lib/kubelet" in c.args[idx]:
c.args[idx] = c.args[idx].replace("/var/lib/kubelet", kubelet_dir)
Expand Down
3 changes: 2 additions & 1 deletion src/manifests_cephfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from lightkube.codecs import AnyResource
from lightkube.resources.core_v1 import Secret
from lightkube.resources.storage_v1 import StorageClass
from ops.manifests import Addition, ConfigRegistry
from ops.manifests import Addition, ConfigRegistry, ManifestLabel
from ops.manifests.manipulations import Subtraction

from manifests_base import (
Expand Down Expand Up @@ -252,6 +252,7 @@ def __init__(self, charm: "CephCsiCharm"):
ConfigureLivenessPrometheus(
self, "Service", "csi-metrics-cephfsplugin", "cephfsplugin"
),
ManifestLabel(self),
],
)
self.charm = charm
Expand Down
5 changes: 3 additions & 2 deletions src/manifests_rbd.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from lightkube.codecs import AnyResource
from lightkube.resources.core_v1 import Secret
from lightkube.resources.storage_v1 import StorageClass
from ops.manifests import Addition, ConfigRegistry
from ops.manifests import Addition, ConfigRegistry, ManifestLabel

from manifests_base import (
AdjustNamespace,
Expand Down Expand Up @@ -134,8 +134,8 @@ def __init__(self, charm: "CephCsiCharm"):
CephStorageClass(self, "ceph-xfs"), # creates ceph-xfs
CephStorageClass(self, "ceph-ext4"), # creates ceph-ext4
RbacAdjustments(self),
AdjustNamespace(self),
CSIDriverAdjustments(self, self.DRIVER_NAME),
AdjustNamespace(self),
ConfigureLivenessPrometheus(
self, "Deployment", "csi-rbdplugin-provisioner", "rbdplugin-provisioner"
),
Expand All @@ -144,6 +144,7 @@ def __init__(self, charm: "CephCsiCharm"):
),
ConfigureLivenessPrometheus(self, "DaemonSet", "csi-rbdplugin", "rbdplugin"),
ConfigureLivenessPrometheus(self, "Service", "csi-metrics-rbdplugin", "rbdplugin"),
ManifestLabel(self),
],
)
self.charm = charm
Expand Down

0 comments on commit 1a54ea8

Please sign in to comment.