Skip to content

Commit

Permalink
[redis] Fix import for redis chart in controller
Browse files Browse the repository at this point in the history
Remove redisfailover when its not managed by helm.

Related-Prod: PRODX-48970
Change-Id: I72ad3a4a96263d61b92522773c0046cdf343c6b7
  • Loading branch information
jumpojoy committed Jan 10, 2025
1 parent dc31609 commit 97eedb4
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions rockoon/services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,21 @@ async def apply(self, event, **kwargs):
if await helm_manager.exist("os-redis-operator"):
LOG.info(f"Purging os-redis-operator helm release")
await helm_manager.delete("os-redis-operator")
redis_failover = kube.find(
kube.RedisFailover,
"openstack-redis",
settings.OSCTL_REDIS_NAMESPACE,
silent=True,
)
if redis_failover and redis_failover.exists():
redis_failover.delete()
redis_failover = kube.find(
kube.RedisFailover,
"openstack-redis",
settings.OSCTL_REDIS_NAMESPACE,
silent=True,
)
if (
redis_failover
and redis_failover.exists()
and redis_failover.obj["metadata"]
.get("labels", {})
.get("app.kubernetes.io/managed-by")
!= "Helm"
):
redis_failover.delete()

rfs_deployment = kube.find(
kube.Deployment,
Expand Down

0 comments on commit 97eedb4

Please sign in to comment.