util

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationNameLabel = "application.apps.nine.ch/name"
	ManagedByAnnotation  = "app.kubernetes.io/managed-by"
	NctlName             = "nctl"
	PrivateKeySecretKey  = "privatekey"
	UsernameSecretKey    = "username"
	PasswordSecretKey    = "password"

	// DNSSetupURL redirects to the proper deplo.io docs entry about
	// how to setup custom hosts
	DNSSetupURL = "https://docs.nine.ch/a/myshbw3EY1"
)
View Source
const (
	// BasicAuth key constants which represent the keys used in basic auth
	// secrets
	BasicAuthUsernameKey = "basicAuthUsername"
	BasicAuthPasswordKey = "basicAuthPassword"
)

Variables

This section is empty.

Functions

func EnvVarToString

func EnvVarToString(envs apps.EnvVars) string

func EnvVarsFromMap

func EnvVarsFromMap(env map[string]string) apps.EnvVars

func GitAuthSecretName

func GitAuthSecretName(app *apps.Application) string

GitAuthSecretName returns the name of the secret which contains the git credentials for the given applications git source

func UnverifiedAppHosts

func UnverifiedAppHosts(app *apps.Application) []string

func VerifiedAppHosts

func VerifiedAppHosts(app *apps.Application) []string

Types

type BasicAuth added in v1.1.1

type BasicAuth struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
}

BasicAuth contains credentials for basic authentication

func NewBasicAuthFromSecret added in v1.1.1

func NewBasicAuthFromSecret(ctx context.Context, secret meta.Reference, client *api.Client) (*BasicAuth, error)

NewBasicAuthFromSecret returns a basic auth resource filled with data from a secret.

type DNSDetail added in v1.2.2

type DNSDetail struct {
	Application string `yaml:"application"`
	Project     string `yaml:"project"`
	TXTRecord   string `yaml:"txtRecord"`
	CNAMETarget string `yaml:"cnameTarget"`
}

func GatherDNSDetails added in v1.2.2

func GatherDNSDetails(items []apps.Application) []DNSDetail

GatherDNSDetails retrieves the DNS details of all given applications

type GitAuth

type GitAuth struct {
	Username      *string
	Password      *string
	SSHPrivateKey *string
}

func (GitAuth) Enabled

func (git GitAuth) Enabled() bool

func (GitAuth) Secret

func (git GitAuth) Secret(app *apps.Application) *corev1.Secret

func (GitAuth) UpdateSecret

func (git GitAuth) UpdateSecret(secret *corev1.Secret)

UpdateSecret replaces the data of the secret with the data from GitAuth. Only replaces fields which are non-nil.

func (GitAuth) Valid added in v1.2.1

func (git GitAuth) Valid() error

Jump to

Keyboard shortcuts

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