internal

package
v1.120.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 29 Imported by: 0

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 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 InstallGatewayApiCRDs added in v1.109.0

func InstallGatewayApiCRDs(ctx context.Context, KubeConfigPath string) error

InstallGatewayApiCRDs installs the Gateway API CRDs from GitHub

func InstallPrometheusOperatorCRDs

func InstallPrometheusOperatorCRDs(ctx context.Context, KubeConfigPath string) error

InstallPrometheusOperatorCRDs installs the Prometheus Operator CRDs from GitHub

func InstallRadixOperator

func InstallRadixOperator(ctx context.Context, KubeConfigPath, namespace, releaseName, chartPath string, values map[string]string) error

InstallRadixOperator installs or upgrades the radix-operator Helm chart so it runs with the expected image tags and configuration, whether or not it is already installed.

func RemoveImage

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

RemoveImage removes a Docker image

func UninstallRadixOperator added in v1.120.1

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

UninstallRadixOperator uninstalls the radix-operator Helm release if it is installed. This is used to stop the running operator before the Radix CRDs are removed, so the operator does not fail when its 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