common

package
v0.6.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DNSDomain string

DNSDomain is the DNS domain under which all services shall be exposed.

Functions

func ExtractCluster

func ExtractCluster(host string) (cluster string, err error)

ExtractCluster extracts the cluster name from the host. The pattern shall be $cluster--$hash, where $hash = service--$namespace

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

type Permission struct {
	Name     string
	Verb     string
	APIGroup string
	Resource string
}

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

Jump to

Keyboard shortcuts

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