utils

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResourceOperability added in v0.3.0

func CheckResourceOperability(res client.Object, productName string) error

func GetClusterByRuntime added in v0.3.6

func GetClusterByRuntime(ctx context.Context, k8sClient client.Client, nautesNamespace string, runtime interfaces.Runtime) (*nautescrd.Cluster, error)

func GetCodeRepoProviderAndCodeRepoWithURL added in v0.3.0

func GetCodeRepoProviderAndCodeRepoWithURL(ctx context.Context, k8sClient client.Client, repoKey types.NamespacedName, nautesNamespace string) (*nautescrd.CodeRepoProvider, *nautescrd.CodeRepo, error)

func GetCodeRepoURL added in v0.3.6

func GetCodeRepoURL(ctx context.Context, k8sClient client.Client, codeRepo nautescrd.CodeRepo, nautesNamespace string) (string, error)

func GetProductNameByIDInCluster added in v0.3.6

func GetProductNameByIDInCluster(cluster nautescrd.Cluster, productID string) string

func GetProductNamespacesInCluster added in v0.3.6

func GetProductNamespacesInCluster(ctx context.Context, k8sClient client.Client, product, cluster string) ([]string, error)

func GetReservedNamespacesByProduct added in v0.3.6

func GetReservedNamespacesByProduct(cluster nautescrd.Cluster, productID string) []string

func GetURLsInCluster added in v0.3.6

func GetURLsInCluster(ctx context.Context, k8sClient client.Client, product, cluster string, nautesNamespace string) ([]string, error)

func IsBelongsToProduct

func IsBelongsToProduct(res client.Object, productName string) bool

IsBelongsToProduct check resouces is maintain by nautes

func IsLegal

func IsLegal(res client.Object, productName string) (string, bool)

IsLegal used to check resources is availabel for reconcile. It will return two vars, pass or not and the reason if check is failed.

func IsOwner added in v0.3.0

func IsOwner(owner, object client.Object, scheme *runtime.Scheme) bool

IsOwner check k8s resource is belongs to another resource

func RemoveOwner added in v0.3.0

func RemoveOwner(owner, object client.Object, scheme *runtime.Scheme) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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