resources

package
v0.0.0-...-50978b4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUnleashImageRegistry is the default registry for the Unleash image
	DefaultUnleashImageRegistry = "europe-north1-docker.pkg.dev/nais-io/nais/images"
	// DefaultUnleashImageName is the default image name used for the Unleash deployment
	DefaultUnleashImageName = "unleash-v4"
	// DefaultUnleashVersion is the default version used for the Unleash deployment
	DefaultUnleashVersion = "v4.23.1"
	// DefaultUnleashPort is the default port used for the Unleash deployment
	DefaultUnleashPort = 4242
	// DefaultUnleashPortName is the default port name used for the Unleash deployment
	DefaultUnleashPortName = "http"
)

Defaults for the Unleash custom resource

View Source
const (
	EnvInitAdminAPIToken = "INIT_ADMIN_API_TOKENS"
	EnvDatabaseURL       = "DATABASE_URL"
	EnvDatabaseUser      = "DATABASE_USER"
	EnvDatabasePass      = "DATABASE_PASS"
	EnvDatabaseName      = "DATABASE_NAME"
	EnvDatabaseHost      = "DATABASE_HOST"
	EnvDatabasePort      = "DATABASE_PORT"
	EnvDatabaseSSL       = "DATABASE_SSL"
)

Variables

This section is empty.

Functions

func ApiTokenSecret

func ApiTokenSecret(unleash UnleashInstance, token *unleashv1.ApiToken, apiToken *unleashclient.ApiToken) *corev1.Secret

func DeploymentForUnleash

func DeploymentForUnleash(unleash *unleashv1.Unleash, scheme *runtime.Scheme) (*appsv1.Deployment, error)

func GenerateAdminKey

func GenerateAdminKey() (string, error)

func ImageForUnleash

func ImageForUnleash(unleash *unleashv1.Unleash) string

ImageForUnleash gets the Operand image which is managed by this controller from the UNLEASH_IMAGE environment variable defined in the config/manager/manager.yaml

func IngressForUnleash

func IngressForUnleash(unleash *unleashv1.Unleash, config *unleashv1.UnleashIngressConfig, nameSuffix string, scheme *runtime.Scheme) (*networkingv1.Ingress, error)

IngressForUnleash returns the Ingress for Unleash Deployment

func InstanceSecretForUnleash

func InstanceSecretForUnleash(unleash *unleashv1.Unleash, scheme *runtime.Scheme, adminKey string) (*corev1.Secret, error)

Creates a secret that is managed by way of controller reference

func NetworkPolicyForUnleash

func NetworkPolicyForUnleash(unleash *unleashv1.Unleash, scheme *runtime.Scheme, namespace string) (*networkingv1.NetworkPolicy, error)

NetworkPolicyForUnleash returns the NetworkPolicy for the Unleash Deployment

func OperatorSecretForUnleash

func OperatorSecretForUnleash(name, secretName, namespace, adminKey string) *corev1.Secret

Creates a secret that is not managed, i.e. without a controllerReference

func RemoteunleashInstance

func RemoteunleashInstance(name, url, namespace, secretName, secretNamespace string) *unleashv1.RemoteUnleash

func RemoteunleashInstances

func RemoteunleashInstances(name, url string, namespaces []string, secretName, secretNamespace string) []*unleashv1.RemoteUnleash

func ServiceAccountForUnleash

func ServiceAccountForUnleash(unleash *unleashv1.Unleash, scheme *runtime.Scheme) (*corev1.ServiceAccount, error)

func ServiceForUnleash

func ServiceForUnleash(unleash *unleashv1.Unleash, scheme *runtime.Scheme) (*corev1.Service, error)

func ServiceMonitorForUnleash

func ServiceMonitorForUnleash(unleash *unleashv1.Unleash, scheme *runtime.Scheme) (*monitoringv1.ServiceMonitor, error)

Types

type UnleashInstance

type UnleashInstance interface {
	IsReady() bool
	URL() string
	AdminToken(context.Context, client.Client, string) ([]byte, error)
	ApiClient(context.Context, client.Client, string) (*unleashclient.Client, error)
}

type ValidationError

type ValidationError struct {
	// contains filtered or unexported fields
}

func (ValidationError) Error

func (e ValidationError) Error() string

Jump to

Keyboard shortcuts

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