Documentation ¶
Overview ¶
This package implements compatibility layer to bridge previous provider/provisioner mismatch and as such is discouraged for future use.
+groupName=gravitational.io
Index ¶
- Constants
- Variables
- func CheckAndSetDefaults(manifest *Manifest) error
- func DiffPorts(old, new Manifest, profileName string) (tcp, udp []int, err error)
- func ExpandEnvVars(manifest []byte) []byte
- func GetProviderFromProvisioner(provisioner string) (string, error)
- func GetProvisionerFromProvider(provider string) (string, error)
- func IsAWSProvider(provider string) bool
- func ProcessMultiSourceValues(ctx context.Context, manifest *Manifest, manifestPath string) error
- func SetDefaults(manifest *Manifest) error
- func ShouldSkipApp(manifest Manifest, app loc.Locator) bool
- func ValidateDocker(ctx context.Context, d Docker, dir string) (failed []*pb.Probe, err error)
- func ValidateKubelet(ctx context.Context, profile NodeProfile, manifest Manifest) (failed []*pb.Probe)
- func ValidateRequirements(ctx context.Context, reqs Requirements, stateDir string) (failed []*pb.Probe, err error)
- type AWS
- type Azure
- type BaseImage
- type CPU
- type CatalogExtension
- type ConfigurationExtension
- type CustomCheck
- type Dependencies
- type Dependency
- type Device
- type Docker
- type EULA
- type EncryptionExtension
- type Endpoint
- type Etcd
- type Extensions
- type ExternalService
- type Flavor
- type FlavorNode
- type Flavors
- type Generic
- type Header
- type Hook
- type HookType
- type Hooks
- type IAMPolicy
- type Ingress
- type Installer
- type Kubelet
- type KubernetesExtension
- type License
- type LogsExtension
- type Manifest
- func (m Manifest) AllPackageDependencies() (deps []loc.Locator)
- func (m Manifest) Base() *loc.Locator
- func (m Manifest) CatalogDisabled() bool
- func (in *Manifest) DeepCopy() *Manifest
- func (in *Manifest) DeepCopyInto(out *Manifest)
- func (in *Manifest) DeepCopyObject() runtime.Object
- func (m Manifest) DefaultProvider() string
- func (m Manifest) DefaultRuntimePackage() (*loc.Locator, error)
- func (m Manifest) DescribeKind() string
- func (m Manifest) DevicesForProfile(profileName string) ([]Device, error)
- func (m Manifest) Docker(profile NodeProfile) Docker
- func (m Manifest) EULA() string
- func (m Manifest) EtcdArgs(profile NodeProfile) []string
- func (m Manifest) FilterDependencies(apps []loc.Locator) (result []loc.Locator)
- func (m Manifest) FindFlavor(name string) *Flavor
- func (m Manifest) FirstNodeProfile() (*NodeProfile, error)
- func (m Manifest) FirstNodeProfileName() (string, error)
- func (m Manifest) FlavorNames() []string
- func (m Manifest) GetNetworkType(provider, provisioner string) string
- func (m Manifest) GetObjectKind() kubeschema.ObjectKind
- func (m Manifest) HasHook(hook HookType) bool
- func (m Manifest) ImageType() string
- func (m Manifest) IngressEnabled() bool
- func (m Manifest) KubeletArgs(profile NodeProfile) []string
- func (m Manifest) Locator() loc.Locator
- func (m Manifest) OpenEBSEnabled() bool
- func (m Manifest) OpsCenterDisabled() bool
- func (m Manifest) PackageDependencies(profile string) (deps []loc.Locator, err error)
- func (m Manifest) PrivilegedEnabled() bool
- func (m Manifest) RuntimeArgs(profile NodeProfile) []string
- func (m Manifest) RuntimeImages() (images []string)
- func (m Manifest) RuntimePackage(profile NodeProfile) (*loc.Locator, error)
- func (m Manifest) RuntimePackageForProfile(profileName string) (*loc.Locator, error)
- func (m *Manifest) SetBase(locator loc.Locator)
- func (m Manifest) SetupEndpoint() *Endpoint
- func (m Manifest) SystemDocker() Docker
- func (m Manifest) SystemSettingsChanged(other Manifest) bool
- func (m *Manifest) UnmarshalJSON(data []byte) error
- type Metadata
- type MonitoringExtension
- type Network
- type Networking
- type Nginx
- type NodeProfile
- type NodeProfiles
- type NodeProviderAWS
- type NodeProviders
- type OS
- type OpenEBS
- type OpsCenterExtension
- type Port
- type PortRange
- type PortRanges
- type Providers
- type RAM
- type Requirements
- type Runtime
- type ServiceRole
- type Storage
- type SystemDependencies
- type SystemOptions
- type Volume
Constants ¶
const ( // LabelRole names a label that defines a node role LabelRole = "role" // ServiceLabelRole names a label that defines a kubernetes node role ServiceLabelRole = "gravitational.io/k8s-role" // ProviderAWS defines AWS as infrastructure provider ProviderAWS = "aws" // ProviderGeneric defines a generic provider ProviderGeneric = "generic" // ProviderOnPrem defines an On-Premises infrastructure provider ProviderOnPrem = "onprem" // ProviderGCE defines Google Compute Engine provider ProviderGCE = "gce" // ProvisionerAWSTerraform defines an operation provisioner based on terraform ProvisionerAWSTerraform = "aws_terraform" // ProvisionerOnPrem defines a provisioner for an On-Premises operation ProvisionerOnPrem = "onprem" // NetworkingAWSVPC defines a type of networking for AWS based on AWS-VPC NetworkingAWSVPC = "aws-vpc" // NetworkingCalico defines a type of networking using Calico NetworkingCalico = "calico" // NetworkingFlannel defines a type of networking using Flannel VXLAN NetworkingFlannel = "vxlan" // DisplayRole defines a role used to identify a server instance in the inventory // management console DisplayRole = "display-role" // SystemDevice defines the name of the agent download URI query parameter for system (state) device SystemDevice = "system_device" // AdvertiseAddr is advertise IP address used in agents AdvertiseAddr = "advertise_addr" // MountSpec defines the name of the agent download URI query parameter for a mount specification MountSpec = "mount" // GCENodeTags defines the name of the agent download URI query parameter to override instance node tags // on GCE GCENodeTags = "gce_node_tags" // KindBundle defines an application bundle type (obsoleted by "Cluster") KindBundle = "Bundle" // KindCluster defines a cluster type (former "Bundle") KindCluster = "Cluster" // KindApplication defines a user application type KindApplication = "Application" // KindSystemApplication defines a system application type KindSystemApplication = "SystemApplication" // KindRuntime defines a runtime application type KindRuntime = "Runtime" // APIVersionV1 specifies the previous API version APIVersionV1 = "v1" // APIVersionLegacyV2 specifies legacy v2 version APIVersionLegacyV2 = "v2" // GroupName specifies the name of the group for application manifest package GroupName = "bundle.gravitational.io" // ClusterGroupName is the API group for cluster image manifest ClusterGroupName = "cluster.gravitational.io" // AppGroupName is the API group for app image manifest AppGroupName = "app.gravitational.io" // Version specifies the current package version Version = "v2" // ExpandPolicyFixed is a node membership policy that prevents adding // more nodes of the same role ExpandPolicyFixed = "fixed" // ExpandPolicyFixedInstance is a node membership policy that allows adding // nodes of the same role with the same instance type only (for cloud // providers) ExpandPolicyFixedInstance = "fixed-instance" // OpsCenterAppName is the name of the Ops Center application OpsCenterAppName = "opscenter" // OpsCenterNode is the Ops Center app node profile name OpsCenterNode = "node" // OpsCenterFlavor is the Ops Center app flavor OpsCenterFlavor = "single" // SELinuxLabelNone is a special placeholder for a SELinux label indicating // that no labeling should be performed for the directory SELinuxLabelNone = "none" )
Variables ¶
var ( // DefaultKernelModules is the list of kernel modules needed for gravity to function properly DefaultKernelModules = []monitoring.ModuleRequest{ moduleName("ebtables"), moduleName("ebtable_filter"), moduleName("ip_tables"), moduleName("iptable_filter"), moduleName("iptable_nat"), moduleName("br_netfilter"), moduleName("overlay"), } // DefaultKernelModuleChecker is a satellite kernel module checker with required modules to run kubernetes DefaultKernelModuleChecker = monitoring.NewKernelModuleChecker(DefaultKernelModules...) )
var ( // APIVersionV2 specifies the current API version APIVersionV2 = fmt.Sprintf("%v/%v", GroupName, Version) // APIVersionV2Cluster is the API version for cluster images APIVersionV2Cluster = fmt.Sprintf("%v/%v", ClusterGroupName, Version) // APIVersionV2App is the API version for app images APIVersionV2App = fmt.Sprintf("%v/%v", AppGroupName, Version) )
var ( // SchemeGroupVersion defines group and version for the application manifest type in the kubernetes // resource scheme SchemeGroupVersion = kubeschema.GroupVersion{Group: GroupName, Version: Version} // ClusterGroupVersion defines group/version for the cluster image manifest ClusterGroupVersion = kubeschema.GroupVersion{Group: ClusterGroupName, Version: Version} // AppGroupVersion defines group/version for the app image manifest AppGroupVersion = kubeschema.GroupVersion{Group: AppGroupName, Version: Version} )
var DefaultPortRanges = PortRanges{ Kubernetes: []PortRange{ {Protocol: "tcp", From: 10248, To: 10255, Description: "kubernetes internal services range"}, { Protocol: "tcp", From: defaults.EtcdAPIPort, To: defaults.EtcdAPIPort, Description: "etcd API port", }, { Protocol: "tcp", From: defaults.EtcdPeerPort, To: defaults.EtcdPeerPort, Description: "etcd peer port", }, { Protocol: "tcp", From: defaults.APIServerSecurePort, To: defaults.APIServerSecurePort, Description: "kubernetes API server", }, { Protocol: "tcp", From: defaults.AlertmanagerServicePort, To: defaults.AlertmanagerServicePort, Description: "alert manager service port", }, }, Installer: []PortRange{ { Protocol: "tcp", From: defaults.WizardPackServerPort, To: defaults.WizardPackServerPort, Description: "wizard package service", }, { Protocol: "tcp", From: defaults.WizardHealthPort, To: defaults.WizardHealthPort, Description: "wizard health endpoint", }, { Protocol: "tcp", From: defaults.WizardSSHServerPort, To: defaults.WizardSSHServerPort, Description: "wizard SSH port", }, { Protocol: "tcp", From: defaults.WizardProxyServerPort, To: defaults.WizardProxyServerPort, Description: "wizard proxy port", }, { Protocol: "tcp", From: defaults.WizardReverseTunnelPort, To: defaults.WizardReverseTunnelPort, Description: "installer reverse tunnel port", }, { Protocol: "tcp", From: defaults.WizardAuthServerPort, To: defaults.WizardAuthServerPort, Description: "installer auth port", }, { Protocol: "tcp", From: defaults.GravityRPCAgentPort, To: defaults.GravityRPCAgentPort, Description: "gravity agent RPC", }, { Protocol: "tcp", From: defaults.BandwidthTestPort, To: defaults.BandwidthTestPort, Description: "bandwidth test port", }, }, Vxlan: PortRange{ Protocol: "udp", From: defaults.VxlanPort, To: defaults.VxlanPort, Description: "overlay network", }, Generic: []PortRange{ {Protocol: "tcp", From: 3022, To: 3026, Description: "teleport internal SSH control panel"}, {Protocol: "tcp", From: 3007, To: 3011, Description: "internal gravity services"}, { Protocol: "tcp", From: defaults.GravitySiteNodePort, To: defaults.GravitySiteNodePort, Description: "gravity Hub control panel", }, { Protocol: "tcp", From: defaults.SatelliteRPCAgentPort, To: defaults.SatelliteRPCAgentPort, Description: "planet agent RPC", }, { Protocol: "tcp", From: defaults.SatelliteMetricsPort, To: defaults.SatelliteMetricsPort, Description: "planet agent monitoring API port", }, }, Reserved: []PortRange{ { Protocol: "tcp", From: defaults.EtcdAPILegacyPort, To: defaults.EtcdAPILegacyPort, Description: "etcd", }, { Protocol: "tcp", From: defaults.EtcdPeerLegacyPort, To: defaults.EtcdPeerLegacyPort, Description: "etcd", }, { Protocol: "tcp", From: defaults.DockerRegistryPort, To: defaults.DockerRegistryPort, Description: "docker registry", }, }, }
DefaultPortRanges defines the list of default ports for the cluster
var SupportedProviders = []string{ ProviderGeneric, ProviderAWS, ProviderGCE, }
SupportedProviders is a list of currently supported providers
Functions ¶
func CheckAndSetDefaults ¶
CheckAndSetDefaults verifies that the specified manifest does not have conflicting or errorneous attributes set
func DiffPorts ¶
DiffPorts returns a difference of port requirements between old and new for the specified profile.
func ExpandEnvVars ¶
ExpandEnvVars does environment variables interpolation on manifest body.
Environment variables have format ${VARNAME}.
func GetProviderFromProvisioner ¶
GetProviderFromProvisioner derives a provider name from the specified provisioner. It does not try to guess hard enough and supports only basic translation. Note, it is always cleaner to set the provider in the request explicitly.
func GetProvisionerFromProvider ¶
GetProvisionerFromProvider derives a provisioner name from the specified provider. It does not try to guess hard enough and supports only basic translation. Note, it is always cleaner to set the provisioner in the request explicitly.
func IsAWSProvider ¶
IsAWSProvider determines if specified provider string refers to AWS provider
func ProcessMultiSourceValues ¶
ProcessMultiSourceValues replaces manifest fields that refer to files (via file:// schema) or internet resources (via http:// scheme) with their literal values (i.e. file/downloaded content).
The following fields can be filepaths/URLs:
.releaseNotes .logo .installer.eula.source .installer.flavors.description .hooks.*.job .webConfig
func SetDefaults ¶
SetDefaults enforces defaults on fields that require a value but have not been specified on the given manifest.
func ShouldSkipApp ¶
ShouldSkipApp returns true if the specified application should not be installed in the cluster described by the provided manifest.
func ValidateDocker ¶
ValidateDocker validates Docker requirements. The specified directory is expected to be on the same filesystem as the Docker graph directory (which might not exist at this point).
func ValidateKubelet ¶
func ValidateKubelet(ctx context.Context, profile NodeProfile, manifest Manifest) (failed []*pb.Probe)
ValidateKubelet will check kubelet configuration
func ValidateRequirements ¶
func ValidateRequirements(ctx context.Context, reqs Requirements, stateDir string) (failed []*pb.Probe, err error)
ValidateRequirements will assess local node to match requirements
Types ¶
type AWS ¶
type AWS struct { // Networking describes networking configuration Networking Networking `json:"network,omitempty"` // Regions is a list of supported regions Regions []string `json:"regions,omitempty"` // IAMPolicy is a list of permissions IAMPolicy IAMPolicy `json:"iamPolicy,omitempty"` // Disabled is whether this provider should be disabled Disabled bool `json:"disabled,omitempty"` }
AWS defines AWS-specific settings
func (*AWS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWS.
func (*AWS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Azure ¶
type Azure struct { // Disabled is whether this provider should be disabled Disabled bool `json:"disabled,omitempty"` }
Azure defines Azure-specific settings
func (*Azure) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Azure.
func (*Azure) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BaseImage ¶
BaseImage defines a base image type which is basically a locator with custom marshal/unmarshal.
func (*BaseImage) MarshalJSON ¶
MarshalJSON marshals base image into a JSON string.
func (*BaseImage) UnmarshalJSON ¶
UnmarshalJSON unmarshals base image from a JSON string.
type CPU ¶
type CPU struct { // Min is minimum required amount of CPUs Min int `json:"min,omitempty"` // Max is maximum supported amount of CPUs Max int `json:"max,omitempty"` }
CPU describes CPU requirements
func (*CPU) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPU.
func (*CPU) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CatalogExtension ¶
type CatalogExtension struct { // Disabled disables application catalog and tiller Disabled bool `json:"disabled,omitempty"` }
CatalogExtension allows to customize application catalog feature
type ConfigurationExtension ¶
type ConfigurationExtension struct { // Disabled allows to disable Configuration tab Disabled bool `json:"disabled,omitempty"` }
ConfigurationExtension allows to customize configuration feature
func (*ConfigurationExtension) DeepCopy ¶
func (in *ConfigurationExtension) DeepCopy() *ConfigurationExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigurationExtension.
func (*ConfigurationExtension) DeepCopyInto ¶
func (in *ConfigurationExtension) DeepCopyInto(out *ConfigurationExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomCheck ¶
type CustomCheck struct { // Description provides a readable description for the check Description string `json:"description,omitempty"` // Script defines the contents of the check script. // It is provided to the shell verbatim in a temporary file Script string `json:"script,omitempty"` }
CustomCheck defines a script that runs a custom preflight check
type Dependencies ¶
type Dependencies struct { // Packages is a list of dependencies-packages Packages []Dependency `json:"packages,omitempty"` // Apps is a list of dependencies-apps Apps []Dependency `json:"apps,omitempty"` }
Dependencies describes application dependencies
func (Dependencies) ByName ¶
func (d Dependencies) ByName(names ...string) (*loc.Locator, error)
ByName returns a dependency package locator by its name
func (*Dependencies) DeepCopy ¶
func (in *Dependencies) DeepCopy() *Dependencies
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependencies.
func (*Dependencies) DeepCopyInto ¶
func (in *Dependencies) DeepCopyInto(out *Dependencies)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Dependencies) GetApps ¶
func (d Dependencies) GetApps() []loc.Locator
GetApps returns a list of all application dependencies
func (Dependencies) GetPackages ¶
func (d Dependencies) GetPackages() []loc.Locator
GetPackages returns a list of all package dependencies
type Dependency ¶
Dependency represents a package or app dependency
func (*Dependency) DeepCopy ¶
func (in *Dependency) DeepCopy() *Dependency
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependency.
func (*Dependency) DeepCopyInto ¶
func (in *Dependency) DeepCopyInto(out *Dependency)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Dependency) MarshalJSON ¶
func (d *Dependency) MarshalJSON() ([]byte, error)
MarshalJSON marshals dependency into a JSON string
func (*Dependency) UnmarshalJSON ¶
func (d *Dependency) UnmarshalJSON(data []byte) error
UnmarshalJSON unmarshals dependency from a JSON string
type Device ¶
type Device struct { // Path is the device path, treated as a glob, e.g. /dev/nvidia* Path string `json:"path"` // Permissions is the device permissions, a composition // of 'r' (read), 'w' (write) and 'm' (mknod) Permissions string `json:"permissions,omitempty"` // FileMode is the permission bits for the device FileMode string `json:"fileMode,omitempty"` // UID is the device user ID UID *int `json:"uid,omitempty"` // GID is the device group ID GID *int `json:"gid,omitempty"` }
Device describes a device that should be created inside container
type Docker ¶
type Docker struct { // ExternalService defines additional configuration for the docker service ExternalService // StorageDriver is the docker storage driver to use StorageDriver string `json:"storageDriver,omitempty"` // Capacity is required docker device capacity Capacity utils.Capacity `json:"capacity,omitempty"` }
Docker describes docker options
func (*Docker) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Docker.
func (*Docker) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EULA ¶
type EULA struct { // Source is the license text URL (file:// or http://) or literal text Source string `json:"source,omitempty"` }
EULA describes the application end user license agreement
func (*EULA) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EULA.
func (*EULA) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EncryptionExtension ¶
type EncryptionExtension struct { // EncryptionKey is the passphrase for installer encryption EncryptionKey string `json:"encryptionKey,omitempty"` // CACert is the certificate authority certificate CACert string `json:"caCert,omitempty"` }
EncryptionExtension describes installer encryption extension
func (*EncryptionExtension) DeepCopy ¶
func (in *EncryptionExtension) DeepCopy() *EncryptionExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionExtension.
func (*EncryptionExtension) DeepCopyInto ¶
func (in *EncryptionExtension) DeepCopyInto(out *EncryptionExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Endpoint ¶
type Endpoint struct { // Name is the endpoint short name Name string `json:"name,omitempty"` // Description is the endpoint verbose description Description string `json:"description,omitempty"` // Selector is the endpoint's k8s service selector Selector map[string]string `json:"selector,omitempty"` // ServiceName is the endpoint's k8s service name ServiceName string `json:"serviceName,omitempty"` // Namespace is the endpoint's k8s namespace Namespace string `json:"namespace,omitempty"` // Protocol is the endpoint protocol Protocol string `json:"protocol,omitempty"` // Port is the endpoint port Port int `json:"port,omitempty"` // Hidden is whether to hide the endpoint from the UI Hidden bool `json:"hidden,omitempty"` }
Endpoint describes an application endpoint
func (*Endpoint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Etcd ¶
type Etcd struct { // ExternalService defines additional configuration for the etcd service ExternalService }
Etcd describes etcd options
func (*Etcd) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Etcd.
func (*Etcd) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Extensions ¶
type Extensions struct { // Encryption allows to encrypt installer packages Encryption *EncryptionExtension `json:"encryption,omitempty"` // Logs allows to customize logs feature Logs *LogsExtension `json:"logs,omitempty"` // Monitoring allows to customize monitoring feature Monitoring *MonitoringExtension `json:"monitoring,omitempty"` // Kubernetes allows to customize kubernetes feature Kubernetes *KubernetesExtension `json:"kubernetes,omitempty"` // Configuration allows to customize configuration feature Configuration *ConfigurationExtension `json:"configuration,omitempty"` // Catalog allows to customize application catalog feature Catalog *CatalogExtension `json:"catalog,omitempty"` // OpsCenter enables the management web UI OpsCenter *OpsCenterExtension `json:"opsCenter,omitempty"` }
Extensions defines various custom application features
func (*Extensions) DeepCopy ¶
func (in *Extensions) DeepCopy() *Extensions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extensions.
func (*Extensions) DeepCopyInto ¶
func (in *Extensions) DeepCopyInto(out *Extensions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExternalService ¶
type ExternalService struct { // Args is a list of extra arguments to provide to the service Args []string `json:"args,omitempty"` }
ExternalService defines configuration for an external service.
type Flavor ¶
type Flavor struct { // Name is the flavor name Name string `json:"name,omitempty"` // Description is verbose flavor description Description string `json:"description,omitempty"` // Nodes defines a list of node profiles composing the flavor Nodes []FlavorNode `json:"nodes,omitempty"` }
Flavor describes a single application flavor
func (*Flavor) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flavor.
func (*Flavor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FlavorNode ¶
type FlavorNode struct { // Profile is a node profile name Profile string `json:"profile,omitempty"` // Count is number of nodes of this profile Count int `json:"count,omitempty"` }
FlavorNode describes a single node profile for a flavor
func (*FlavorNode) DeepCopy ¶
func (in *FlavorNode) DeepCopy() *FlavorNode
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FlavorNode.
func (*FlavorNode) DeepCopyInto ¶
func (in *FlavorNode) DeepCopyInto(out *FlavorNode)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Flavors ¶
type Flavors struct { // Default is the name of the default application flavor Default string `json:"default,omitempty"` // Prompt is a phrase or a question describing the criteria that // should be considered when picking a flavor (e.g. "How many // requests per second do you want to process?") Prompt string `json:"prompt,omitempty"` // Description is a general description for the application flavors Description string `json:"description,omitempty"` // Items is a list of flavors Items []Flavor `json:"items,omitempty"` }
Flavors describes the application flavors
func (*Flavors) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Flavors.
func (*Flavors) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Generic ¶
type Generic struct { // Networking describes networking configuration Networking Networking `json:"network,omitempty"` // Disabled is whether this provider should be disabled Disabled bool `json:"disabled,omitempty"` }
Generic defines generic provider settings
func (*Generic) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Generic.
func (*Generic) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Header ¶
type Header struct { metav1.TypeMeta // Metadata is the application metadata Metadata Metadata `json:"metadata,omitempty"` }
Header is manifest header
func (*Header) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Header.
func (*Header) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Header) GetVersion ¶
GetVersion returns the manifest version
type Hook ¶
type Hook struct { // Type is a hook type Type HookType `json:"type,omitempty"` // Job is a URL of (file:// or http://) or a literal value of a k8s job Job string `json:"job,omitempty"` }
Hook defines a hook as either a shell script run in the context of the automatically created job or the raw job spec
func HookFromString ¶
HookFromString returns an application hook specified with hookType
func (*Hook) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hook.
func (*Hook) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HookType ¶
type HookType string
HookType defines the application hook type
const ( // HookClusterProvision used to provision new cluster HookClusterProvision HookType = "clusterProvision" // HookClusterDeprovision used to deprovision existing cluster HookClusterDeprovision HookType = "clusterDeprovision" // HookNodesProvision used to provision new nodes in the cluster HookNodesProvision HookType = "nodesProvision" // HookNodesDeprovision used to deprovision existing nodes HookNodesDeprovision HookType = "nodesDeprovision" // HookInstall defines the installation hook HookInstall HookType = "install" // HookInstalled defines the post install hook HookInstalled HookType = "postInstall" // HookUninstall defines the installation hook HookUninstall HookType = "uninstall" // HookUninstalling defines the before uninstall hook HookUninstalling HookType = "preUninstall" // HookBeforeUpdate defines the application hook that runs before the update HookBeforeUpdate HookType = "preUpdate" // HookUpdate defines the application update hook HookUpdate HookType = "update" // HookUpdated defines the post application update hook HookUpdated HookType = "postUpdate" // HookRollback defines the application rollback hook HookRollback HookType = "rollback" // HookRolledBack defines the application post rollback hook HookRolledBack HookType = "postRollback" // HookNodeAdding defines the before expand hook HookNodeAdding HookType = "preNodeAdd" // HookNodeAdded defines the post expand hook HookNodeAdded HookType = "postNodeAdd" // HookNodeRemoving defines the before shrink hook HookNodeRemoving HookType = "preNodeRemove" // HookNodeRemoved defines the post shrink hook HookNodeRemoved HookType = "postNodeRemove" // HookStatus defines the application status hook HookStatus HookType = "status" // HookInfo defines the application service info hook HookInfo HookType = "info" // HookLicenseUpdated defines the license update hook HookLicenseUpdated HookType = "licenseUpdated" // HookStart defines the application start hook HookStart HookType = "start" // HookStop defines the application stop hook HookStop HookType = "stop" // HookDump defines the application dump hook HookDump HookType = "dump" // HookBackup defines a hook to trigger backup of application data. // The hook is scheduled on the same node where the backup command runs HookBackup HookType = "backup" // HookRestore defines a hook to restore application state from a previously // created backup. // The hook is scheduled on the same node where the restore command runs HookRestore HookType = "restore" // HookNetworkInstall defines a hook used to install a custom overlay network HookNetworkInstall = "networkInstall" // HookNetworkUpdate defines a hook to update the overlay network HookNetworkUpdate = "networkUpdate" // HookNetworkRollback defines a hook to rollback the overlay network HookNetworkRollback = "networkRollback" )
type Hooks ¶
type Hooks struct { // ClusterProvision provisions new cluster ClusterProvision *Hook `json:"clusterProvision,omitempty"` // ClusterDeprovision deprovisions cluster ClusterDeprovision *Hook `json:"clusterDeprovision,omitempty"` // NodesProvision provisions new nodes to the existing cluster NodesProvision *Hook `json:"nodesProvision,omitempty"` // NodesDeprovision deprovisions nodes NodesDeprovision *Hook `json:"nodesDeprovision,omitempty"` // Install installs the application Install *Hook `json:"install,omitempty"` // Installed is called after the application has been installed Installed *Hook `json:"postInstall,omitempty"` // Uninstall uninstalls the application Uninstall *Hook `json:"uninstall,omitempty"` // Uninstalling is called before uninstall Uninstalling *Hook `json:"preUninstall,omitempty"` // NodeAdding is called before expansion NodeAdding *Hook `json:"preNodeAdd,omitempty"` // NodeAdded is called after expansion NodeAdded *Hook `json:"postNodeAdd,omitempty"` // NodeRemoving is called before shrink NodeRemoving *Hook `json:"preNodeRemove,omitempty"` // NodeRemoved is called after shrink NodeRemoved *Hook `json:"postNodeRemove,omitempty"` // BeforeUpdate is executed before the application is updated BeforeUpdate *Hook `json:"preUpdate,omitempty"` // Updating performs application update Updating *Hook `json:"update,omitempty"` // Updated is called after successful update Updated *Hook `json:"postUpdate,omitempty"` // Rollback performs application rollback after an unsuccessful update Rollback *Hook `json:"rollback,omitempty"` // RolledBack is called after successful rollback RolledBack *Hook `json:"postRollback,omitempty"` // Status is called every minute to check application status Status *Hook `json:"status,omitempty"` // Info is used to obtain application information Info *Hook `json:"info,omitempty"` // LicenseUpdated is called after license update LicenseUpdated *Hook `json:"licenseUpdated,omitempty"` // Start starts the application Start *Hook `json:"start,omitempty"` // Stop stops the application Stop *Hook `json:"stop,omitempty"` // Dump is used to retrieve application-specific dumps for debug reports Dump *Hook `json:"dump,omitempty"` // Backup triggers application data backup Backup *Hook `json:"backup,omitempty"` // Restore restores application state from a backup Restore *Hook `json:"restore,omitempty"` // NetworkInstall is a hook for installing a custom overlay network NetworkInstall *Hook `json:"networkInstall,omitempty"` // NetworkUpdate is a hook for updating a custom overlay network NetworkUpdate *Hook `json:"networkUpdate,omitempty"` // NetworkRollback is a hook for rolling back a custom overlay network NetworkRollback *Hook `json:"networkRollback,omitempty"` }
Hooks defines all supported application lifecycle hooks
func (*Hooks) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Hooks.
func (*Hooks) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IAMPolicy ¶
type IAMPolicy struct { // Version is the policy version Version string `json:"version,omitempty"` // Actions is a list of IAM permissions (e.g. "ec2:CreateVolume") Actions []string `json:"actions,omitempty"` }
IAMPolicy defines a list of AWS permissions
func (*IAMPolicy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IAMPolicy.
func (*IAMPolicy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Ingress ¶
type Ingress struct { // Nginx allows to customize the nginx based Ingress resource Nginx *Nginx `json:"nginx,omitempty"` }
Ingress represents Ingress configuration.
type Installer ¶
type Installer struct { // EULA describes the application end user license agreement EULA EULA `json:"eula,omitempty"` // SetupEndpoints is a list of names of endpoints to use in // post installation; only one is actually supported for now SetupEndpoints []string `json:"setupEndpoints,omitempty"` // Flavors defines application flavors Flavors Flavors `json:"flavors,omitempty"` }
Installer contains installer customizations
func (*Installer) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Installer.
func (*Installer) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Kubelet ¶
type Kubelet struct { // ExternalService defines additional configuration for kubelet ExternalService // HairpinMode is deprecated and no longer used HairpinMode string `json:"hairpinMode,omitempty"` }
Kubelet describes kubelet options
func (*Kubelet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kubelet.
func (*Kubelet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesExtension ¶
type KubernetesExtension struct { // Disabled allows to disable Kubernetes tab Disabled bool `json:"disabled,omitempty"` }
KubernetesExtension allows to customize kubernetes feature
func (*KubernetesExtension) DeepCopy ¶
func (in *KubernetesExtension) DeepCopy() *KubernetesExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesExtension.
func (*KubernetesExtension) DeepCopyInto ¶
func (in *KubernetesExtension) DeepCopyInto(out *KubernetesExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type License ¶
type License struct { // Enabled is whether licensing is enabled/disabled Enabled bool `json:"enabled,omitempty"` // Type is the license type Type string `json:"type,omitempty"` }
License describes an application license
func (*License) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new License.
func (*License) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogsExtension ¶
type LogsExtension struct { // Disabled allows to disable Logs tab Disabled bool `json:"disabled,omitempty"` }
LogsExtension allows to customize logs feature
func (*LogsExtension) DeepCopy ¶
func (in *LogsExtension) DeepCopy() *LogsExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsExtension.
func (*LogsExtension) DeepCopyInto ¶
func (in *LogsExtension) DeepCopyInto(out *LogsExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Manifest ¶
type Manifest struct { // Header provides basic information about application Header // BaseImage specifies the cluster image that's used as a base image BaseImage *BaseImage `json:"baseImage,omitempty"` // Logo is the application logo; can be either a filename (file://) or // an HTTP address (http://) or base64 encoded image data in the format // that can be used in a web page Logo string `json:"logo,omitempty"` // ReleaseNotes is the application's release notes; can be either a filename // (file://) or an HTTP address (http://) or plain text ReleaseNotes string `json:"releaseNotes,omitempty"` // Endpoints is a list of application endpoints Endpoints []Endpoint `json:"endpoints,omitempty"` // Dependencies is other apps/packages the application depends on Dependencies Dependencies `json:"dependencies,omitempty"` // Installer customizes the installer behavior Installer *Installer `json:"installer,omitempty"` // NodeProfiles describes types of nodes the application supports NodeProfiles NodeProfiles `json:"nodeProfiles,omitempty"` // Providers contains settings specific to different providers (e.g. cloud) Providers *Providers `json:"providers,omitempty"` // Ingress configures Ingress controllers. Ingress *Ingress `json:"ingress,omitempty"` // Storage configures persistent storage providers. Storage *Storage `json:"storage,omitempty"` // License allows to turn on/off license mode for the application License *License `json:"license,omitempty"` // Hooks contains application-defined hooks Hooks *Hooks `json:"hooks,omitempty"` // SystemOptions contains various global settings SystemOptions *SystemOptions `json:"systemOptions,omitempty"` // Extensions allows to enable/disable various custom features Extensions *Extensions `json:"extensions,omitempty"` // WebConfig allows to specify config.js used by UI to customize installer WebConfig string `json:"webConfig,omitempty"` }
Manifest represents an application manifest that describes a Gravity application or cluster image
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func MustParseManifestYAML ¶
MustParseManifestYAML parser the provided manifest data and panics in case of parsing error
func ParseManifest ¶
ParseManifest parses manifest file at the specified path
func ParseManifestYAML ¶
ParseManifestYAML parses the provided data as an application manifest and validates it
func ParseManifestYAMLNoValidate ¶
ParseManifestYAMLNoValidate parses the provided data as an application manifest and does not run any validation checks on it
func (Manifest) AllPackageDependencies ¶
AllPackageDependencies returns the list of all available package dependencies
func (Manifest) Base ¶
Base returns a locator of a base application (runtime) the application depends on.
Only cluster images can have runtimes.
func (Manifest) CatalogDisabled ¶
CatalogDisabled returns true if the application catalog feature is disabled.
func (*Manifest) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Manifest.
func (*Manifest) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Manifest) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (Manifest) DefaultProvider ¶
DefaultProvider returns the default cloud provider or an empty string.
func (Manifest) DefaultRuntimePackage ¶
DefaultRuntimePackage returns the default runtime package
func (Manifest) DescribeKind ¶
DescribeKind returns a human-friendly short description of the manifest kind.
func (Manifest) DevicesForProfile ¶
DevicesForProfile returns a list of required devices for the specified profile
func (Manifest) Docker ¶
func (m Manifest) Docker(profile NodeProfile) Docker
Docker returns docker configuration for the specified node profile. With no explicit configuration, default docker configuration is returned
func (Manifest) EtcdArgs ¶
func (m Manifest) EtcdArgs(profile NodeProfile) []string
EtcdArgs returns the list of additional etcd arguments for the specified node profile
func (Manifest) FilterDependencies ¶
FilterDependencies filters the provided list of application locators and returns only those that are enabled based on the manifest settings.
func (Manifest) FindFlavor ¶
FindFlavor returns a flavor by the provided name
func (Manifest) FirstNodeProfile ¶
func (m Manifest) FirstNodeProfile() (*NodeProfile, error)
FirstNodeProfile returns the first available node profile.
func (Manifest) FirstNodeProfileName ¶
FirstNodeProfileName returns the name of the first available node profile.
func (Manifest) FlavorNames ¶
FlavorNames returns a list of all defined flavors
func (Manifest) GetNetworkType ¶
GetNetworkType looks up network type for the specified provider / provisioner pair
func (Manifest) GetObjectKind ¶
func (m Manifest) GetObjectKind() kubeschema.ObjectKind
GetObjectKind returns the manifest header
func (Manifest) ImageType ¶
ImageType returns the image type this manifest represents, cluster or application.
func (Manifest) IngressEnabled ¶
IngressEnabled returns true if Ingress is enabled.
func (Manifest) KubeletArgs ¶
func (m Manifest) KubeletArgs(profile NodeProfile) []string
KubeletArgs returns the list of additional kubelet arguments for the specified node profile
func (Manifest) OpenEBSEnabled ¶
OpenEBSEnabled returns true if OpenEBS storage provider is enabled.
func (Manifest) OpsCenterDisabled ¶
OpsCenterDisabled returns true if the Ops Center is disabled.
func (Manifest) PackageDependencies ¶
PackageDependencies returns the list of package dependencies for the specified profile
func (Manifest) PrivilegedEnabled ¶
PrivilegedEnabled returns true if privileged containers should be allowed.
func (Manifest) RuntimeArgs ¶
func (m Manifest) RuntimeArgs(profile NodeProfile) []string
RuntimeArgs returns the list of additional runtime arguments for the specified node profile
func (Manifest) RuntimeImages ¶
RuntimeImages returns the list of all runtime images.
func (Manifest) RuntimePackage ¶
func (m Manifest) RuntimePackage(profile NodeProfile) (*loc.Locator, error)
RuntimePackage returns the planet package for the specified profile. If the profile does not specify a runtime package, the default runtime package is returned
func (Manifest) RuntimePackageForProfile ¶
RuntimePackageForProfile returns the planet package for the specified profile
func (Manifest) SetupEndpoint ¶
SetupEndpoint returns the endpoint that is used at the post-installation step
Currently only one setup endpoint is supported, so if multiple are defines in the manifest, only the first one is returned
func (Manifest) SystemDocker ¶
SystemDocker returns global docker configuration
func (Manifest) SystemSettingsChanged ¶
SystemSettingsChanged returns true if system settings in this manifest changed compared to the provided manifest.
func (*Manifest) UnmarshalJSON ¶
UnmarshalJSON implements encoding/json#Unmarshaler
type Metadata ¶
type Metadata struct { // Name is the application name Name string `json:"name,omitempty"` // ResourceVersion is the application version in semver format ResourceVersion string `json:"resourceVersion,omitempty"` // Namespace is the application namespace Namespace string `json:"namespace,omitempty"` // Repository is the repository where application package resides; // it is normally not used and always equals to "gravitational.io" Repository string `json:"repository,omitempty"` // Description is the application description Description string `json:"description,omitempty"` // Author is the application author Author string `json:"author,omitempty"` // CreatedTimestamp is a timestamp the application package was built at CreatedTimestamp time.Time `json:"createdTimestamp,omitempty"` // Hidden allows to hide the app from a list of apps visible in Ops Center Hidden bool `json:"hidden,omitempty"` // Labels is labels attached to the manifest Labels map[string]string `json:"labels,omitempty"` }
Metadata is the application metadata
func (*Metadata) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.
func (*Metadata) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MonitoringExtension ¶
type MonitoringExtension struct { // Disabled allows to disable Monitoring tab Disabled bool `json:"disabled,omitempty"` }
MonitoringExtension allows to customize monitoring feature
func (*MonitoringExtension) DeepCopy ¶
func (in *MonitoringExtension) DeepCopy() *MonitoringExtension
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringExtension.
func (*MonitoringExtension) DeepCopyInto ¶
func (in *MonitoringExtension) DeepCopyInto(out *MonitoringExtension)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Network ¶
type Network struct { // MinTransferRate is minimum required transfer rate MinTransferRate utils.TransferRate `json:"minTransferRate,omitempty"` // Ports specifies port ranges that should be available on the server Ports []Port `json:"ports,omitempty"` }
Network describes network requirements
func (*Network) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Networking ¶
type Networking struct { // Type is networking type Type string `json:"type,omitempty"` }
Networking describes networking configuration
func (*Networking) DeepCopy ¶
func (in *Networking) DeepCopy() *Networking
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Networking.
func (*Networking) DeepCopyInto ¶
func (in *Networking) DeepCopyInto(out *Networking)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Nginx ¶
type Nginx struct { // Enabled indicates whether nginx is enabled. Enabled bool `json:"enabled,omitempty"` }
Nginx represents a specific Ingress controller based on nginx.
type NodeProfile ¶
type NodeProfile struct { // Name is the profile name (role), e.g. "db" Name string `json:"name,omitempty"` // Description is a verbose profile description Description string `json:"description,omitempty"` // Requirements is a list of requirements the servers of this profile // should satisty Requirements Requirements `json:"requirements,omitempty"` // Labels is a list of labels nodes of this profile will be marked with Labels map[string]string `json:"labels,omitempty"` // Tains is a list of taints to apply to this profile Taints []corev1.Taint `json:"taints,omitempty"` // Providers contains some cloud provider specific settings Providers NodeProviders `json:"providers,omitempty"` // ExpandPolicy specifies whether nodes of this profile can // be resized ExpandPolicy string `json:"expandPolicy,omitempty"` // ServiceRole is the node's system role ("master" or "node") ServiceRole ServiceRole `json:"serviceRole,omitempty"` // SystemOptions defines optional system configuration for the node SystemOptions *SystemOptions `json:"systemOptions,omitempty"` }
NodeProfile describes a single node
func (*NodeProfile) DeepCopy ¶
func (in *NodeProfile) DeepCopy() *NodeProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeProfile.
func (*NodeProfile) DeepCopyInto ¶
func (in *NodeProfile) DeepCopyInto(out *NodeProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (NodeProfile) LabelValues ¶
func (p NodeProfile) LabelValues() []string
LabelValues returns a list of all labels in this server profile as "key=value"
func (NodeProfile) Ports ¶
func (p NodeProfile) Ports() (tcp, udp []int, err error)
Ports parses ports ranges from the node profile.
func (NodeProfile) TaintValues ¶
func (p NodeProfile) TaintValues() []string
TaintValues returns a list of all taints in this server profile as "key=value"
type NodeProfiles ¶
type NodeProfiles []NodeProfile
NodeProfiles is a list of node profiles
func (NodeProfiles) ByName ¶
func (p NodeProfiles) ByName(name string) (*NodeProfile, error)
ByName returns a node profile by its name
func (NodeProfiles) RuntimePackages ¶
func (p NodeProfiles) RuntimePackages() (deps []loc.Locator)
RuntimePackages returns the list of runtime package dependencies for all node profiles
type NodeProviderAWS ¶
type NodeProviderAWS struct { // InstanceTypes is a list of supported instance types InstanceTypes []string `json:"instanceTypes,omitempty"` }
NodeProviderAWS describes AWS-specific node settings
func (*NodeProviderAWS) DeepCopy ¶
func (in *NodeProviderAWS) DeepCopy() *NodeProviderAWS
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeProviderAWS.
func (*NodeProviderAWS) DeepCopyInto ¶
func (in *NodeProviderAWS) DeepCopyInto(out *NodeProviderAWS)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeProviders ¶
type NodeProviders struct { // AWS contains AWS-specific settings AWS NodeProviderAWS `json:"aws,omitempty"` }
NodeProviders contains provider-specific node settings
func (*NodeProviders) DeepCopy ¶
func (in *NodeProviders) DeepCopy() *NodeProviders
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeProviders.
func (*NodeProviders) DeepCopyInto ¶
func (in *NodeProviders) DeepCopyInto(out *NodeProviders)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OS ¶
type OS struct { // Name is the required OS name (e.g. "centos", "redhat") Name string `json:"name,omitempty"` // Versions is supported OS versions Versions []string `json:"versions,omitempty"` }
OS describes OS requirements
func (*OS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OS.
func (*OS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenEBS ¶
type OpenEBS struct { // Enabled indicates whether OpenEBS is enabled. Enabled bool `json:"enabled,omitempty"` }
OpenEBS represents OpenEBS configuration.
type OpsCenterExtension ¶
type OpsCenterExtension struct { // Disabled disables the OpsCenter UI Disabled bool `json:"disabled,omitempty"` }
OpsCenterExtension allows to disable/enable the Ops Center UI
type Port ¶
type Port struct { // Protocol is port protocol ("tcp", "udp") Protocol string `json:"protocol,omitempty"` // Ranges is a list of port ranges to check Ranges []string `json:"ranges,omitempty"` }
Port describes port ranges
func (*Port) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Port.
func (*Port) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PortRange ¶
type PortRange struct { // Protocol specifies the port's protocol Protocol string // From and To specify the port range From, To uint64 // Description specifies the optional port description Description string }
PortRange describes a range of cluster ports
type PortRanges ¶
type PortRanges struct { // Kubernetes lists kubernetes-specific ports Kubernetes []PortRange // Installer lists installer-specific ports Installer []PortRange // Generic lists other ports Generic []PortRange // Reserved lists ports that are reserved by default Reserved []PortRange // Vxlan defines the xvlan port Vxlan PortRange }
PortRanges arranges ports into groups
type Providers ¶
type Providers struct { // Default specifies the default provider. Default string `json:"default,omitempty"` // AWS defines AWS-specific settings AWS AWS `json:"aws,omitempty"` // Azure defines Azure-specific settings Azure Azure `json:"azure,omitempty"` // Generic defines settings for a generic provider (e.g. onprem) Generic Generic `json:"generic,omitempty"` }
Providers defines global provider-specific settings
func (*Providers) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Providers.
func (*Providers) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RAM ¶
type RAM struct { // Min is minimum required amount of RAM Min utils.Capacity `json:"min,omitempty"` // Max is maximum supported amount of RAM Max utils.Capacity `json:"max,omitempty"` }
RAM describes RAM requirements
func (*RAM) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RAM.
func (*RAM) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Requirements ¶
type Requirements struct { // CPU describes CPU requirements CPU CPU `json:"cpu,omitempty"` // RAM describes RAM requirements RAM RAM `json:"ram,omitempty"` // OS describes OS requirements OS []OS `json:"os,omitempty"` // Network describes network requirements Network Network `json:"network,omitempty"` // Volumes describes volumes requirements Volumes []Volume `json:"volumes,omitempty"` // Devices describes devices that should be created inside container Devices []Device `json:"devices,omitempty"` // CustomChecks lists additional preflight checks as inline scripts CustomChecks []CustomCheck `json:"customChecks,omitempty"` }
Requirements defines a set of requirements for a node profile
func (*Requirements) DeepCopy ¶
func (in *Requirements) DeepCopy() *Requirements
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Requirements.
func (*Requirements) DeepCopyInto ¶
func (in *Requirements) DeepCopyInto(out *Requirements)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Runtime ¶
Runtime describes the application runtime
func (*Runtime) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runtime.
func (*Runtime) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Runtime) MarshalJSON ¶
MarshalJSON marshals runtime package
func (*Runtime) UnmarshalJSON ¶
UnmarshalJSON unmarshals runtime package
type ServiceRole ¶
type ServiceRole string
ServiceRole defines the type for the node service role
const ( // ServiceRoleMaster names a label that defines a master node role ServiceRoleMaster ServiceRole = "master" // ServiceRoleNode names a label that defines a regular node role ServiceRoleNode ServiceRole = "node" // ApplicationDefaultNamespace defines the default application manifest ApplicationDefaultNamespace = "default" )
type Storage ¶
type Storage struct { // OpenEBS is the OpenEBS storage provider configuration. OpenEBS *OpenEBS `json:"openebs,omitempty"` }
Storage represents persistent storage configuration.
type SystemDependencies ¶
type SystemDependencies struct { // Runtime describes the runtime package Runtime *Dependency `json:"runtimePackage,omitempty"` }
SystemDependencies defines additional system-level package dependencies
type SystemOptions ¶
type SystemOptions struct { // ExternalService specifies additional configuration for the runtime package ExternalService // Runtime describes the runtime the application is based on Runtime *Runtime `json:"runtime,omitempty"` // Docker describes docker options Docker *Docker `json:"docker,omitempty"` // Etcd describes etcd options Etcd *Etcd `json:"etcd,omitempty"` // Kubelet describes kubelet options Kubelet *Kubelet `json:"kubelet,omitempty"` // BaseImage optionally overrides the planet image. // If specified, the image is vendored locally and translated into a runtime package. // If this is specified for a specific node profile, only nodes with the profile // will have that runtime package installed. BaseImage string `json:"baseImage,omitempty"` // Dependencies defines additional package dependencies Dependencies SystemDependencies `json:"dependencies"` // AllowPrivileged controls whether privileged containers will be allowed // in the cluster. AllowPrivileged bool `json:"allowPrivileged,omitempty"` }
SystemOptions defines various global settings
func (*SystemOptions) DeepCopy ¶
func (in *SystemOptions) DeepCopy() *SystemOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemOptions.
func (*SystemOptions) DeepCopyInto ¶
func (in *SystemOptions) DeepCopyInto(out *SystemOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SystemOptions) DockerConfig ¶
func (r *SystemOptions) DockerConfig() *Docker
DockerConfig returns docker configuration for this options object
func (*SystemOptions) EtcdArgs ¶
func (r *SystemOptions) EtcdArgs() []string
EtcdArgs returns a list of additional etcd arguments
func (*SystemOptions) KubeletArgs ¶
func (r *SystemOptions) KubeletArgs() []string
KubeletArgs returns a list of additional kubelet arguments
func (*SystemOptions) RuntimeArgs ¶
func (r *SystemOptions) RuntimeArgs() []string
RuntimeArgs returns a list of additional runtime arguments
type Volume ¶
type Volume struct { // Name is a volume short name for referencing Name string `json:"name,omitempty"` // Path is a volume path on host Path string `json:"path,omitempty"` // TargetPath is a volume mount path inside planet TargetPath string `json:"targetPath,omitempty"` // Capacity is required capacity Capacity utils.Capacity `json:"capacity,omitempty"` // Filesystems is a list of supported filesystems Filesystems []string `json:"filesystems,omitempty"` // CreateIfMissing is whether to create directory on host if it's missing CreateIfMissing *bool `json:"createIfMissing,omitempty"` // SkipIfMissing avoids mounting a directory inside a container if it's missing on host. // This flag implies CreateIfMissing == false. // The rationale for this flag is to be able to define mounts optimistically // for multiple disparate locations (subject to specific OS distributions) // and only actually create mounts for existing directories. // // For a configuration with two mounts: /path/to/dir1 (as found on OS1) // and /path/to/dir2 (as found on OS2) to some location inside the container, // installing on OS1 will use /path/to/dir1 as a mount source, // while installing on OS2 will use /path/to/dir2. SkipIfMissing *bool `json:"skipIfMissing,omitempty"` // MinTransferRate is required disk speed MinTransferRate utils.TransferRate `json:"minTransferRate,omitempty"` // Hidden applies to mounts and means that the mount is not shown to a user in installer UI Hidden bool `json:"hidden,omitempty"` // UID sets UID for a volume path on the host UID *int `json:"uid,omitempty"` // GID sets GID for a volume path on the host GID *int `json:"gid,omitempty"` // Mode sets file mode for a volume path on the host // accepts octal format Mode string `json:"mode,omitempty"` // Recursive means that all mount points inside this mount should also be mounted Recursive bool `json:"recursive,omitempty"` // SELinuxLabel specifies the SELinux label. // If left unspecified, the default.ContainerFileLabel will be used to label the directory. // If a special value SELinuxLabelNone is specified - no labeling is performed SELinuxLabel string `json:"seLinuxLabel,omitempty"` }
Volume describes a volume requirement
func DiffVolumes ¶
DiffVolumes returns a difference between old and new volume requirements.
func (*Volume) CheckAndSetDefaults ¶
CheckAndSetDefaults checks and sets defaults
func (*Volume) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Volume.
func (*Volume) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package v1 is the v1 version of the API.
|
Package v1 is the v1 version of the API. |