util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 28 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 ListPersonalChartGroups added in v1.4.0

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

ListPersonalChartGroups list all chartgroups that belongs to personal

func ListPersonalChartGroupsFromStore added in v1.4.0

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

ListPersonalChartGroupsFromStore list all chartgroups that belongs to personal

func ListPersonalChartsFromStore added in v1.4.0

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

ListPersonalChartsFromStore list all charts that belongs to personal chartgroup

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 ListSystemChartGroups added in v1.4.0

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

ListSystemChartGroups list all charts that belongs to system

func ListSystemChartGroupsFromStore added in v1.4.0

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

ListSystemChartGroupsFromStore list all charts that belongs to system

func ListSystemChartsFromStore added in v1.4.0

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

ListSystemChartsFromStore list all charts that belongs to system chartgroup

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳