internal

package
v1.134.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 34 Imported by: 0 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

View Source
const (
	// GitServerImageName is the local image name for the e2e in-cluster git server.
	GitServerImageName = "local-kind-repo/git-server"

	// GitServerHost is the hostname the clone workload connects to. Because RadixRegistration
	// CloneURLs are locked to git@github.com, the e2e cluster's CoreDNS rewrites this host to the
	// in-cluster git server service (see ConfigureCoreDNSGithubRewrite).
	GitServerHost = "github.com"
)

Variables

This section is empty.

Functions

func ApplyManifestFile added in v1.134.0

func ApplyManifestFile(ctx context.Context, kubeConfigPath, file string) error

ApplyManifestFile applies a manifest file with kubectl

func BuildGitServerImage added in v1.120.1

func BuildGitServerImage(ctx context.Context, imageTag string) error

BuildGitServerImage builds the e2e git server image from e2e/testdata/gitserver/git-server.Dockerfile.

func BuildImage

func BuildImage(ctx context.Context, dockerfile, imageName, imageTag string) error

BuildImage builds a single Docker image

func ConfigureCoreDNSGithubRewrite added in v1.120.1

func ConfigureCoreDNSGithubRewrite(ctx context.Context, c client.Client) error

ConfigureCoreDNSGithubRewrite makes the e2e cluster resolve GitServerHost to the in-cluster git server by adding a CoreDNS rewrite rule. It is idempotent.

func DeployGitServer added in v1.120.1

func DeployGitServer(ctx context.Context, c client.Client, imageTag string) (knownHosts string, err error)

DeployGitServer deploys the in-cluster SSH git server and returns the known_hosts entry for the GitServerHost host alias. The server serves equinor/queue-order-test.git over SSH and accepts any client public key, so the operator-generated deploy key authenticates without prior provisioning.

func GenerateImageTag

func GenerateImageTag() string

GenerateImageTag generates a unique tag for the current build

func InstallDependencyCRDs added in v1.132.0

func InstallDependencyCRDs(ctx context.Context, kubeConfigPath string) error

InstallDependencyCRDs installs the third-party CRDs required by radix-operator, and cert-manager which issues the radix-easyauth webhook certificate

func InstallHelmChart added in v1.134.0

func InstallHelmChart(ctx context.Context, KubeConfigPath, namespace, releaseName, chartPath, valuesFile, imageTag string, helmValues map[string]string) error

InstallHelmChart installs or upgrades a Helm chart so it runs with the expected image tags and configuration, whether or not it is already installed.

func PortForward added in v1.134.0

func PortForward(ctx context.Context, cfg *rest.Config, namespace, pod string, port int) (string, error)

PortForward forwards a random local port to port on the pod until ctx is cancelled, and returns the local address

func RemoveImage

func RemoveImage(ctx context.Context, imageName, imageTag string) error

RemoveImage removes a Docker image

func UninstallHelmRelease added in v1.134.0

func UninstallHelmRelease(ctx context.Context, KubeConfigPath, namespace, releaseName string) error

UninstallHelmRelease uninstalls a Helm release if it is installed. This is used to stop running Radix components before the Radix CRDs are removed, so they do not fail when their CRDs disappear. It is a no-op if the release is not installed.

Types

type KindCluster

type KindCluster struct {
	Name           string
	KubeConfigPath string
	// Existed is true if the cluster already existed and was reused instead of created.
	Existed bool
}

KindCluster represents a Kind cluster for testing

func NewKindCluster

func NewKindCluster(ctx context.Context) (*KindCluster, error)

NewKindCluster creates a new Kind cluster

func (*KindCluster) Delete

func (k *KindCluster) Delete(ctx context.Context) error

Delete removes the Kind cluster

func (*KindCluster) GetKubeConfig

func (k *KindCluster) GetKubeConfig() (*rest.Config, error)

GetKubeConfig returns the rest.Config for the cluster

func (*KindCluster) LoadImage

func (k *KindCluster) LoadImage(ctx context.Context, image, tag string) error

LoadImage loads a single Docker image into the Kind cluster

Jump to

Keyboard shortcuts

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