plugin

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package plugin provides the implementation for faros dev command plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevOptions

type DevOptions struct {
	Streams genericclioptions.IOStreams

	Image               string
	Tag                 string
	HubClusterName      string
	AgentClusterName    string
	WaitForReadyTimeout time.Duration
	ChartPath           string
	AgentChartPath      string
	ChartVersion        string
	KindNetwork         string
	APIServerPort       int
	HubHTTPSPort        int
	HubHTTPPort         int
	ImagePullPolicy     string

	// WithDex enables Dex as an embedded OIDC identity provider.
	// When true, Dex is deployed into the hub kind cluster and the hub is
	// configured with the Dex issuer URL automatically.
	WithDex     bool
	DexHTTPPort int // host port for the Dex NodePort mapping (default 5554; Dex serves HTTPS on this port)

	// WithExternalKCP deploys kcp via Helm into the hub kind cluster and
	// configures the hub to use it instead of embedded kcp.
	WithExternalKCP bool
	KCPHTTPSPort    int // host port for the kcp NodePort mapping (default 7443)

	// AgentCount controls how many agent (worker) kind clusters to create.
	// Default is 1 (single agent cluster named AgentClusterName).
	// When > 1, clusters are named AgentClusterName-1, AgentClusterName-2, …
	// When 0, no agent clusters are created — useful for end users running a
	// local hub without any edges (`faros dev init --worker-count 0`).
	AgentCount int
}

DevOptions contains the options for the dev command

func NewDevOptions

func NewDevOptions(streams genericclioptions.IOStreams) *DevOptions

NewDevOptions creates a new DevOptions

func (*DevOptions) AddCmdFlags

func (o *DevOptions) AddCmdFlags(cmd *cobra.Command)

AddCmdFlags adds command line flags

func (*DevOptions) Complete

func (o *DevOptions) Complete(args []string) error

Complete completes the options

func (*DevOptions) Run

func (o *DevOptions) Run(ctx context.Context) error

Run runs the dev command

func (*DevOptions) RunDelete

func (o *DevOptions) RunDelete() error

RunDelete deletes the development environment

func (*DevOptions) RunUpdate

func (o *DevOptions) RunUpdate(ctx context.Context) error

RunUpdate upgrades the faros-hub Helm release on the existing hub kind cluster using current image / chart settings. The cluster itself is not touched; only the hub release is upgraded.

func (*DevOptions) Validate

func (o *DevOptions) Validate() error

Validate validates the options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL