Documentation ¶
Overview ¶
Package deployer implements the kubetest2 GKE deployer
Index ¶
- Constants
- Variables
- func New(opts types.Options) (types.Deployer, *pflag.FlagSet)
- type Deployer
- func (d *Deployer) Build() error
- func (d *Deployer) CleanupNetworkFirewalls(hostProject, network string) (int, error)
- func (d *Deployer) CreateCluster(project string, cluster cluster, subNetworkArgs []string, locationArg string) error
- func (d *Deployer) CreateClusters() error
- func (d *Deployer) CreateNetwork() error
- func (d *Deployer) CreateSubnets() error
- func (d *Deployer) DeleteCluster(project, loc string, cluster cluster)
- func (d *Deployer) DeleteClusters(retryCount int)
- func (d *Deployer) DeleteNetwork() error
- func (d *Deployer) DeleteSubnets(retryCount int) error
- func (d *Deployer) Down() error
- func (d *Deployer) DumpClusterLogs() error
- func (d *Deployer) EnsureFirewallRules() error
- func (d *Deployer) GetInstanceGroups() error
- func (d *Deployer) Init() error
- func (d *Deployer) Initialize() error
- func (d *Deployer) IsUp() (up bool, err error)
- func (d *Deployer) Kubeconfig() (string, error)
- func (d *Deployer) PostTest(testErr error) error
- func (d *Deployer) PrepareGcpIfNeeded(projectID string) error
- func (d *Deployer) Provider() string
- func (d *Deployer) SetupNetwork() error
- func (d *Deployer) TeardownNetwork() error
- func (d *Deployer) TestSetup() error
- func (d *Deployer) Up() error
- func (d *Deployer) VerifyBuildFlags() error
- func (d *Deployer) VerifyDownFlags() error
- func (d *Deployer) VerifyLocationFlags() error
- func (d *Deployer) VerifyNetworkFlags() error
- func (d *Deployer) VerifyUpFlags() error
- func (d *Deployer) Version() string
Constants ¶
const Name = "gke"
Name is the name of the deployer
Variables ¶
var GitTag string
Functions ¶
Types ¶
type Deployer ¶
type Deployer struct { // generic parts Kubetest2CommonOptions types.Options *options.BuildOptions *options.CommonOptions *options.ProjectOptions *options.NetworkOptions *options.ClusterOptions // contains filtered or unexported fields }
func NewDeployer ¶
NewDeployer returns a deployer object with fields that are not flag controlled
func (*Deployer) CleanupNetworkFirewalls ¶
Ensure that all firewall-rules are deleted from specific network.
func (*Deployer) CreateCluster ¶
func (*Deployer) CreateClusters ¶
func (*Deployer) CreateNetwork ¶
func (*Deployer) CreateSubnets ¶
func (*Deployer) DeleteCluster ¶
func (*Deployer) DeleteClusters ¶
func (*Deployer) DeleteNetwork ¶
func (*Deployer) DeleteSubnets ¶
func (*Deployer) DumpClusterLogs ¶
DumpClusterLogs for GKE generates a small script that wraps log-dump.sh with the appropriate shell-fu to get the cluster dumped.
TODO(RonWeber): This whole path is really gross, but this seemed the least gross hack to get this done.
TODO(RonWeber): Make this work with multizonal and regional clusters.
func (*Deployer) EnsureFirewallRules ¶
func (*Deployer) GetInstanceGroups ¶
func (*Deployer) Initialize ¶
Initialize should only be called by init(), behind a sync.Once
func (*Deployer) Kubeconfig ¶
Kubeconfig returns a path to a kubeconfig file for the cluster in a temp directory, creating one if one does not exist. It also sets the KUBECONFIG environment variable appropriately.
func (*Deployer) PostTest ¶
PostTest will check if there's any error in the test. If there's no error in the test, and the --update-latest-green-marker is set to true, this method will stage the build marker to the GCS bucket.
func (*Deployer) PrepareGcpIfNeeded ¶
func (*Deployer) SetupNetwork ¶
func (*Deployer) TeardownNetwork ¶
func (*Deployer) VerifyBuildFlags ¶
func (*Deployer) VerifyDownFlags ¶
VerifyDownFlags validates flags for down phase.
func (*Deployer) VerifyLocationFlags ¶
func (*Deployer) VerifyNetworkFlags ¶
func (*Deployer) VerifyUpFlags ¶
verifyCommonFlags validates flags for up phase.