Documentation ¶
Index ¶
- func GetMountPoint(volumeId string) string
- func GetVolumeId(i int) string
- func MarshalVolumeMetadata(v []VolumeMetadata) (string, error)
- type EtcdMemberSpec
- type VSphereAPITarget
- type VSphereCloud
- func (c *VSphereCloud) CreateLinkClonedVm(vmName, vmImage *string) (string, error)
- func (c *VSphereCloud) DNS() (dnsprovider.Interface, error)
- func (c *VSphereCloud) DeleteCloudInitISO(vm *string) error
- func (c *VSphereCloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error
- func (c *VSphereCloud) DeleteInstance(i *cloudinstances.CloudInstanceGroupMember) error
- func (c *VSphereCloud) FindVMUUID(vm *string) (string, error)
- func (c *VSphereCloud) FindVPCInfo(id string) (*fi.VPCInfo, error)
- func (c *VSphereCloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, ...) (map[string]*cloudinstances.CloudInstanceGroup, error)
- func (c *VSphereCloud) GetVirtualMachines(args []string) ([]*object.VirtualMachine, error)
- func (c *VSphereCloud) PowerOn(vm string) error
- func (c *VSphereCloud) ProviderID() kops.CloudProviderID
- func (c *VSphereCloud) UploadAndAttachISO(vm *string, isoFile string) error
- type VolumeMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMountPoint ¶
* GetMountPoint will return the mount point where the volume is expected to be mounted. * This path would be /mnt/master-<volumeId>, eg: /mnt/master-01.
func GetVolumeId ¶
GetVolumeId returns given integer value to VolumeId format, eg: for i=2, volume id="02".
func MarshalVolumeMetadata ¶
func MarshalVolumeMetadata(v []VolumeMetadata) (string, error)
MarshalVolumeMetadata marshals given VolumeMetadata to json string.
Types ¶
type EtcdMemberSpec ¶
type EtcdMemberSpec struct { // Name is the name of the member within the etcd cluster Name string `json:"name,omitempty"` InstanceGroup string `json:"instanceGroup,omitempty"` }
EtcdMemberSpec is the specification of members of etcd cluster, to be associated with this volume.
type VSphereAPITarget ¶
type VSphereAPITarget struct {
Cloud *VSphereCloud
}
VSphereAPITarget represents target for vSphere, where cluster deployment with take place.
func NewVSphereAPITarget ¶
func NewVSphereAPITarget(cloud *VSphereCloud) *VSphereAPITarget
NewVSphereAPITarget returns VSphereAPITarget instance for vSphere cloud provider.
func (*VSphereAPITarget) Finish ¶
func (t *VSphereAPITarget) Finish(taskMap map[string]fi.Task) error
Finish is no-op for vSphere cloud.
func (*VSphereAPITarget) ProcessDeletions ¶
func (t *VSphereAPITarget) ProcessDeletions() bool
ProcessDeletions is no-op for vSphere cloud.
type VSphereCloud ¶
type VSphereCloud struct { Server string Datacenter string Cluster string Username string Password string Client *govmomi.Client CoreDNSServer string DNSZone string }
VSphereCloud represents a vSphere cloud instance.
func NewVSphereCloud ¶
func NewVSphereCloud(spec *kops.ClusterSpec) (*VSphereCloud, error)
NewVSphereCloud returns VSphereCloud instance for given ClusterSpec.
func (*VSphereCloud) CreateLinkClonedVm ¶
func (c *VSphereCloud) CreateLinkClonedVm(vmName, vmImage *string) (string, error)
CreateLinkClonedVm creates linked clone of given VM image. This method will perform all necessary steps, like creating snapshot if it's not already present.
func (*VSphereCloud) DNS ¶
func (c *VSphereCloud) DNS() (dnsprovider.Interface, error)
DNS returns dnsprovider interface for this vSphere cloud.
func (*VSphereCloud) DeleteCloudInitISO ¶
func (c *VSphereCloud) DeleteCloudInitISO(vm *string) error
func (*VSphereCloud) DeleteGroup ¶
func (c *VSphereCloud) DeleteGroup(g *cloudinstances.CloudInstanceGroup) error
DeleteGroup is not implemented yet, is a func that needs to delete a vSphere instance group.
func (*VSphereCloud) DeleteInstance ¶
func (c *VSphereCloud) DeleteInstance(i *cloudinstances.CloudInstanceGroupMember) error
DeleteInstance is not implemented yet, is func needs to delete a vSphereCloud instance.
func (*VSphereCloud) FindVMUUID ¶
func (c *VSphereCloud) FindVMUUID(vm *string) (string, error)
Returns VM's instance uuid
func (*VSphereCloud) FindVPCInfo ¶
func (c *VSphereCloud) FindVPCInfo(id string) (*fi.VPCInfo, error)
FindVPCInfo doesn't perform any operation for now. No VPC is present for vSphere.
func (*VSphereCloud) GetCloudGroups ¶
func (c *VSphereCloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error)
GetCloudGroups is not implemented yet, that needs to return the instances and groups that back a kops cluster.
func (*VSphereCloud) GetVirtualMachines ¶
func (c *VSphereCloud) GetVirtualMachines(args []string) ([]*object.VirtualMachine, error)
GetVirtualMachines returns the VMs where the VM name matches the strings in the argument
func (*VSphereCloud) PowerOn ¶
func (c *VSphereCloud) PowerOn(vm string) error
PowerOn powers on given VM.
func (*VSphereCloud) ProviderID ¶
func (c *VSphereCloud) ProviderID() kops.CloudProviderID
ProviderID returns ID for vSphere type cloud provider.
func (*VSphereCloud) UploadAndAttachISO ¶
func (c *VSphereCloud) UploadAndAttachISO(vm *string, isoFile string) error
UploadAndAttachISO uploads the ISO to datastore and attaches it to the given VM.
type VolumeMetadata ¶
type VolumeMetadata struct { // EtcdClusterName is the name of the etcd cluster (main, events etc) EtcdClusterName string `json:"etcdClusterName,omitempty"` // EtcdNodeName is the name of a node in etcd cluster for which this volume will be used EtcdNodeName string `json:"etcdNodeName,omitempty"` // EtcdMember stores the configurations for each member of the cluster Members []EtcdMemberSpec `json:"etcdMembers,omitempty"` // Volume id VolumeId string `json:"volumeId,omitempty"` }
VolumeMetadata represents metadata for vSphere volumes. Unlike aws and gce clouds, vSphere doesn't support tags for volumes/vmdks yet. This metadata is used to pass the information that aws and gce clouds associate with volumes using tags.
func UnmarshalVolumeMetadata ¶
func UnmarshalVolumeMetadata(text string) ([]VolumeMetadata, error)
UnmarshalVolumeMetadata unmarshals given json string into VolumeMetadata.