utils

package
v0.0.0-...-7d6da81 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseYaml

func ParseYaml(relativePath string, kind schema.GroupVersionKind) (map[string]interface{}, error)

Types

type ClusterClient

type ClusterClient struct {
	client.Client
	ClientSet clientset.Interface
	// contains filtered or unexported fields
}

func NewClusterClient

func NewClusterClient(client client.Client, clientSet clientset.Interface) *ClusterClient

func (*ClusterClient) Apply

func (c *ClusterClient) Apply(ctx context.Context, logger logr.Logger, clusterName string, object client.Object, oldObject client.Object, namespaces ...string) (resourceVersion string, err error)

func (*ClusterClient) CreateCluster

func (c *ClusterClient) CreateCluster(ctx context.Context, logger logr.Logger, clusterName string, namespace string) error

func (*ClusterClient) CreateNamespace

func (c *ClusterClient) CreateNamespace(baseName string, labels map[string]string) (*corev1.Namespace, error)

func (*ClusterClient) GetNamespace

func (c *ClusterClient) GetNamespace(clusterName string) (string, error)

func (*ClusterClient) SetNamespace

func (c *ClusterClient) SetNamespace(clusterName, namespace string)

type FakePorchClient

type FakePorchClient struct {
	logr.Logger
	*ClusterClient
}

func (*FakePorchClient) ApplyPackage

func (f *FakePorchClient) ApplyPackage(ctx context.Context, contents map[string]string, packageName, clusterName string) error

Jump to

Keyboard shortcuts

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