Documentation
¶
Index ¶
- Constants
- func ApplyManifestFile(ctx context.Context, kubeConfigPath, file string) error
- func BuildGitServerImage(ctx context.Context, imageTag string) error
- func BuildImage(ctx context.Context, dockerfile, imageName, imageTag string) error
- func ConfigureCoreDNSGithubRewrite(ctx context.Context, c client.Client) error
- func DeployGitServer(ctx context.Context, c client.Client, imageTag string) (knownHosts string, err error)
- func GenerateImageTag() string
- func InstallDependencyCRDs(ctx context.Context, kubeConfigPath string) error
- func InstallHelmChart(ctx context.Context, ...) error
- func PortForward(ctx context.Context, cfg *rest.Config, namespace, pod string, port int) (string, error)
- func RemoveImage(ctx context.Context, imageName, imageTag string) error
- func UninstallHelmRelease(ctx context.Context, KubeConfigPath, namespace, releaseName string) error
- type KindCluster
Constants ¶
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
ApplyManifestFile applies a manifest file with kubectl
func BuildGitServerImage ¶ added in v1.120.1
BuildGitServerImage builds the e2e git server image from e2e/testdata/gitserver/git-server.Dockerfile.
func BuildImage ¶
BuildImage builds a single Docker image
func ConfigureCoreDNSGithubRewrite ¶ added in v1.120.1
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
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 ¶
RemoveImage removes a Docker image
func UninstallHelmRelease ¶ added in v1.134.0
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