From e4f4e4f0abbc82b9d190cc504c585b6b6c7e2b7a Mon Sep 17 00:00:00 2001 From: okozachenko Date: Mon, 29 Jun 2020 22:26:59 +0300 Subject: [PATCH] Remove unused CRDs Change-Id: I9cdda464fedc5112d9b8e31fe472a0fd03cb9adc --- .../dashboard.openstack.org_horizons.yaml | 19 ----- chart/crds/dns.openstack.org_designates.yaml | 59 --------------- chart/crds/dns.openstack.org_zones.yaml | 71 ------------------- .../orchestration.openstack.org_heats.yaml | 24 ------- openstack_operator/heat.py | 4 -- openstack_operator/horizon.py | 5 -- openstack_operator/keystone.py | 3 - 7 files changed, 185 deletions(-) delete mode 100644 chart/crds/dashboard.openstack.org_horizons.yaml delete mode 100644 chart/crds/dns.openstack.org_designates.yaml delete mode 100644 chart/crds/dns.openstack.org_zones.yaml delete mode 100644 chart/crds/orchestration.openstack.org_heats.yaml diff --git a/chart/crds/dashboard.openstack.org_horizons.yaml b/chart/crds/dashboard.openstack.org_horizons.yaml deleted file mode 100644 index 600b0fe3..00000000 --- a/chart/crds/dashboard.openstack.org_horizons.yaml +++ /dev/null @@ -1,19 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: horizons.dashboard.openstack.org -spec: - group: dashboard.openstack.org - names: - kind: Horizon - listKind: HorizonList - plural: horizons - singular: horizon - scope: Namespaced - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/chart/crds/dns.openstack.org_designates.yaml b/chart/crds/dns.openstack.org_designates.yaml deleted file mode 100644 index 4af56512..00000000 --- a/chart/crds/dns.openstack.org_designates.yaml +++ /dev/null @@ -1,59 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - creationTimestamp: null - name: designates.dns.openstack.org -spec: - group: dns.openstack.org - names: - kind: Designate - listKind: DesignateList - plural: designates - singular: designate - scope: Namespaced - validation: - openAPIV3Schema: - description: Designate is the Schema for the Designates API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: DesignateSpec defines the desired state of Designate - properties: - cloudname: - type: string - credentials: - type: string - required: - - cloudname - - credentials - type: object - status: - description: DesignateStatus defines the observed state of Designate - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/chart/crds/dns.openstack.org_zones.yaml b/chart/crds/dns.openstack.org_zones.yaml deleted file mode 100644 index 7cbe84e8..00000000 --- a/chart/crds/dns.openstack.org_zones.yaml +++ /dev/null @@ -1,71 +0,0 @@ - ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.2.5 - creationTimestamp: null - name: zones.dns.openstack.org -spec: - group: dns.openstack.org - names: - kind: Zone - listKind: ZoneList - plural: zones - singular: zone - scope: Namespaced - validation: - openAPIV3Schema: - description: Zone is the Schema for the Zones API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ZoneSpec defines the desired state of Zone - properties: - description: - type: string - domain: - type: string - email: - type: string - ttl: - type: integer - type: - type: string - required: - - domain - - email - - ttl - type: object - status: - description: ZoneStatus defines the observed state of Zone - properties: - zoneId: - type: string - required: - - zoneId - type: object - type: object - version: v1 - versions: - - name: v1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/chart/crds/orchestration.openstack.org_heats.yaml b/chart/crds/orchestration.openstack.org_heats.yaml deleted file mode 100644 index bab31818..00000000 --- a/chart/crds/orchestration.openstack.org_heats.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: heats.orchestration.openstack.org -spec: - group: orchestration.openstack.org - names: - kind: Heat - listKind: HeatList - plural: heats - singular: heat - scope: Namespaced - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/openstack_operator/heat.py b/openstack_operator/heat.py index b35d32bd..e28d6bc2 100644 --- a/openstack_operator/heat.py +++ b/openstack_operator/heat.py @@ -19,13 +19,10 @@ the appropriate deployments, an instance of Memcache, RabbitMQ and a database server for the installation. """ -import kopf from openstack_operator import utils -@kopf.on.resume('orchestration.openstack.org', 'v1alpha1', 'heats') -@kopf.on.create('orchestration.openstack.org', 'v1alpha1', 'heats') def create_or_resume(name, spec, **_): """Create and re-sync any Heat instances @@ -55,7 +52,6 @@ def create_or_resume(name, spec, **_): name=name, spec=spec) -@kopf.on.update('orchestration.openstack.org', 'v1alpha1', 'heats') def update(name, spec, **_): """Update a heat diff --git a/openstack_operator/horizon.py b/openstack_operator/horizon.py index a819d5a3..35095932 100644 --- a/openstack_operator/horizon.py +++ b/openstack_operator/horizon.py @@ -18,12 +18,10 @@ This module maintains the operator for Mcrouter, it takes care of creating the appropriate deployments, Mcrouter, pod monitors and Prometheus rules. """ -import kopf from openstack_operator import utils -@kopf.on.create('dashboard.openstack.org', 'v1alpha1', 'horizons') def create_secret(name, **_): """Create a new horizon secret""" @@ -34,8 +32,6 @@ def create_secret(name, **_): secret=utils.generate_password()) -@kopf.on.resume('dashboard.openstack.org', 'v1alpha1', 'horizons') -@kopf.on.create('dashboard.openstack.org', 'v1alpha1', 'horizons') def create_or_resume(name, spec, **_): """Create and re-sync a horizon instance @@ -62,7 +58,6 @@ def create_or_resume(name, spec, **_): name=name, spec=spec) -@kopf.on.update('dashboard.openstack.org', 'v1alpha1', 'horizons') def update(name, spec, **_): """Update a horizon diff --git a/openstack_operator/keystone.py b/openstack_operator/keystone.py index c1df3701..ff7d0cc0 100644 --- a/openstack_operator/keystone.py +++ b/openstack_operator/keystone.py @@ -86,8 +86,6 @@ def create_or_rotate_fernet(**_): create_or_rotate_fernet_repository('credential') -@kopf.on.resume('identity.openstack.org', 'v1alpha1', 'keystones') -@kopf.on.create('identity.openstack.org', 'v1alpha1', 'keystones') def create_or_resume(name, spec, **_): """Create and re-sync any Keystone instances @@ -121,7 +119,6 @@ def create_or_resume(name, spec, **_): spec=spec) -@kopf.on.update('identity.openstack.org', 'v1alpha1', 'keystones') def update(spec, **_): """Update a keystone