framework

package
v0.0.0-...-3fda0cf Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: Apache-2.0 Imports: 64 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OtherCoreServicePorts = map[string]int{
		"ssh":          22,
		"http":         80,
		"keycloak":     10443,
		"k3s":          6443,
		"registry":     5080,
		"nova-console": 6080,
		"nfs":          2049,
		"influx-db":    8086,
	}
)

Functions

func ParseCheckAccessFlags

func ParseCheckAccessFlags(cmd *cobra.Command, spec *configs.Spec)

func ParseCheckPrereqFlags

func ParseCheckPrereqFlags(cmd *cobra.Command, spec *configs.Spec)

func ParseCreationFlags

func ParseCreationFlags(cmd *cobra.Command, spec *configs.Spec)

func ParseDeletionFlags

func ParseDeletionFlags(cmd *cobra.Command, spec *configs.Spec)

func ParseListFlags

func ParseListFlags(cmd *cobra.Command, spec *configs.Spec)

Types

type AllocationPool

type AllocationPool struct {
	Start string `yaml:"start"`
	End   string `yaml:"end"`
}

type Auth

type Auth struct {
	Type     string `yaml:"type"`
	Url      string `yaml:"url"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Token    string `yaml:"token"`
	Project  `yaml:"project"`
}

type Cloud

type Cloud struct {
	Provider   string                   `yaml:"provider"`
	Credential *rancher.CloudCredential `yaml:"credential"`
}

type ConfigMapVolume

type ConfigMapVolume struct {
	Name string `json:"name"`
}

type Container

type Container struct {
	Name            string        `json:"name"`
	Image           string        `json:"image"`
	ImagePullPolicy string        `json:"imagePullPolicy"`
	Command         []string      `json:"command"`
	Args            []string      `json:"args"`
	VolumeMounts    []VolumeMount `json:"volumeMounts"`
}

type Domain

type Domain struct {
	ID   string `yaml:"id"`
	Name string `yaml:"name"`
}

type EmptyDirVolume

type EmptyDirVolume struct{}

type Error

type Error struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type Flavor

type Flavor struct {
	ID      string `yaml:"id"`
	Name    string `yaml:"name"`
	VCPUs   int    `yaml:"vcpus"`
	RamMiB  int    `yaml:"ramMiB"`
	DiskGiB int    `yaml:"diskGiB"`
}

type Helm

type Helm struct {
	Charts []helm.Chart `yaml:"charts"`
}

type Helper

type Helper struct {
	Openstack  *openstack.Helper
	Rancher    *rancher.Helper
	Kubernetes *kubernetes.Helper
	Helm       *helm.Helper

	Spec configs.Spec
	// contains filtered or unexported fields
}

func NewHelper

func NewHelper(spec configs.Spec) (*Helper, error)

func (*Helper) CheckHelmCharts

func (h *Helper) CheckHelmCharts() error

func (*Helper) CheckOciImages

func (h *Helper) CheckOciImages() error

func (*Helper) CheckOsFlavors

func (h *Helper) CheckOsFlavors() error

func (*Helper) CheckOsImages

func (h *Helper) CheckOsImages() error

func (*Helper) CheckPortAccess

func (h *Helper) CheckPortAccess() error

func (*Helper) CheckPrerequisites

func (h *Helper) CheckPrerequisites() error

func (*Helper) CreateKubernetesResources

func (h *Helper) CreateKubernetesResources() error

func (*Helper) CreateOpenstackResources

func (h *Helper) CreateOpenstackResources() error

func (*Helper) DeleteKubernetesResources

func (h *Helper) DeleteKubernetesResources() error

func (*Helper) DeleteOpenstackResources

func (h *Helper) DeleteOpenstackResources() error

func (*Helper) ListFramework

func (h *Helper) ListFramework() (*rancher.ListClusterResponse, error)

func (*Helper) PrintFrameworksBySpecifiedFormat

func (h *Helper) PrintFrameworksBySpecifiedFormat(frameworks *rancher.ListClusterResponse, format string)

func (*Helper) PrintInfraCheckMessage

func (h *Helper) PrintInfraCheckMessage()

func (*Helper) PrintInfraSetupMessage

func (h *Helper) PrintInfraSetupMessage()

func (*Helper) PrintK8sCheckMessage

func (h *Helper) PrintK8sCheckMessage()

func (*Helper) PrintK8sDeletingMessage

func (h *Helper) PrintK8sDeletingMessage()

func (*Helper) PrintK8sSetupMessage

func (h *Helper) PrintK8sSetupMessage()

func (*Helper) PrintPortCheckMessage

func (h *Helper) PrintPortCheckMessage()

func (*Helper) PrintTenantDeletingMessage

func (h *Helper) PrintTenantDeletingMessage()

func (*Helper) ShowConfig

func (h *Helper) ShowConfig()

func (*Helper) SyncProjectIdentity

func (h *Helper) SyncProjectIdentity() error

type Image

type Image struct {
	ID   string `yaml:"id"`
	Name string `yaml:"name"`
}

type ImageResp

type ImageResp struct {
	Name   string   `json:"name"`
	Tags   []string `json:"tags"`
	Errors []Error  `json:"errors"`
}

type Ingress

type Ingress struct {
	Enabled bool          `json:"enabled"`
	Rules   []IngressRule `json:"rules"`
}

type IngressRule

type IngressRule struct {
	Host  string `json:"host"`
	Paths []Path `json:"paths"`
}

type Kubernetes

type Kubernetes struct {
	Version  string `yaml:"version"`
	Name     string `yaml:"name"`
	Cloud    `yaml:"cloud"`
	Network  `yaml:"network"`
	Master   Machine `yaml:"master"`
	Worker   Machine `yaml:"worker"`
	Plugins  `yaml:"plugins"`
	Registry `yaml:"registry"`
	Config   string `yaml:"config"`
}

type Machine

type Machine struct {
	Name     string `yaml:"name"`
	Quantity int    `yaml:"quantity"`
	Flavor   `yaml:"flavor"`
}

type Mirror

type Mirror struct {
	Hostname string `yaml:"hostname"`
	To       string `yaml:"to"`
}

type Network

type Network struct {
	ID           string   `yaml:"id"`
	Name         string   `yaml:"name"`
	Cni          string   `yaml:"cni"`
	IpVersion    int      `yaml:"ipVersion"`
	Subnets      []Subnet `yaml:"subnets"`
	AdminStateUp bool     `yaml:"adminStateUp"`
	Shared       bool     `yaml:"shared"`
}

type Openstack

type Openstack struct {
	Auth           `yaml:"auth"`
	Project        *projects.Project `yaml:"project"`
	User           `yaml:"user"`
	Roles          []Role          `yaml:"roles"`
	Routers        []Router        `yaml:"routers"`
	Networks       []Network       `yaml:"networks"`
	FloatingIpPool string          `yaml:"floatingIpPool"`
	EndpointType   string          `yaml:"endpointType"`
	SecurityGroups []SecurityGroup `yaml:"securityGroups"`
	Flavor         `yaml:"flavor"`
	Image          `yaml:"image"`
	SSH            `yaml:"ssh"`
}

type Path

type Path struct {
	Path     string `json:"path"`
	PathType string `json:"pathType"`
}

type Plugins

type Plugins struct {
	Helm        `yaml:"helm"`
	Crds        []string `yaml:"crds"`
	Controllers []string `yaml:"controllers"`
}

type PortRange

type PortRange struct {
	Min int `yaml:"min"`
	Max int `yaml:"max"`
}

type Project

type Project struct {
	ID     string `yaml:"id"`
	Name   string `yaml:"name"`
	Domain `yaml:"domain"`
}

type Rancher

type Rancher struct {
	Url  string `yaml:"url"`
	Auth `yaml:"auth"`
}

type Registry

type Registry struct {
	Mirrors []Mirror `yaml:"mirrors"`
}

type Role

type Role struct {
	Name string `yaml:"name"`
	User string `yaml:"user"`
}

type Router

type Router struct {
	Name         string `yaml:"name"`
	Network      `yaml:"network"`
	Subnets      []Subnet `yaml:"subnets"`
	AdminStateUp bool     `yaml:"adminStateUp"`
}

type Rule

type Rule struct {
	Description string              `yaml:"description"`
	Direction   rules.RuleDirection `yaml:"direction"`
	Protocol    rules.RuleProtocol  `yaml:"protocol"`
	EtherType   rules.RuleEtherType `yaml:"etherType"`
	CIDR        string              `yaml:"cidr"`
	PortRange   `yaml:"portRange"`
}

type SSH

type SSH struct {
	User string `yaml:"user"`
	Port int    `yaml:"port"`
}

type SecurityGroup

type SecurityGroup struct {
	ID    string `yaml:"id"`
	Name  string `yaml:"name"`
	Rules []Rule `yaml:"rules"`
}

type Subnet

type Subnet struct {
	ID              string                   `yaml:"id"`
	Name            string                   `yaml:"name"`
	IpVersion       gophercloud.IPVersion    `yaml:"ipVersion"`
	CIDR            string                   `yaml:"cidr"`
	GatewayIP       string                   `yaml:"gatewayIp"`
	EnableDHCP      bool                     `yaml:"enableDhcp"`
	AllocationPools []subnets.AllocationPool `yaml:"allocationPools"`
	HostRoutes      []subnets.HostRoute      `yaml:"hostRoutes"`
	PortIp          string                   `yaml:"portIp"`
}

type User

type User struct {
	ID       string `yaml:"id"`
	Name     string `yaml:"name"`
	Password string `yaml:"password"`
}

type Volume

type Volume struct {
	Name      string           `json:"name"`
	EmptyDir  *EmptyDirVolume  `json:"emptyDir,omitempty"`
	ConfigMap *ConfigMapVolume `json:"configMap,omitempty"`
}

type VolumeMount

type VolumeMount struct {
	Name      string `json:"name"`
	MountPath string `json:"mountPath"`
	SubPath   string `json:"subPath,omitempty"`
}

Jump to

Keyboard shortcuts

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