server

package
v0.10.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MPL-2.0 Imports: 41 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FluxNamespacePartOf = "flux"
)

Variables

View Source
var (
	KustomizeNameKey      = fmt.Sprintf("%s/name", kustomizev1.GroupVersion.Group)
	KustomizeNamespaceKey = fmt.Sprintf("%s/namespace", kustomizev1.GroupVersion.Group)
	HelmNameKey           = fmt.Sprintf("%s/name", helmv2.GroupVersion.Group)
	HelmNamespaceKey      = fmt.Sprintf("%s/namespace", helmv2.GroupVersion.Group)

	// ErrFluxNamespaceNotFound no flux namespace found
	ErrFluxNamespaceNotFound = errors.New("could not find flux namespace in cluster")
	// ErrListingDeployments no deployments found
	ErrListingDeployments = errors.New("could not list deployments in namespace")
)
View Source
var (
	Version   = "v0.0.0"
	GitCommit = ""
	Branch    = ""
	Buildtime = ""
)

Variables that we'll set @ build time

Functions

func GetTenant added in v0.9.4

func GetTenant(namespace, clusterName string, clusterUserNamespaces map[string][]v1.Namespace) string

func Hydrate

func Hydrate(ctx context.Context, mux *runtime.ServeMux, cfg CoreServerConfig) error

func NewCoreServer

func NewCoreServer(cfg CoreServerConfig) (pb.CoreServer, error)

Types

type CoreServerConfig

type CoreServerConfig struct {
	RestCfg *rest.Config

	NSAccess        nsaccess.Checker
	ClustersManager clustersmngr.ClustersManager
	PrimaryKinds    *PrimaryKinds
	// contains filtered or unexported fields
}

func NewCoreConfig

func NewCoreConfig(log logr.Logger, cfg *rest.Config, clusterName string, clustersManager clustersmngr.ClustersManager) CoreServerConfig

type PrimaryKinds added in v0.9.1

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

func DefaultPrimaryKinds added in v0.9.1

func DefaultPrimaryKinds() *PrimaryKinds

func New added in v0.9.1

func New() *PrimaryKinds

func (*PrimaryKinds) Add added in v0.9.1

func (pk *PrimaryKinds) Add(kind string, gvk schema.GroupVersionKind) error

Add sets another kind name and gvk to resolve an object This errors if the kind is already set, as this likely indicates 2 different uses for the same kind string.

func (*PrimaryKinds) Lookup added in v0.9.1

func (pk *PrimaryKinds) Lookup(kind string) (*schema.GroupVersionKind, error)

Lookup ensures that a kind name is known, white-listed, and returns the full GVK for that kind

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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