compute

package
v0.0.0-...-fa603ae Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseNodeAffinityLabels

func ParseNodeAffinityLabels(labels []string) ([]*compute.SchedulingNodeAffinity, []*computeBeta.SchedulingNodeAffinity, error)

ParseNodeAffinityLabels parses sole tenant affinities labels - array of strings with node affinity label info. Each label is of the following format: <key>,<operator>,<value>,<value2>... where <operator> can be one of: IN, NOT. For example: workload,IN,prod,test is a label with key 'workload' and values 'prod' and 'test'

Types

type MetadataGCE

type MetadataGCE struct{}

MetadataGCE implements MetadataGCEInterface

func (*MetadataGCE) OnGCE

func (m *MetadataGCE) OnGCE() bool

OnGCE reports whether this process is running on Google Compute Engine.

func (*MetadataGCE) ProjectID

func (m *MetadataGCE) ProjectID() (string, error)

ProjectID returns the current instance's project ID string.

func (*MetadataGCE) Zone

func (m *MetadataGCE) Zone() (string, error)

Zone returns the current VM's zone, such as "us-central1-b".

type ZoneValidator

type ZoneValidator struct {
	ComputeClient daisyCompute.Client
}

ZoneValidator is responsible for validating zone name corresponds to a valid zone in a given project

func (*ZoneValidator) ZoneValid

func (zv *ZoneValidator) ZoneValid(project string, zone string) error

ZoneValid validates zone is valid in the given project

Jump to

Keyboard shortcuts

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