plugin

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Overview

Package plugin provides the implementation for railgrid 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 (`railgrid dev init --worker-count 0`).
	AgentCount int

	// Providers lists the providers installed INTO the hub kind cluster from
	// their published charts (see providers.go). Empty disables.
	Providers []string
	// ProviderChartRepo is the oci:// base the provider charts are pulled
	// from, or a local railgrid checkout (providers/<name>/deploy/chart).
	ProviderChartRepo string
	// ProviderChartVersion pins every provider chart; empty resolves the
	// latest published version per provider.
	ProviderChartVersion string
	// ProviderImageTag overrides the provider image tag (default: the
	// chart's appVersion).
	ProviderImageTag string
	// EnableProviders enables every installed provider in the dev user's
	// default workspace.
	EnableProviders bool

	// WithEdge joins the hub kind cluster itself as a KubernetesCluster edge
	// named EdgeName: the railgrid-agent runs in the same cluster as the hub
	// and the edges provider (see edge.go).
	WithEdge bool
	EdgeName string

	// AppsHTTPSPort is the host port published apps are served on
	// (https://<app>.apps.127.0.0.1.sslip.io:<port>, see apps.go).
	AppsHTTPSPort 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 railgrid-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