Skip to content

Commit

Permalink
Drop deprecated OpenStackDeploymentSecret object
Browse files Browse the repository at this point in the history
Related-Prod: PRODX-48974
Change-Id: I91d148e91fb606cabef33cd30b747bb70da1ab4d
  • Loading branch information
jumpojoy committed Jan 13, 2025
1 parent 2cd222e commit 1b02e06
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
"openstackdeployments.lcm.mirantis.com/shared_resource_action": "delete"
# name must match the spec fields below, and be in the form: <plural>.<group>
name: openstackdeploymentsecrets.lcm.mirantis.com
spec:
Expand Down
9 changes: 0 additions & 9 deletions charts/rockoon/templates/rockoon-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,6 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.osdpl.pod.controller.convert_credentials.security_context | nindent 12 }}
- name: check-osdplsecrets
command:
- osctl-check-osdplsecrets
env:
{{ tuple . | include "rockoon.common_env" | indent 12 }}
image: {{ tuple . .Values.image | include "getImageUrl" }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
{{- toYaml .Values.osdpl.pod.controller.check_osdplsecrets.security_context | nindent 12 }}
{{ if .Values.remove_legacy_finalizer.enabled }}
- name: remove-legacy-finalizer
command:
Expand Down
33 changes: 0 additions & 33 deletions rockoon/cli/check_osdplsecret.py

This file was deleted.

5 changes: 4 additions & 1 deletion rockoon/cli/ensure_shared_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def main():
)

if action == "create":
if obj.exists():
if obj and obj.exists():
if (
document["metadata"]
.get("annotations", {})
Expand All @@ -66,3 +66,6 @@ def main():
_wait_for_obj(obj)
elif action == "wait":
_wait_for_obj(obj)
elif action == "delete":
if obj and obj.exists():
obj.delete()
18 changes: 0 additions & 18 deletions rockoon/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,24 +127,6 @@ async def wait_applied(self, timeout=600, interval=30):
LOG.info(f"{self.kind}/{self.name} is applied")


class OpenStackDeploymentSecret(pykube.objects.NamespacedAPIObject):
version = "lcm.mirantis.com/v1alpha1"
kind = "OpenStackDeploymentSecret"
endpoint = "openstackdeploymentsecrets"
kopf_on_args = *version.split("/"), endpoint

def __init__(self, name, namespace, *args, **kwargs):
self.dummy = {
"apiVersion": self.version,
"kind": self.kind,
"metadata": {"name": name, "namespace": namespace},
"spec": {},
"status": {},
}
kube_api = kube_client()
return super().__init__(kube_api, self.dummy)


class HelmBundle(pykube.objects.NamespacedAPIObject):
version = "lcm.mirantis.com/v1alpha1"
kind = "HelmBundle"
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ console_scripts =
osctl-ensure-shared-resources = rockoon.cli.ensure_shared_resources:main
osctl-move-sensitive-data = rockoon.cli.move_secret_fields:main
osctl-convert-credential-secrets = rockoon.cli.convert_credential_secrets:main
osctl-check-osdplsecrets = rockoon.cli.check_osdplsecret:main
osctl-ovs-ovn-migrate = rockoon.cli.ovs_ovn_migration:main
osctl-remove-legacy-finalizer = rockoon.cli.remove_legacy_finalizer:main
wsgi_scripts =
Expand Down

0 comments on commit 1b02e06

Please sign in to comment.