validation

package
v1.1.0-beta33 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInClusterCheckContext

func NewInClusterCheckContext() (checks.CheckContext, error)

func NewOutOfClusterCheckContext

func NewOutOfClusterCheckContext(
	kubeConfig, kubeContext, gmInstallationNamespace string,
	localPort, remotePort uint32,
	agentParams *checks.AgentParams,
	ignoreChecks bool,
	crdMd map[string]*crdutils.CRDMetadata,
) (checks.CheckContext, error)

func NewTestCheckContext

func NewTestCheckContext(
	gmInstallationNamespace string,
	localPort, remotePort uint32,
	agentParams *checks.AgentParams,
	relayDialer checks.RelayDialer,
	appsClientset appsv1.Clientset,
	coreClientset corev1.Clientset,
	networkingClientset networkingv1.Clientset,
	kubernetesClusterClient v1alpha1.KubernetesClusterClient,
	crdClient apiextv1beta1.CustomResourceDefinitionClient,
	ignoreChecks bool,
	crdMd map[string]*crdutils.CRDMetadata,
) checks.CheckContext

exposed for testing, allows injecting mock k8s client

Types

type InClusterCheckContext

type InClusterCheckContext struct {
	checks.CommonContext
}

func (*InClusterCheckContext) AccessAdminPort

func (c *InClusterCheckContext) AccessAdminPort(ctx context.Context, deployment string, op func(ctx context.Context, adminUrl *url.URL) (error, string)) (error, string)

func (*InClusterCheckContext) CRDMetadata

func (c *InClusterCheckContext) CRDMetadata(ctx context.Context, deploymentName string) (*crdutils.CRDMetadata, error)

func (*InClusterCheckContext) Context

type OutOfClusterCheckContext

type OutOfClusterCheckContext struct {
	checks.CommonContext
	// contains filtered or unexported fields
}

func (*OutOfClusterCheckContext) AccessAdminPort

func (c *OutOfClusterCheckContext) AccessAdminPort(ctx context.Context, deployment string, op func(ctx context.Context, adminUrl *url.URL) (error, string)) (error, string)

func (*OutOfClusterCheckContext) CRDMetadata

func (c *OutOfClusterCheckContext) CRDMetadata(ctx context.Context, deploymentName string) (*crdutils.CRDMetadata, error)

TODO We need a cleaner way to signal whether CRD metadata should be fetched from the Deployment on the cluster, which should only happen in the post-install check. For pre-install checks, CRD metadata is expected to be passed in via the check constructor, which, with the current logic, requires us to express missing CRD metadata (e.g. for older versions of GM) via a non-nil map containing a key for the deployment with a nil value.

func (*OutOfClusterCheckContext) Context

Directories

Path Synopsis
mocks
Package mock_checks is a generated GoMock package.
Package mock_checks is a generated GoMock package.

Jump to

Keyboard shortcuts

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