From afe2f47466aa106e2cc7b4a0924fbfcabac44a29 Mon Sep 17 00:00:00 2001 From: Francesco Cheinasso Date: Mon, 11 Sep 2023 11:05:45 +0200 Subject: [PATCH] CRDs helm subchart --- Makefile | 2 +- deployments/liqo/Chart.yaml | 8 ++----- deployments/liqo/charts/liqo-crds/.helmignore | 23 +++++++++++++++++++ deployments/liqo/charts/liqo-crds/Chart.yaml | 18 +++++++++++++++ .../discovery.liqo.io_foreignclusters.yaml | 0 .../discovery.liqo.io_resourcerequests.yaml | 0 .../liqo-crds}/crds/ipam.liqo.io_ips.yaml | 0 .../crds/ipam.liqo.io_networks.yaml | 0 .../crds/net.liqo.io_ipamstorages.yaml | 0 .../crds/net.liqo.io_natmappings.yaml | 0 .../crds/net.liqo.io_networkconfigs.yaml | 0 .../crds/net.liqo.io_tunnelendpoints.yaml | 0 .../networking.liqo.io_configurations.yaml | 0 .../crds/networking.liqo.io_connections.yaml | 0 ...orking.liqo.io_firewallconfigurations.yaml | 0 .../networking.liqo.io_gatewayclients.yaml | 0 .../networking.liqo.io_gatewayservers.yaml | 0 .../crds/networking.liqo.io_publickeys.yaml | 0 .../networking.liqo.io_wggatewayclients.yaml | 0 ...king.liqo.io_wggatewayclienttemplates.yaml | 0 .../networking.liqo.io_wggatewayservers.yaml | 0 ...king.liqo.io_wggatewayservertemplates.yaml | 0 ...floading.liqo.io_namespaceoffloadings.yaml | 0 .../crds/sharing.liqo.io_resourceoffers.yaml | 0 .../virtualkubelet.liqo.io_namespacemaps.yaml | 0 ...lkubelet.liqo.io_shadowendpointslices.yaml | 0 .../virtualkubelet.liqo.io_shadowpods.yaml | 0 .../virtualkubelet.liqo.io_virtualnodes.yaml | 0 pkg/liqoctl/uninstall/handler.go | 4 ++++ 29 files changed, 48 insertions(+), 7 deletions(-) create mode 100644 deployments/liqo/charts/liqo-crds/.helmignore create mode 100644 deployments/liqo/charts/liqo-crds/Chart.yaml rename deployments/liqo/{ => charts/liqo-crds}/crds/discovery.liqo.io_foreignclusters.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/discovery.liqo.io_resourcerequests.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/ipam.liqo.io_ips.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/ipam.liqo.io_networks.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/net.liqo.io_ipamstorages.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/net.liqo.io_natmappings.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/net.liqo.io_networkconfigs.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/net.liqo.io_tunnelendpoints.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_configurations.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_connections.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_firewallconfigurations.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_gatewayclients.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_gatewayservers.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_publickeys.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_wggatewayclients.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_wggatewayclienttemplates.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_wggatewayservers.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/networking.liqo.io_wggatewayservertemplates.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/offloading.liqo.io_namespaceoffloadings.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/sharing.liqo.io_resourceoffers.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/virtualkubelet.liqo.io_namespacemaps.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/virtualkubelet.liqo.io_shadowendpointslices.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/virtualkubelet.liqo.io_shadowpods.yaml (100%) rename deployments/liqo/{ => charts/liqo-crds}/crds/virtualkubelet.liqo.io_virtualnodes.yaml (100%) diff --git a/Makefile b/Makefile index f421868704..9a7a4cca73 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ purge: manifests ctl # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen rm -f deployments/liqo/crds/* - $(CONTROLLER_GEN) paths="./apis/..." crd:generateEmbeddedObjectMeta=true output:crd:artifacts:config=deployments/liqo/crds + $(CONTROLLER_GEN) paths="./apis/..." crd:generateEmbeddedObjectMeta=true output:crd:artifacts:config=deployments/liqo/charts/liqo-crds/crds #Generate RBAC for each controller rbacs: controller-gen diff --git a/deployments/liqo/Chart.yaml b/deployments/liqo/Chart.yaml index ec29bab0ca..07bdfb5f71 100644 --- a/deployments/liqo/Chart.yaml +++ b/deployments/liqo/Chart.yaml @@ -14,9 +14,5 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: "0.1" - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -# AppVersion is commented by default. Uncomment it or add it as extra-args to helm package if you want to release a new Liqo version -# appVersion: +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 diff --git a/deployments/liqo/charts/liqo-crds/.helmignore b/deployments/liqo/charts/liqo-crds/.helmignore new file mode 100644 index 0000000000..0e8a0eb36f --- /dev/null +++ b/deployments/liqo/charts/liqo-crds/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/deployments/liqo/charts/liqo-crds/Chart.yaml b/deployments/liqo/charts/liqo-crds/Chart.yaml new file mode 100644 index 0000000000..dfea5fd4c1 --- /dev/null +++ b/deployments/liqo/charts/liqo-crds/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v2 +name: liqo-crds +description: A Helm chart for Liqo, contains the CRDs + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 diff --git a/deployments/liqo/crds/discovery.liqo.io_foreignclusters.yaml b/deployments/liqo/charts/liqo-crds/crds/discovery.liqo.io_foreignclusters.yaml similarity index 100% rename from deployments/liqo/crds/discovery.liqo.io_foreignclusters.yaml rename to deployments/liqo/charts/liqo-crds/crds/discovery.liqo.io_foreignclusters.yaml diff --git a/deployments/liqo/crds/discovery.liqo.io_resourcerequests.yaml b/deployments/liqo/charts/liqo-crds/crds/discovery.liqo.io_resourcerequests.yaml similarity index 100% rename from deployments/liqo/crds/discovery.liqo.io_resourcerequests.yaml rename to deployments/liqo/charts/liqo-crds/crds/discovery.liqo.io_resourcerequests.yaml diff --git a/deployments/liqo/crds/ipam.liqo.io_ips.yaml b/deployments/liqo/charts/liqo-crds/crds/ipam.liqo.io_ips.yaml similarity index 100% rename from deployments/liqo/crds/ipam.liqo.io_ips.yaml rename to deployments/liqo/charts/liqo-crds/crds/ipam.liqo.io_ips.yaml diff --git a/deployments/liqo/crds/ipam.liqo.io_networks.yaml b/deployments/liqo/charts/liqo-crds/crds/ipam.liqo.io_networks.yaml similarity index 100% rename from deployments/liqo/crds/ipam.liqo.io_networks.yaml rename to deployments/liqo/charts/liqo-crds/crds/ipam.liqo.io_networks.yaml diff --git a/deployments/liqo/crds/net.liqo.io_ipamstorages.yaml b/deployments/liqo/charts/liqo-crds/crds/net.liqo.io_ipamstorages.yaml similarity index 100% rename from deployments/liqo/crds/net.liqo.io_ipamstorages.yaml rename to deployments/liqo/charts/liqo-crds/crds/net.liqo.io_ipamstorages.yaml diff --git a/deployments/liqo/crds/net.liqo.io_natmappings.yaml b/deployments/liqo/charts/liqo-crds/crds/net.liqo.io_natmappings.yaml similarity index 100% rename from deployments/liqo/crds/net.liqo.io_natmappings.yaml rename to deployments/liqo/charts/liqo-crds/crds/net.liqo.io_natmappings.yaml diff --git a/deployments/liqo/crds/net.liqo.io_networkconfigs.yaml b/deployments/liqo/charts/liqo-crds/crds/net.liqo.io_networkconfigs.yaml similarity index 100% rename from deployments/liqo/crds/net.liqo.io_networkconfigs.yaml rename to deployments/liqo/charts/liqo-crds/crds/net.liqo.io_networkconfigs.yaml diff --git a/deployments/liqo/crds/net.liqo.io_tunnelendpoints.yaml b/deployments/liqo/charts/liqo-crds/crds/net.liqo.io_tunnelendpoints.yaml similarity index 100% rename from deployments/liqo/crds/net.liqo.io_tunnelendpoints.yaml rename to deployments/liqo/charts/liqo-crds/crds/net.liqo.io_tunnelendpoints.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_configurations.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_configurations.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_configurations.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_configurations.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_connections.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_connections.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_connections.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_connections.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_firewallconfigurations.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_firewallconfigurations.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_firewallconfigurations.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_firewallconfigurations.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_gatewayclients.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_gatewayclients.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_gatewayclients.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_gatewayclients.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_gatewayservers.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_gatewayservers.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_gatewayservers.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_gatewayservers.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_publickeys.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_publickeys.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_publickeys.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_publickeys.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_wggatewayclients.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayclients.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_wggatewayclients.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayclients.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_wggatewayclienttemplates.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayclienttemplates.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_wggatewayclienttemplates.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayclienttemplates.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_wggatewayservers.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayservers.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_wggatewayservers.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayservers.yaml diff --git a/deployments/liqo/crds/networking.liqo.io_wggatewayservertemplates.yaml b/deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayservertemplates.yaml similarity index 100% rename from deployments/liqo/crds/networking.liqo.io_wggatewayservertemplates.yaml rename to deployments/liqo/charts/liqo-crds/crds/networking.liqo.io_wggatewayservertemplates.yaml diff --git a/deployments/liqo/crds/offloading.liqo.io_namespaceoffloadings.yaml b/deployments/liqo/charts/liqo-crds/crds/offloading.liqo.io_namespaceoffloadings.yaml similarity index 100% rename from deployments/liqo/crds/offloading.liqo.io_namespaceoffloadings.yaml rename to deployments/liqo/charts/liqo-crds/crds/offloading.liqo.io_namespaceoffloadings.yaml diff --git a/deployments/liqo/crds/sharing.liqo.io_resourceoffers.yaml b/deployments/liqo/charts/liqo-crds/crds/sharing.liqo.io_resourceoffers.yaml similarity index 100% rename from deployments/liqo/crds/sharing.liqo.io_resourceoffers.yaml rename to deployments/liqo/charts/liqo-crds/crds/sharing.liqo.io_resourceoffers.yaml diff --git a/deployments/liqo/crds/virtualkubelet.liqo.io_namespacemaps.yaml b/deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_namespacemaps.yaml similarity index 100% rename from deployments/liqo/crds/virtualkubelet.liqo.io_namespacemaps.yaml rename to deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_namespacemaps.yaml diff --git a/deployments/liqo/crds/virtualkubelet.liqo.io_shadowendpointslices.yaml b/deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_shadowendpointslices.yaml similarity index 100% rename from deployments/liqo/crds/virtualkubelet.liqo.io_shadowendpointslices.yaml rename to deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_shadowendpointslices.yaml diff --git a/deployments/liqo/crds/virtualkubelet.liqo.io_shadowpods.yaml b/deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_shadowpods.yaml similarity index 100% rename from deployments/liqo/crds/virtualkubelet.liqo.io_shadowpods.yaml rename to deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_shadowpods.yaml diff --git a/deployments/liqo/crds/virtualkubelet.liqo.io_virtualnodes.yaml b/deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_virtualnodes.yaml similarity index 100% rename from deployments/liqo/crds/virtualkubelet.liqo.io_virtualnodes.yaml rename to deployments/liqo/charts/liqo-crds/crds/virtualkubelet.liqo.io_virtualnodes.yaml diff --git a/pkg/liqoctl/uninstall/handler.go b/pkg/liqoctl/uninstall/handler.go index 14488ecc12..c506147cbd 100644 --- a/pkg/liqoctl/uninstall/handler.go +++ b/pkg/liqoctl/uninstall/handler.go @@ -32,7 +32,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" discoveryv1alpha1 "github.com/liqotech/liqo/apis/discovery/v1alpha1" + ipamv1alpha1 "github.com/liqotech/liqo/apis/ipam/v1alpha1" netv1alpha1 "github.com/liqotech/liqo/apis/net/v1alpha1" + networkingv1alpha1 "github.com/liqotech/liqo/apis/networking/v1alpha1" offv1alpha1 "github.com/liqotech/liqo/apis/offloading/v1alpha1" sharingv1alpha1 "github.com/liqotech/liqo/apis/sharing/v1alpha1" virtualKubeletv1alpha1 "github.com/liqotech/liqo/apis/virtualkubelet/v1alpha1" @@ -49,6 +51,8 @@ var liqoGroupVersions = []schema.GroupVersion{ offv1alpha1.GroupVersion, sharingv1alpha1.GroupVersion, virtualKubeletv1alpha1.SchemeGroupVersion, + networkingv1alpha1.GroupVersion, + ipamv1alpha1.GroupVersion, } // Options encapsulates the arguments of the uninstall command.