Skip to content

Commit

Permalink
chore: change missing renames of KubePrism
Browse files Browse the repository at this point in the history
For siderolabs#7432

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
  • Loading branch information
DmitriyMV committed Jul 14, 2023
1 parent 5f34f5b commit 130518d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions cmd/talosctl/cmd/mgmt/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ var (
extraBootKernelArgs string
dockerDisableIPv6 bool
controlPlanePort int
apiServerBalancerPort int
kubePrismPort int
dhcpSkipHostname bool
skipBootPhaseFinishedCheck bool
networkChaos bool
Expand Down Expand Up @@ -523,9 +523,9 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
)
}

if apiServerBalancerPort > 0 {
if kubePrismPort > 0 {
genOptions = append(genOptions,
generate.WithAPIServerBalancerPort(apiServerBalancerPort),
generate.WithKubePrismPort(kubePrismPort),
)
}

Expand Down Expand Up @@ -1004,7 +1004,7 @@ func init() {
createCmd.Flags().StringVar(&extraBootKernelArgs, "extra-boot-kernel-args", "", "add extra kernel args to the initial boot from vmlinuz and initramfs (QEMU only)")
createCmd.Flags().BoolVar(&dockerDisableIPv6, "docker-disable-ipv6", false, "skip enabling IPv6 in containers (Docker only)")
createCmd.Flags().IntVar(&controlPlanePort, controlPlanePortFlag, constants.DefaultControlPlanePort, "control plane port (load balancer and local API port)")
createCmd.Flags().IntVar(&apiServerBalancerPort, kubePrismFlag, 0, "KubePrism port (defaults to 0 - disabled)")
createCmd.Flags().IntVar(&kubePrismPort, kubePrismFlag, 0, "KubePrism port (defaults to 0 - disabled)")
createCmd.Flags().BoolVar(&dhcpSkipHostname, "disable-dhcp-hostname", false, "skip announcing hostname via DHCP (QEMU only)")
createCmd.Flags().BoolVar(&skipBootPhaseFinishedCheck, "skip-boot-phase-finished-check", false, "skip waiting for node to finish boot phase")
createCmd.Flags().BoolVar(&networkChaos, "with-network-chaos", false, "enable to use network chaos parameters when creating a qemu cluster")
Expand Down
4 changes: 2 additions & 2 deletions pkg/machinery/config/generate/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ func (in *Input) init() ([]config.Document, error) {
machine.MachineFeatures.DiskQuotaSupport = pointer.To(true)
}

if in.Options.APIServerBalancerPort > 0 {
if in.Options.KubePrismPort > 0 {
machine.MachineFeatures.KubePrismSupport = &v1alpha1.KubePrism{
ServerEnabled: pointer.To(true),
ServerPort: in.Options.APIServerBalancerPort,
ServerPort: in.Options.KubePrismPort,
}
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/machinery/config/generate/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ func WithLocalAPIServerPort(port int) Option {
}
}

// WithAPIServerBalancerPort specifies the local API server load balancer port. If 0, lod balancer is disabled.
func WithAPIServerBalancerPort(port int) Option {
// WithKubePrismPort specifies the KubePrism port. If 0, lod balancer is disabled.
func WithKubePrismPort(port int) Option {
return func(o *Options) error {
o.APIServerBalancerPort = port
o.KubePrismPort = port

return nil
}
Expand Down Expand Up @@ -295,7 +295,7 @@ type Options struct {
AdditionalSubjectAltNames []string
DiscoveryEnabled *bool

APIServerBalancerPort int
KubePrismPort int

// Client options.
Roles role.Set
Expand Down
4 changes: 2 additions & 2 deletions pkg/machinery/config/generate/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ func (in *Input) worker() ([]config.Document, error) {
machine.MachineFeatures.DiskQuotaSupport = pointer.To(true)
}

if in.Options.APIServerBalancerPort > 0 {
if in.Options.KubePrismPort > 0 {
machine.MachineFeatures.KubePrismSupport = &v1alpha1.KubePrism{
ServerEnabled: pointer.To(true),
ServerPort: in.Options.APIServerBalancerPort,
ServerPort: in.Options.KubePrismPort,
}
}

Expand Down

0 comments on commit 130518d

Please sign in to comment.