Documentation
¶
Index ¶
- Constants
- func ApplyManifestFile(ctx context.Context, kubeConfigPath, file string) error
- func BuildFakeBlobCSIImage(ctx context.Context, imageTag 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 DeployFakeBlobCSIDriver(ctx context.Context, c client.Client, imageTag string) 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 FakeBlobCSIVolumeInfo
- type KindCluster
Constants ¶
const ( // FakeBlobCSIImageName is the local image name for the fake Azure Blob CSI node plugin. FakeBlobCSIImageName = "local-kind-repo/fake-blob-csi" // FakeBlobCSIVolumeInfoFileName is the file the fake driver writes to the root of each volume, // with the volume handle, volume attributes and mount options it received from kubelet. FakeBlobCSIVolumeInfoFileName = "fake-blob-csi.json" )
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 BuildFakeBlobCSIImage ¶ added in v1.134.3
BuildFakeBlobCSIImage builds the fake Azure Blob CSI node plugin image from e2e/testdata/fakeblobcsi.
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 DeployFakeBlobCSIDriver ¶ added in v1.134.3
DeployFakeBlobCSIDriver deploys a fake CSI node plugin named blob.csi.azure.com to every node, so Pods can mount the statically provisioned PersistentVolumes created by the operator for BlobFuse2 volume mounts. 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 FakeBlobCSIVolumeInfo ¶ added in v1.134.3
type FakeBlobCSIVolumeInfo struct {
VolumeID string `json:"volumeId"`
VolumeContext map[string]string `json:"volumeContext"`
MountFlags []string `json:"mountFlags"`
AccessMode string `json:"accessMode"`
Readonly bool `json:"readonly"`
NodePublishCount int `json:"nodePublishCount"`
}
FakeBlobCSIVolumeInfo is the content of FakeBlobCSIVolumeInfoFileName
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