resolve

package
v0.0.327 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GKEMetadataEndpoint default Google metadata endpoint.
	// See https://cloud.google.com/compute/docs/storing-retrieving-metadata#querying
	GKEMetadataEndpoint = "http://metadata.google.internal/computeMetadata/v1/"

	// GKEPathProjectID metadata endpoint path to the project ID string
	GKEPathProjectID = "project/project-id"

	// GKEPathProjectNumber metadata endpoint path to the project number
	GKEPathProjectNumber = "project/numeric-project-id"

	// GKEPathClusterName metadata endpoint path to the cluster name
	GKEPathClusterName = "instance/attributes/cluster-name"

	// GKEPathClusterLocation metadata endpoint path to the cluster location
	GKEPathClusterLocation = "instance/attributes/cluster-location"
)

Variables

This section is empty.

Functions

func IsInCluster

func IsInCluster() bool

IsInCluster tells if we are running incluster

Types

type GKEConfig

type GKEConfig struct {
	MetadataEndpoint string
}

GKEConfig the GKE specific configuration

type Options

type Options struct {
	Dir              string
	NoCommit         bool
	NoInClusterCheck bool
	CommandRunner    cmdrunner.CommandRunner
	Namespace        string
	SecretName       string
	GKEConfig        GKEConfig
	KubeClient       kubernetes.Interface
	// contains filtered or unexported fields
}

Options the options for the command

func NewCmdRequirementsResolve

func NewCmdRequirementsResolve() (*cobra.Command, *Options)

NewCmdRequirementsResolve creates a command object for the command

func (*Options) GitClient

func (o *Options) GitClient() gitclient.Interface

func (*Options) ResolveGKE

func (o *Options) ResolveGKE() error

ResolveGKE resolves any missing GKE metadata

func (*Options) Run

func (o *Options) Run() error

Run implements the command

Jump to

Keyboard shortcuts

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