setup

package
v0.0.0-...-3ac7d67 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateRobot

func CreateOrUpdateRobot(ctx context.Context, client dynamic.ResourceInterface, robotName, robotType, project string, labels map[string]string, annotations map[string]string) error

CreateOrUpdateRobot adds a new robot-cr or updates an existing one.

func GetRobotName

func GetRobotName(ctx context.Context, f util.Factory, client dynamic.ResourceInterface, robotName string) (string, error)

GetRobotName returns a valid robot name or an error. If the robotName parameter is non-empty, it checks if it is valid. If it is an empty string, the user is prompted to select a robot.

func PublishCredentialsToCloud

func PublishCredentialsToCloud(client *http.Client, auth *robotauth.RobotAuth, retries uint64) error

PublishCredentialsToCloud registers a public-key in the cloud under the ID given as part of the RobotAuth struct.

func WaitForDNS

func WaitForDNS(domain string, retries uint64) error

WaitForDNS manually resolves the domain name with retries to give a better error in the case of failure. This is useful to catch errors during first interaction with the cluster and cloud-project,

func WaitForService

func WaitForService(client *http.Client, url string, retries uint64) error

WaitForService tests a given cloud endpoint with a HEAD request a few times. This lets us wait for the service to be available or error with a better message.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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