Documentation ¶
Index ¶
- Constants
- func ApplicationLatestAvailableRelease(ctx context.Context, client *api.Client, app types.NamespacedName) (*apps.Release, error)
- func ApplicationLatestRelease(ctx context.Context, client *api.Client, app types.NamespacedName) (*apps.Release, error)
- func EnvVarByName(envVars apps.EnvVars, name string) *apps.EnvVar
- func EnvVarToString(envs apps.EnvVars) string
- func EnvVarsFromMap(env map[string]string) apps.EnvVars
- func GitAuthSecretName(app *apps.Application) string
- func OrderReleaseList(releaseList *apps.ReleaseList, reverse bool)
- func UnverifiedAppHosts(app *apps.Application) []string
- func UpdateEnvVars(oldEnvs []apps.EnvVar, newEnvs map[string]string, toDelete []string) apps.EnvVars
- func ValidatePEM(content string) (*string, error)
- func VerifiedAppHosts(app *apps.Application) []string
- type BasicAuth
- type DNSDetail
- type GitAuth
Constants ¶
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" NoneText = "<none>" )
const ( // BasicAuth key constants which represent the keys used in basic auth // secrets BasicAuthUsernameKey = "basicAuthUsername" BasicAuthPasswordKey = "basicAuthPassword" )
Variables ¶
This section is empty.
Functions ¶
func ApplicationLatestAvailableRelease ¶ added in v1.8.0
func ApplicationLatestRelease ¶ added in v1.8.1
func ApplicationLatestRelease(ctx context.Context, client *api.Client, app types.NamespacedName) (*apps.Release, error)
ApplicationLatestRelease returns the latest release of an app, prioritizing available releases and if no available release is found just the latest progressing or failed release.
func EnvVarByName ¶ added in v1.2.3
func EnvVarToString ¶
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 OrderReleaseList ¶ added in v1.7.0
func OrderReleaseList(releaseList *apps.ReleaseList, reverse bool)
OrderReleaseList orders the given list of releases first by name and then by creation timestamp latest to oldest. Reverse reverses the order by creation timestamp to oldest to latest.
func UnverifiedAppHosts ¶
func UnverifiedAppHosts(app *apps.Application) []string
func UpdateEnvVars ¶ added in v1.2.3
func ValidatePEM ¶ added in v1.3.0
ValidatePEM validates if the passed content is in valid PEM format, errors out if the content is empty
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
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 ¶
func GitAuthFromApp ¶ added in v1.4.0
func (GitAuth) HasBasicAuth ¶ added in v1.3.0
func (GitAuth) HasPrivateKey ¶ added in v1.3.0
func (GitAuth) UpdateSecret ¶
UpdateSecret replaces the data of the secret with the data from GitAuth. Only replaces fields which are non-nil.