util

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 29 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DNS           = ".:53"
	REWRITE       = "rewrite"
	NAME          = "name"
	CoreFileKey   = "Corefile"
	KubeSystem    = "kube-system"
	ConfigMapName = "coredns"
	TargetSVC     = "tke-registry-api.tke.svc.cluster.local"
)

Variables

This section is empty.

Functions

func BuildKubeClient added in v1.4.0

func BuildKubeClient() (*kubernetes.Clientset, error)

func BuildTenantRegistryDomain added in v1.4.0

func BuildTenantRegistryDomain(domainSuffix string, tenant string) string

BuildTenantRegistryDomain returns full registry domain for the tenant.

func FilterChart

func FilterChart(ctx context.Context, chart *registry.Chart) error

FilterChart is used to filter charts that do not belong to the tenant.

func FilterChartGroup

func FilterChartGroup(ctx context.Context, chartGroup *registry.ChartGroup) error

FilterChartGroup is used to filter chart groups that do not belong to the tenant.

func FilterNamespace

func FilterNamespace(ctx context.Context, namespace *registry.Namespace) error

FilterNamespace is used to filter namespaces that do not belong to the tenant.

func FilterRepository

func FilterRepository(ctx context.Context, repository *registry.Repository) error

FilterRepository is used to filter repositories that do not belong to the tenant.

func ListAllChartGroups added in v1.4.0

func ListAllChartGroups(ctx context.Context,
	options *metainternal.ListOptions,
	targetProjectID string,
	businessClient businessversionedclient.BusinessV1Interface,
	authClient authversionedclient.AuthV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string) (runtime.Object, error)

ListAllChartGroups list all chartgroups

func ListAllChartGroupsFromStore added in v1.4.0

func ListAllChartGroupsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	targetProjectID string,
	businessClient businessversionedclient.BusinessV1Interface,
	authClient authversionedclient.AuthV1Interface,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListAllChartGroupsFromStore list all chartgroups

func ListAllChartsFromStore added in v1.4.0

func ListAllChartsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	targetProjectID string,
	businessClient businessversionedclient.BusinessV1Interface,
	authClient authversionedclient.AuthV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListAllChartsFromStore list all charts

func ListProjectChartGroups added in v1.4.0

func ListProjectChartGroups(ctx context.Context,
	options *metainternal.ListOptions,
	targetProjectID string,
	businessClient businessversionedclient.BusinessV1Interface,
	authClient authversionedclient.AuthV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string) (runtime.Object, error)

ListProjectChartGroups list all charts that belongs to project

func ListProjectChartGroupsFromStore added in v1.4.0

func ListProjectChartGroupsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	targetProjectID string,
	businessClient businessversionedclient.BusinessV1Interface,
	authClient authversionedclient.AuthV1Interface,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListProjectChartGroupsFromStore list all charts that belongs to project

func ListProjectChartsFromStore added in v1.4.0

func ListProjectChartsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	targetProjectID string,
	businessClient businessversionedclient.BusinessV1Interface,
	authClient authversionedclient.AuthV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListProjectChartsFromStore list all charts that belongs to project chartgroup

func ListPublicChartGroups added in v1.4.0

func ListPublicChartGroups(ctx context.Context,
	options *metainternal.ListOptions,
	businessClient businessversionedclient.BusinessV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string) (runtime.Object, error)

ListPublicChartGroups list all charts that belongs to public

func ListPublicChartGroupsFromStore added in v1.4.0

func ListPublicChartGroupsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	businessClient businessversionedclient.BusinessV1Interface,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListPublicChartGroupsFromStore list all charts that belongs to public

func ListPublicChartsFromStore added in v1.4.0

func ListPublicChartsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	businessClient businessversionedclient.BusinessV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListPublicChartsFromStore list all charts that belongs to public chartgroup

func ListUserChartGroups added in v1.6.0

func ListUserChartGroups(ctx context.Context,
	options *metainternal.ListOptions,
	businessClient businessversionedclient.BusinessV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string) (runtime.Object, error)

ListUserChartGroups list all chartgroups that belongs to users

func ListUserChartGroupsFromStore added in v1.6.0

func ListUserChartGroupsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	businessClient businessversionedclient.BusinessV1Interface,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListUserChartGroupsFromStore list all chartgroups that belongs to users

func ListUserChartsFromStore added in v1.6.0

func ListUserChartsFromStore(ctx context.Context,
	options *metainternal.ListOptions,
	businessClient businessversionedclient.BusinessV1Interface,
	registryClient *registryinternalclient.RegistryClient,
	privilegedUsername string,
	store *registry.Store) (runtime.Object, error)

ListUserChartsFromStore list all charts that belongs to personal chartgroup

func PullRepository added in v1.6.0

func PullRepository(ctx context.Context, registryClient *registryinternalclient.RegistryClient, namespace *registry.Namespace, repository *registry.Repository, repoName, tag string) error

func PushRepository added in v1.6.0

func PushRepository(ctx context.Context, registryClient *registryinternalclient.RegistryClient, namespace *registry.Namespace, repository *registry.Repository, repoName, tag, digest string) error

func VerifyDecodedPassword added in v1.6.0

func VerifyDecodedPassword(decodedPasswd string) (string, error)

VerifyDecodedPassword verifies password.

Types

type CoreDNS added in v1.4.0

type CoreDNS struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewCoreDNS added in v1.4.0

func NewCoreDNS() (*CoreDNS, error)

func (*CoreDNS) LoadCoreFile added in v1.4.0

func (c *CoreDNS) LoadCoreFile() []byte

func (*CoreDNS) ParseBlockDNS added in v1.4.0

func (c *CoreDNS) ParseBlockDNS(block *CoreFileBlock, item string) bool

func (*CoreDNS) ParseCoreFile added in v1.4.0

func (c *CoreDNS) ParseCoreFile(item string)

func (*CoreDNS) ParseSectionRewrite added in v1.4.0

func (c *CoreDNS) ParseSectionRewrite(section []string, item string) bool

func (*CoreDNS) StoreCoreFile added in v1.4.0

func (c *CoreDNS) StoreCoreFile(content []byte)

type CoreFile added in v1.4.0

type CoreFile []*CoreFileBlock

type CoreFileBlock added in v1.4.0

type CoreFileBlock struct {
	Body [][]string `json:"body"`
	Keys []string   `json:"keys"`
}

type CoreFileHosts added in v1.4.0

type CoreFileHosts [][]string

Directories

Path Synopsis
v1

Jump to

Keyboard shortcuts

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