gke

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCommand

func ExecCommand(ctx context.Context, infra Outputs, pod, container string, cmd []string, opts *k8s.ExecOptions) error

func GetPodName

func GetPodName(ctx context.Context, cfg *rest.Config, infra Outputs, pod string) (string, error)

GetPodName finds a pod based on the current infrastructure and an optional pod name If pod name is left blank, this will find either the only active pod or first active pod in a replica set

func NewLogStreamer

func NewLogStreamer(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (admin.LogStreamer, error)

func NewRemoter

func NewRemoter(osWriters logging.OsWriters, nsConfig api.Config, appDetails app.Details) (admin.Remoter, error)

Types

type ClusterNamespaceOutputs

type ClusterNamespaceOutputs struct {
	ClusterEndpoint      string `ns:"cluster_endpoint"`
	ClusterCACertificate string `ns:"cluster_ca_certificate"`
}

func (ClusterNamespaceOutputs) ClusterInfo

type ClusterOutputs

type ClusterOutputs struct {
	ClusterEndpoint      string `ns:"cluster_endpoint"`
	ClusterCACertificate string `ns:"cluster_ca_certificate"`
}

func (ClusterOutputs) ClusterInfo

func (o ClusterOutputs) ClusterInfo() (clientcmdapi.Cluster, error)

type Outputs

type Outputs struct {
	ServiceNamespace  string             `ns:"service_namespace"`
	ServiceName       string             `ns:"service_name"`
	ImageRepoUrl      docker.ImageUrl    `ns:"image_repo_url,optional"`
	Deployer          gcp.ServiceAccount `ns:"deployer"`
	MainContainerName string             `ns:"main_container_name,optional"`

	ClusterNamespace ClusterNamespaceOutputs `ns:",connectionContract:cluster-namespace/gcp/k8s:gke"`
}

type Remoter

type Remoter struct {
	OsWriters logging.OsWriters
	Details   app.Details
	Infra     Outputs
}

func (Remoter) Exec

func (r Remoter) Exec(ctx context.Context, options admin.RemoteOptions, cmd []string) error

func (Remoter) Ssh

func (r Remoter) Ssh(ctx context.Context, options admin.RemoteOptions) error

Jump to

Keyboard shortcuts

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