Documentation ¶
Overview ¶
Package infra contains boilerplate code for the infra provider implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceNamespace ¶
ResourceNamespace generates the correct namespace name for the infra provider state.
func ResourceType ¶
ResourceType generates the correct resource name for the resources managed by the infra providers.
Types ¶
type Option ¶
type Option func(*Options)
Option define an additional infra provider option.
func WithClientOptions ¶
WithClientOptions defines custom options for the Omni API client.
func WithConcurrency ¶
WithConcurrency sets maximum provision concurrency on the controller.
func WithImageFactoryClient ¶
func WithImageFactoryClient(imageFactory provision.FactoryClient) Option
WithImageFactoryClient sets up the image factory client explicitly.
func WithOmniEndpoint ¶
WithOmniEndpoint sets Omni API client endpoint to use.
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options defines additional infra provider options.
type Provider ¶
type Provider[T generic.ResourceWithRD] struct { // contains filtered or unexported fields }
Provider runner.
func NewProvider ¶
func NewProvider[V any, T RD[V]]( id string, provisioner provision.Provisioner[T], config ProviderConfig, ) (*Provider[T], error)
NewProvider creates a new infra provider and registers provider state resource in the COSI state.
type ProviderConfig ¶ added in v0.45.0
type ProviderConfig struct { Name string `yaml:"name"` Description string `yaml:"description"` Icon string `yaml:"icon,omitempty"` Schema string `yaml:"schema"` }
ProviderConfig defines the schema, human readable provider name and description.
func ParseProviderConfig ¶ added in v0.45.0
func ParseProviderConfig(data []byte) (ProviderConfig, error)
ParseProviderConfig loads provider config from the yaml data.
type RD ¶
type RD[V any] interface { generic.ResourceWithRD protobuf.ResourceUnmarshaler *V }
RD defines contract for the resource definition.
Directories ¶
Path | Synopsis |
---|---|
Package controllers implements common controllers for the infra providers.
|
Package controllers implements common controllers for the infra providers. |
Package imagefactory implements factory clients used in the infra providers.
|
Package imagefactory implements factory clients used in the infra providers. |
internal
|
|
resources
Package resources contains COSI resource helpers for the infra provider.
|
Package resources contains COSI resource helpers for the infra provider. |
Package provision defines the interface for the infra provisioner.
|
Package provision defines the interface for the infra provisioner. |