Documentation
¶
Index ¶
- Constants
- 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 InstallGatewayApiCRDs(ctx context.Context, KubeConfigPath string) error
- func InstallPrometheusOperatorCRDs(ctx context.Context, KubeConfigPath string) error
- func InstallRadixOperator(ctx context.Context, KubeConfigPath, namespace, releaseName, chartPath string, ...) error
- func RemoveImage(ctx context.Context, imageName, imageTag string) error
- func UninstallRadixOperator(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 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 InstallGatewayApiCRDs ¶ added in v1.109.0
InstallGatewayApiCRDs installs the Gateway API CRDs from GitHub
func InstallPrometheusOperatorCRDs ¶
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 ¶
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