Skip to content

Commit

Permalink
Comment out IPAM and RuntimeExtension providers
Browse files Browse the repository at this point in the history
Currently operator doesn't support these types, but in the future
we want to add it.
  • Loading branch information
Fedosin committed Oct 27, 2023
1 parent ab68a8d commit 1c00f8d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 53 deletions.
36 changes: 18 additions & 18 deletions cmd/plugin/cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ import (
)

type deleteOptions struct {
kubeconfig string
kubeconfigContext string
coreProvider string
bootstrapProviders []string
controlPlaneProviders []string
infrastructureProviders []string
ipamProviders []string
runtimeExtensionProviders []string
addonProviders []string
includeNamespace bool
includeCRDs bool
deleteAll bool
kubeconfig string
kubeconfigContext string
coreProvider string
bootstrapProviders []string
controlPlaneProviders []string
infrastructureProviders []string
// ipamProviders []string
// runtimeExtensionProviders []string
addonProviders []string
includeNamespace bool
includeCRDs bool
deleteAll bool
}

var deleteOpts = &deleteOptions{}
Expand Down Expand Up @@ -106,10 +106,10 @@ func init() {
"Bootstrap providers and versions (e.g. kubeadm:v1.1.5) to delete from the management cluster")
deleteCmd.Flags().StringSliceVarP(&deleteOpts.controlPlaneProviders, "control-plane", "c", nil,
"ControlPlane providers and versions (e.g. kubeadm:v1.1.5) to delete from the management cluster")
deleteCmd.Flags().StringSliceVar(&deleteOpts.ipamProviders, "ipam", nil,
"IPAM providers and versions (e.g. infoblox:v0.0.1) to delete from the management cluster")
deleteCmd.Flags().StringSliceVar(&deleteOpts.runtimeExtensionProviders, "runtime-extension", nil,
"Runtime extension providers and versions (e.g. test:v0.0.1) to delete from the management cluster")
// deleteCmd.Flags().StringSliceVar(&deleteOpts.ipamProviders, "ipam", nil,
// "IPAM providers and versions (e.g. infoblox:v0.0.1) to delete from the management cluster")
// deleteCmd.Flags().StringSliceVar(&deleteOpts.runtimeExtensionProviders, "runtime-extension", nil,
// "Runtime extension providers and versions (e.g. test:v0.0.1) to delete from the management cluster")
deleteCmd.Flags().StringSliceVar(&deleteOpts.addonProviders, "addon", nil,
"Add-on providers and versions (e.g. helm:v0.1.0) to delete from the management cluster")

Expand All @@ -126,8 +126,8 @@ func runDelete() error {
(len(deleteOpts.bootstrapProviders) > 0) ||
(len(deleteOpts.controlPlaneProviders) > 0) ||
(len(deleteOpts.infrastructureProviders) > 0) ||
(len(deleteOpts.ipamProviders) > 0) ||
(len(deleteOpts.runtimeExtensionProviders) > 0) ||
// (len(deleteOpts.ipamProviders) > 0) ||
// (len(deleteOpts.runtimeExtensionProviders) > 0) ||
(len(deleteOpts.addonProviders) > 0)

if deleteOpts.deleteAll && hasProviderNames {
Expand Down
34 changes: 17 additions & 17 deletions cmd/plugin/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ import (
)

type initOptions struct {
kubeconfig string
kubeconfigContext string
coreProvider string
bootstrapProviders []string
controlPlaneProviders []string
infrastructureProviders []string
ipamProviders []string
runtimeExtensionProviders []string
addonProviders []string
targetNamespace string
validate bool
waitProviders bool
waitProviderTimeout int
kubeconfig string
kubeconfigContext string
coreProvider string
bootstrapProviders []string
controlPlaneProviders []string
infrastructureProviders []string
// ipamProviders []string
// runtimeExtensionProviders []string
addonProviders []string
targetNamespace string
validate bool
waitProviders bool
waitProviderTimeout int
}

var initOpts = &initOptions{}
Expand Down Expand Up @@ -102,10 +102,10 @@ func init() {
"Bootstrap providers and versions (e.g. kubeadm:v1.1.5) to add to the management cluster. If unspecified, Kubeadm bootstrap provider's latest release is used.")
initCmd.PersistentFlags().StringSliceVarP(&initOpts.controlPlaneProviders, "control-plane", "c", nil,
"Control plane providers and versions (e.g. kubeadm:v1.1.5) to add to the management cluster. If unspecified, the Kubeadm control plane provider's latest release is used.")
initCmd.PersistentFlags().StringSliceVar(&initOpts.ipamProviders, "ipam", nil,
"IPAM providers and versions (e.g. infoblox:v0.0.1) to add to the management cluster.")
initCmd.PersistentFlags().StringSliceVar(&initOpts.runtimeExtensionProviders, "runtime-extension", nil,
"Runtime extension providers and versions (e.g. test:v0.0.1) to add to the management cluster.")
// initCmd.PersistentFlags().StringSliceVar(&initOpts.ipamProviders, "ipam", nil,
// "IPAM providers and versions (e.g. infoblox:v0.0.1) to add to the management cluster.")
// initCmd.PersistentFlags().StringSliceVar(&initOpts.runtimeExtensionProviders, "runtime-extension", nil,
// "Runtime extension providers and versions (e.g. test:v0.0.1) to add to the management cluster.")
initCmd.PersistentFlags().StringSliceVar(&initOpts.addonProviders, "addon", nil,
"Add-on providers and versions (e.g. helm:v0.1.0) to add to the management cluster.")
initCmd.Flags().StringVarP(&initOpts.targetNamespace, "target-namespace", "n", "capi-operator-system",
Expand Down
36 changes: 18 additions & 18 deletions cmd/plugin/cmd/upgrade_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ import (
)

type upgradeApplyOptions struct {
kubeconfig string
kubeconfigContext string
contract string
coreProvider string
bootstrapProviders []string
controlPlaneProviders []string
infrastructureProviders []string
ipamProviders []string
runtimeExtensionProviders []string
addonProviders []string
waitProviders bool
waitProviderTimeout int
kubeconfig string
kubeconfigContext string
contract string
coreProvider string
bootstrapProviders []string
controlPlaneProviders []string
infrastructureProviders []string
// ipamProviders []string
// runtimeExtensionProviders []string
addonProviders []string
waitProviders bool
waitProviderTimeout int
}

var upgradeApplyOpts = &upgradeApplyOptions{}
Expand Down Expand Up @@ -80,10 +80,10 @@ func init() {
"Bootstrap providers instance and versions (e.g. kubeadm:v1.1.5) to upgrade to. This flag can be used as alternative to --contract.")
upgradeApplyCmd.Flags().StringSliceVarP(&upgradeApplyOpts.controlPlaneProviders, "control-plane", "c", nil,
"ControlPlane providers instance and versions (e.g. kubeadm:v1.1.5) to upgrade to. This flag can be used as alternative to --contract.")
upgradeApplyCmd.Flags().StringSliceVar(&upgradeApplyOpts.ipamProviders, "ipam", nil,
"IPAM providers and versions (e.g. infoblox:v0.0.1) to upgrade to. This flag can be used as alternative to --contract.")
upgradeApplyCmd.Flags().StringSliceVar(&upgradeApplyOpts.runtimeExtensionProviders, "runtime-extension", nil,
"Runtime extension providers and versions (e.g. test:v0.0.1) to upgrade to. This flag can be used as alternative to --contract.")
// upgradeApplyCmd.Flags().StringSliceVar(&upgradeApplyOpts.ipamProviders, "ipam", nil,
// "IPAM providers and versions (e.g. infoblox:v0.0.1) to upgrade to. This flag can be used as alternative to --contract.")
// upgradeApplyCmd.Flags().StringSliceVar(&upgradeApplyOpts.runtimeExtensionProviders, "runtime-extension", nil,
// "Runtime extension providers and versions (e.g. test:v0.0.1) to upgrade to. This flag can be used as alternative to --contract.")
upgradeApplyCmd.Flags().StringSliceVar(&upgradeApplyOpts.addonProviders, "addon", nil,
"Add-on providers and versions (e.g. helm:v0.1.0) to upgrade to. This flag can be used as alternative to --contract.")
upgradeApplyCmd.Flags().BoolVar(&upgradeApplyOpts.waitProviders, "wait-providers", false,
Expand All @@ -99,8 +99,8 @@ func runUpgradeApply() error {
(len(upgradeApplyOpts.bootstrapProviders) > 0) ||
(len(upgradeApplyOpts.controlPlaneProviders) > 0) ||
(len(upgradeApplyOpts.infrastructureProviders) > 0) ||
(len(upgradeApplyOpts.ipamProviders) > 0) ||
(len(upgradeApplyOpts.runtimeExtensionProviders) > 0) ||
// (len(upgradeApplyOpts.ipamProviders) > 0) ||
// (len(upgradeApplyOpts.runtimeExtensionProviders) > 0) ||
(len(upgradeApplyOpts.addonProviders) > 0)

if upgradeApplyOpts.contract == "" && !hasProviderNames {
Expand Down

0 comments on commit 1c00f8d

Please sign in to comment.