provider

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCIDROverlap

func CheckCIDROverlap(cidr1, cidr2 string) (bool, error)

CheckCIDROverlap checks if two CIDR blocks are overlapping

func New

func New(version string) func() provider.Provider

func NewClusterDataSource

func NewClusterDataSource() datasource.DataSource

func NewClusterResource

func NewClusterResource() resource.Resource

func NewClustersDataSource

func NewClustersDataSource() datasource.DataSource

func NewHostDataSource

func NewHostDataSource() datasource.DataSource

func NewHostsDataSource

func NewHostsDataSource() datasource.DataSource

func NewKubeconfigDataSource

func NewKubeconfigDataSource() datasource.DataSource

func NewNodeDataSource

func NewNodeDataSource() datasource.DataSource

func NewNodepoolsDataSource

func NewNodepoolsDataSource() datasource.DataSource

func NewNodesDataSource

func NewNodesDataSource() datasource.DataSource

func RegexMatches

func RegexMatches(regexes []string, value string) bool

func StrSliceContains

func StrSliceContains(s []string, e string) bool

Types

type AddonSpec

type AddonSpec struct {
	ClusterID string
	Version   string
	Type      string
	ParamsMap map[string]string
}

type AddonsClient

type AddonsClient interface {
	Get(ctx context.Context, addonName string) (sunpikev1alpha2.ClusterAddon, error)
	List(ctx context.Context, clusterID string, addonType string) ([]sunpikev1alpha2.ClusterAddon, error)
	Enable(ctx context.Context, addonSpec AddonSpec) error
	Disable(ctx context.Context, addonSpec AddonSpec) error
	Patch(ctx context.Context, addonSpec AddonSpec, refClusterAddon *sunpikev1alpha2.ClusterAddon) error
}

func NewAddonClient

func NewAddonClient(sunpikeClient client.Client) AddonsClient

type Cluster

type Cluster struct {
	Cluster struct {
		Server                   string `yaml:"server" tfsdk:"server"`
		CertificateAuthorityData string `yaml:"certificate-authority-data" tfsdk:"certificate_authority"`
	} `yaml:"cluster" tfsdk:"cluster"`
	Name string `yaml:"name" tfsdk:"name"`
}

type Context

type Context struct {
	Name    string `yaml:"name"`
	Context struct {
		Cluster   string `yaml:"cluster"`
		Namespace string `yaml:"namespace"`
		User      string `yaml:"user"`
	} `yaml:"context"`
}

type Credentials

type Credentials struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type Diff

type Diff struct {
	Added   []string
	Removed []string
}

type KubeConfig

type KubeConfig struct {
	APIVersion     string    `yaml:"apiVersion"`
	CurrentContext string    `yaml:"current-context"`
	Kind           string    `yaml:"kind"`
	Clusters       []Cluster `yaml:"clusters"`
	Contexts       []Context `yaml:"contexts"`
	Users          []User    `yaml:"users"`
}

type StrMap

type StrMap map[string]string

func (StrMap) Equals

func (p StrMap) Equals(other StrMap) bool

type User

type User struct {
	Name string `yaml:"name" tfsdk:"name"`
	User struct {
		Token                 string `yaml:"token" tfsdk:"token"`
		ClientCertificateData string `yaml:"client-certificate-data" tfsdk:"client_certificate"`
		ClientKeyData         string `yaml:"client-key-data" tfsdk:"client_key"`
	} `yaml:"user" tfsdk:"user"`
}

Jump to

Keyboard shortcuts

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