Documentation
¶
Index ¶
- Variables
- func EnsureAnnotation(obj client.Object, key, value string)
- func ExtractCluster(host string) (cluster string, err error)
- func GetPluginDefinitionSpec(ctx context.Context, c client.Client, ...) (*greenhousev1alpha1.PluginDefinitionSpec, error)
- func URLForExposedServiceInPlugin(serviceName string, plugin *greenhousev1alpha1.Plugin) string
- type Permission
- type RegistryMirror
- type RegistryMirrorConfig
Constants ¶
This section is empty.
Variables ¶
var DNSDomain string
DNSDomain is the DNS domain under which all services shall be exposed.
Functions ¶
func EnsureAnnotation ¶ added in v0.7.0
EnsureAnnotation sets the annotation key to value on the object. if the value is an empty string, the annotation is removed.
func ExtractCluster ¶
ExtractCluster extracts the cluster name from the host. The pattern shall be $cluster--$hash, where $hash = service--$namespace
func GetPluginDefinitionSpec ¶ added in v0.7.0
func GetPluginDefinitionSpec(ctx context.Context, c client.Client, pluginDefinitionRef greenhousev1alpha1.PluginDefinitionReference, resourceNamespace string) (*greenhousev1alpha1.PluginDefinitionSpec, error)
GetPluginDefinitionSpec resolves the (Cluster-)PluginDefinition reference and returns shared PluginDefinitionSpec
func URLForExposedServiceInPlugin ¶
func URLForExposedServiceInPlugin(serviceName string, plugin *greenhousev1alpha1.Plugin) string
URLForExposedServiceInPlugin returns the URL that shall be used to expose a service centrally via Greenhouse. The pattern shall be $https://$cluster--$hash.$organisation.$basedomain, where $hash = $service--$namespace We know $cluster is no longer than 40 characters and does not contain "--"
Types ¶
type Permission ¶ added in v0.6.0
Permission defines a Kubernetes action on a resource.
func CheckClientClusterPermission ¶ added in v0.6.0
func CheckClientClusterPermission(ctx context.Context, kubeClient client.Client, user, namespace string) (missingPermission []Permission)
CheckClientClusterPermission returns names of missing client-cluster permissions.
func CheckGreenhousePermission ¶ added in v0.6.0
func CheckGreenhousePermission(ctx context.Context, kubeClient client.Client, user, namespace string) (missingPermission []Permission)
CheckGreenhousePermission returns names of missing greenhouse permissions for the user.
func (Permission) String ¶ added in v0.6.0
func (p Permission) String() string
type RegistryMirror ¶ added in v0.7.0
type RegistryMirror struct {
BaseDomain string `yaml:"baseDomain"`
SubPath string `yaml:"subPath"`
}
RegistryMirror represents a single registry mirror configuration.
type RegistryMirrorConfig ¶ added in v0.7.0
type RegistryMirrorConfig struct {
PrimaryMirror string `yaml:"primaryMirror"`
RegistryMirrors map[string]RegistryMirror `yaml:"registryMirrors"`
}
RegistryMirrorConfig represents the registry mirror configuration structure.
func GetRegistryMirrorConfig ¶ added in v0.7.0
func GetRegistryMirrorConfig(ctx context.Context, k8sClient client.Reader, orgName string) (*RegistryMirrorConfig, error)
GetRegistryMirrorConfig retrieves and parses the registry mirror configuration from the Organization's ConfigMap. Registry mirrors redirect image pulls from original registries to mirror registries.