Documentation ¶
Index ¶
- func Migrate(db *gorm.DB, logger logrus.FieldLogger) error
- type CRI
- type CloudNetworkProvider
- type Config
- type EC2PKEClusterModel
- type ExtraArg
- type ExtraArgs
- type Host
- type Hosts
- type KubeADM
- type Kubernetes
- type Labels
- type Model
- type Network
- type NetworkCloudProviderConfigAmazon
- type NetworkProvider
- type NodePool
- type NodePoolProvider
- type NodePoolProviderConfigAmazon
- type NodePools
- type RBAC
- type Role
- type Roles
- type Runtime
- type Subnet
- type Subnets
- type Tags
- type Taint
- type Taints
- type Zone
- type Zones
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CRI ¶
type CRI struct { Model Runtime Runtime `yaml:"runtime"` RuntimeConfig Config `yaml:"runtimeConfig" gorm:"type:text"` }
CRI is the schema for the DB.
type CloudNetworkProvider ¶
type CloudNetworkProvider string
NetworkProvider is the schema for the DB.
const (
CNPAmazon CloudNetworkProvider = "ec2" // Amazon EC2 network provider.
)
func (*CloudNetworkProvider) Scan ¶
func (n *CloudNetworkProvider) Scan(src interface{}) error
Scan implements the sql.Scanner interface
type Config ¶
type Config map[string]interface{}
type EC2PKEClusterModel ¶
type EC2PKEClusterModel struct { ID uint `gorm:"primary_key"` Cluster clustermodel.ClusterModel `gorm:"foreignkey:ClusterID"` ClusterID uint MasterInstanceType string MasterImage string CurrentWorkflowID string Network Network `gorm:"foreignkey:ClusterID;association_foreignkey:ClusterID" yaml:"network"` NodePools NodePools `gorm:"foreignkey:ClusterID;association_foreignkey:ClusterID" yaml:"nodepools"` Kubernetes Kubernetes `gorm:"foreignkey:ClusterID;association_foreignkey:ClusterID" yaml:"kubernetes"` KubeADM KubeADM `gorm:"foreignkey:ClusterID;association_foreignkey:ClusterID" yaml:"kubeadm"` CRI CRI `gorm:"foreignkey:ClusterID;association_foreignkey:ClusterID" yaml:"cri"` }
func (*EC2PKEClusterModel) BeforeDelete ¶
func (m *EC2PKEClusterModel) BeforeDelete(tx *gorm.DB) error
BeforeDelete callback / hook to delete related entries from the database
func (EC2PKEClusterModel) TableName ¶
func (EC2PKEClusterModel) TableName() string
TableName changes the default table name.
type ExtraArg ¶
type ExtraArg string
ExtraArg is the schema for the DB.
type Host ¶
type Host struct { ID uint `gorm:"primary_key"` CreatedAt time.Time CreatedBy uint NodePoolID uint `gorm:"name:nodepool_id;foreignkey:NodePoolID"` Name string `yaml:"name"` PrivateIP string `yaml:"privateIP"` NetworkInterface string `yaml:"networkInterface"` Roles Roles `yaml:"roles" gorm:"type:varchar(255)"` Labels Labels `yaml:"labels" gorm:"type:varchar(255)"` Taints Taints `yaml:"taint" gorm:"type:varchar(255)"` }
type Kubernetes ¶
type Kubernetes struct { Model Version string `yaml:"version"` RBAC RBAC `yaml:"rbac" gorm:"-"` RBACEnabled bool `gorm:"column:rbac_enabled"` }
Kubernetes is the schema for the DB.
func (*Kubernetes) BeforeCreate ¶
func (k *Kubernetes) BeforeCreate(scope *gorm.Scope) error
BeforeCreate marshals fields.
func (*Kubernetes) BeforeUpdate ¶
func (k *Kubernetes) BeforeUpdate(scope *gorm.Scope) error
func (Kubernetes) String ¶
func (k Kubernetes) String() string
func (Kubernetes) TableName ¶
func (Kubernetes) TableName() string
TableName changes the default table name.
type Network ¶
type Network struct { Model ServiceCIDR string `yaml:"serviceCIDR" gorm:"column:service_cidr"` PodCIDR string `yaml:"podCIDR" gorm:"column:pod_cidr"` Provider NetworkProvider `yaml:"provider"` APIServerAddress string `yaml:"apiServerAddress"` CloudProvider CloudNetworkProvider `yaml:"cloudProvider" gorm:"column:cloud_provider"` CloudProviderConfig Config `yaml:"cloudProviderConfig" gorm:"column:cloud_provider_config;type:text"` }
Network is the schema for the DB.
type NetworkProvider ¶
type NetworkProvider string
NetworkProvider is the schema for the DB.
func (*NetworkProvider) Scan ¶
func (n *NetworkProvider) Scan(src interface{}) error
Scan implements the sql.Scanner interface
type NodePool ¶
type NodePool struct { NodePoolID uint `gorm:"primary_key;name:id"` CreatedAt time.Time CreatedBy uint ClusterID uint `gorm:"foreignkey:ClusterIDl;association_foreignkey:ClusterID;unique_index:idx_topology_nodepools_cluster_id_name"` Name string `yaml:"name" gorm:"unique_index:idx_topology_nodepools_cluster_id_name"` Roles Roles `yaml:"roles" gorm:"type:varchar(255)"` Hosts Hosts `yaml:"hosts" gorm:"foreignkey:NodePoolID"` Provider NodePoolProvider `yaml:"provider"` ProviderConfig Config `yaml:"providerConfig" gorm:"column:provider_config;type:text"` Labels map[string]string `yaml:"labels" gorm:"-"` Autoscaling bool `yaml:"autoscaling" gorm:"default:false"` }
type NodePoolProvider ¶
type NodePoolProvider string
const (
NPPAmazon NodePoolProvider = "amazon"
)
func (*NodePoolProvider) Scan ¶
func (n *NodePoolProvider) Scan(src interface{}) error
Scan implements the sql.Scanner interface
type NodePoolProviderConfigAmazon ¶
type NodePoolProviderConfigAmazon struct { AutoScalingGroup struct { Name string `yaml:"name"` Image string `yaml:"image"` VolumeSize int `yaml:"volumeSize"` Zones Zones `yaml:"zones"` InstanceType string `yaml:"instanceType"` LaunchConfigurationName string `yaml:"launchConfigurationName"` LaunchTemplate string `yaml:"launchTemplate"` VPCID string `yaml:"vpcID"` SecurityGroupID string `yaml:"securityGroupID"` Subnets Subnets `yaml:"subnets"` Tags Tags `yaml:"tags"` Size struct { Min int `yaml:"min"` Max int `yaml:"max"` Desired int `yaml:"desired"` } `yaml:"size"` SpotPrice string `yaml:"spotPrice"` } `yaml:"autoScalingGroup"` }
type Runtime ¶
type Runtime string
Runtime is the schema for the DB.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.