Documentation
¶
Index ¶
- Constants
- Variables
- func AddLabel(meta *metav1.ObjectMeta, key string, value string)
- func AddOptOutLabel(meta *metav1.ObjectMeta)
- func BasicCronJob(namespace string, name string) *batchv1.CronJob
- func BasicDaemonSet(namespace string, name string) *appsv1.DaemonSet
- func BasicDeployment(namespace string, name string) *appsv1.Deployment
- func BasicJob(namespace string, name string) *batchv1.Job
- func BasicPod(namespace string, name string) *corev1.Pod
- func BasicReplicaSet(namespace string, name string) *appsv1.ReplicaSet
- func BasicStatefulSet(namespace string, name string) *appsv1.StatefulSet
- func CreateBasicCronJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func CreateBasicDaemonSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func CreateBasicDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func CreateBasicJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreateBasicPod(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func CreateBasicReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateBasicStatefulSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func CreateCronJobWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func CreateDaemonSetWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func CreateDash0CustomResource(ctx context.Context, k8sClient client.Client, ...) client.Object
- func CreateDeploymentWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func CreateInstrumentedCronJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func CreateInstrumentedDaemonSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func CreateInstrumentedDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func CreateInstrumentedJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreateInstrumentedPod(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func CreateInstrumentedReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateInstrumentedStatefulSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func CreateJobForWhichAnInstrumentationAttemptHasFailed(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreateJobWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func CreatePodOwnedByReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func CreateReplicaSetOwnedByDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateReplicaSetWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func CreateStatefulSetWithOptOutLabel(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func CreateWorkload(ctx context.Context, k8sClient client.Client, workload client.Object) client.Object
- func CronJobWithOptOutLabel(namespace string, name string) *batchv1.CronJob
- func DaemonSetWithOptOutLabel(namespace string, name string) *appsv1.DaemonSet
- func DeleteAllCreatedObjects(ctx context.Context, k8sClient client.Client, createdObjects []client.Object) []client.Object
- func DeleteAllEvents(ctx context.Context, clientset *kubernetes.Clientset, namespace string)
- func DeploymentWithExistingDash0Artifacts(namespace string, name string) *appsv1.Deployment
- func DeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment
- func DeploymentWithOptOutLabel(namespace string, name string) *appsv1.Deployment
- func EnsureDash0CustomResourceExists(ctx context.Context, k8sClient client.Client) *operatorv1alpha1.Dash0
- func EnsureDash0CustomResourceExistsAndIsAvailable(ctx context.Context, k8sClient client.Client) *operatorv1alpha1.Dash0
- func EnsureDash0CustomResourceExistsAndIsAvailableInNamespace(ctx context.Context, k8sClient client.Client, ...) *operatorv1alpha1.Dash0
- func EnsureDash0CustomResourceExistsAndIsDegraded(ctx context.Context, k8sClient client.Client) *operatorv1alpha1.Dash0
- func EnsureDash0CustomResourceExistsWithNamespacedName(ctx context.Context, k8sClient client.Client, ...) *operatorv1alpha1.Dash0
- func EnsureKubernetesObjectExists(ctx context.Context, k8sClient client.Client, ...) client.Object
- func EnsureNamespaceExists(ctx context.Context, k8sClient client.Client, namespace string) *corev1.Namespace
- func EnsureTestNamespaceExists(ctx context.Context, k8sClient client.Client) *corev1.Namespace
- func GetCronJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.CronJob
- func GetDaemonSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.DaemonSet
- func GetDeployment(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.Deployment
- func GetDeploymentEventually(ctx context.Context, k8sClient client.Client, g Gomega, namespace string, ...) *appsv1.Deployment
- func GetJob(ctx context.Context, k8sClient client.Client, namespace string, name string) *batchv1.Job
- func GetPod(ctx context.Context, k8sClient client.Client, namespace string, name string) *corev1.Pod
- func GetReplicaSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.ReplicaSet
- func GetStatefulSet(ctx context.Context, k8sClient client.Client, namespace string, name string) *appsv1.StatefulSet
- func InstrumentedCronJob(namespace string, name string) *batchv1.CronJob
- func InstrumentedDaemonSet(namespace string, name string) *appsv1.DaemonSet
- func InstrumentedDeployment(namespace string, name string) *appsv1.Deployment
- func InstrumentedDeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment
- func InstrumentedJob(namespace string, name string) *batchv1.Job
- func InstrumentedPod(namespace string, name string) *corev1.Pod
- func InstrumentedReplicaSet(namespace string, name string) *appsv1.ReplicaSet
- func InstrumentedReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet
- func InstrumentedStatefulSet(namespace string, name string) *appsv1.StatefulSet
- func JobForWhichAnInstrumentationAttemptHasFailed(namespace string, name string) *batchv1.Job
- func JobWithOptOutLabel(namespace string, name string) *batchv1.Job
- func LoadDash0CustomResourceByName(ctx context.Context, k8sClient client.Client, g Gomega, ...) *operatorv1alpha1.Dash0
- func LoadDash0CustomResourceByNameIfItExists(ctx context.Context, k8sClient client.Client, g Gomega, ...) *operatorv1alpha1.Dash0
- func LoadDash0CustomResourceByNameOrFail(ctx context.Context, k8sClient client.Client, g Gomega, ...) *operatorv1alpha1.Dash0
- func LoadDash0CustomResourceOrFail(ctx context.Context, k8sClient client.Client, g Gomega) *operatorv1alpha1.Dash0
- func MatchEnvVar(name string, value string, args ...interface{}) gomega.OmegaMatcher
- func MatchEvent(namespace string, resourceName string, reason util.Reason, message string, ...) gomega.OmegaMatcher
- func MatchVolumeMount(name string, mountPath string, args ...interface{}) gomega.OmegaMatcher
- func Namespace(name string) *corev1.Namespace
- func PodOwnedByReplicaSet(namespace string, name string) *corev1.Pod
- func PodWithOptOutLabel(namespace string, name string) *corev1.Pod
- func RemoveDash0CustomResource(ctx context.Context, k8sClient client.Client)
- func RemoveDash0CustomResourceByName(ctx context.Context, k8sClient client.Client, ...)
- func RemoveLabel(meta *metav1.ObjectMeta, key string)
- func RemoveOptOutLabel(meta *metav1.ObjectMeta)
- func ReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet
- func ReplicaSetWithOptOutLabel(namespace string, name string) *appsv1.ReplicaSet
- func StatefulSetWithOptOutLabel(namespace string, name string) *appsv1.StatefulSet
- func UniqueName(prefix string) string
- func UpdateLabel(meta *metav1.ObjectMeta, key string, value string)
- func UpdateWorkload(ctx context.Context, k8sClient client.Client, workload client.Object) client.Object
- func VerifyCronJobWithOptOutLabel(resource *batchv1.CronJob)
- func VerifyDaemonSetWithOptOutLabel(resource *appsv1.DaemonSet)
- func VerifyDash0CustomResourceByNameDoesNotExist(ctx context.Context, k8sClient client.Client, g Gomega, ...)
- func VerifyDeploymentWithOptOutLabel(resource *appsv1.Deployment)
- func VerifyFailedInstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...)
- func VerifyFailedUninstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...)
- func VerifyImmutableJobCouldNotBeModified(resource *batchv1.Job)
- func VerifyJobWithOptOutLabel(resource *batchv1.Job)
- func VerifyModifiedCronJob(resource *batchv1.CronJob, expectations PodSpecExpectations)
- func VerifyModifiedDaemonSet(resource *appsv1.DaemonSet, expectations PodSpecExpectations)
- func VerifyModifiedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations)
- func VerifyModifiedJob(resource *batchv1.Job, expectations PodSpecExpectations)
- func VerifyModifiedJobAfterUnsuccessfulOptOut(resource *batchv1.Job)
- func VerifyModifiedPod(resource *corev1.Pod, expectations PodSpecExpectations)
- func VerifyModifiedReplicaSet(resource *appsv1.ReplicaSet, expectations PodSpecExpectations)
- func VerifyModifiedStatefulSet(resource *appsv1.StatefulSet, expectations PodSpecExpectations)
- func VerifyNoEvents(ctx context.Context, clientset *kubernetes.Clientset, namespace string)
- func VerifyNoInstrumentationNecessaryEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...)
- func VerifyNoUninstrumentationNecessaryEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...)
- func VerifyPodWithOptOutLabel(resource *corev1.Pod)
- func VerifyReplicaSetWithOptOutLabel(resource *appsv1.ReplicaSet)
- func VerifyRevertedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations)
- func VerifyStatefulSetWithOptOutLabel(resource *appsv1.StatefulSet)
- func VerifySuccessfulInstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...)
- func VerifySuccessfulUninstrumentationEvent(ctx context.Context, clientset *kubernetes.Clientset, namespace string, ...)
- func VerifySuccessfulUninstrumentationEventEventually(ctx context.Context, clientset *kubernetes.Clientset, g Gomega, ...)
- func VerifyUnmodifiedCronJob(resource *batchv1.CronJob)
- func VerifyUnmodifiedDaemonSet(resource *appsv1.DaemonSet)
- func VerifyUnmodifiedDeployment(resource *appsv1.Deployment)
- func VerifyUnmodifiedDeploymentEventually(g Gomega, resource *appsv1.Deployment)
- func VerifyUnmodifiedJob(resource *batchv1.Job)
- func VerifyUnmodifiedPod(resource *corev1.Pod)
- func VerifyUnmodifiedReplicaSet(resource *appsv1.ReplicaSet)
- func VerifyUnmodifiedStatefulSet(resource *appsv1.StatefulSet)
- func VerifyWebhookIgnoreOnceLabelIsAbesent(objectMeta *metav1.ObjectMeta)
- func VerifyWebhookIgnoreOnceLabelIsPresent(objectMeta *metav1.ObjectMeta)
- func VerifyWebhookIgnoreOnceLabelIsPresentEventually(g Gomega, objectMeta *metav1.ObjectMeta)
- type ContainerExpectations
- type MatchEnvVarMatcher
- type MatchEventMatcher
- type MatchVolumeMountMatcher
- type PodSpecExpectations
Constants ¶
View Source
const ( TestNamespaceName = "test-namespace" CronJobNamePrefix = "cronjob" DaemonSetNamePrefix = "daemonset" DeploymentNamePrefix = "deployment" JobNamePrefix = "job" PodNamePrefix = "pod" ReplicaSetNamePrefix = "replicaset" StatefulSetNamePrefix = "statefulset" )
View Source
const (
Dash0CustomResourceName = "dash0-test-resource"
)
Variables ¶
View Source
var ( True = true False = false )
View Source
var (
ArbitraryNumer int64 = 1302
)
View Source
var ( Dash0CustomResourceQualifiedName = types.NamespacedName{ Namespace: TestNamespaceName, Name: Dash0CustomResourceName, } )
Functions ¶
func AddOptOutLabel ¶
func AddOptOutLabel(meta *metav1.ObjectMeta)
func BasicDeployment ¶
func BasicDeployment(namespace string, name string) *appsv1.Deployment
func BasicReplicaSet ¶
func BasicReplicaSet(namespace string, name string) *appsv1.ReplicaSet
func BasicStatefulSet ¶
func BasicStatefulSet(namespace string, name string) *appsv1.StatefulSet
func CreateBasicCronJob ¶
func CreateBasicDaemonSet ¶
func CreateBasicDeployment ¶
func CreateBasicJob ¶
func CreateBasicPod ¶
func CreateBasicReplicaSet ¶
func CreateBasicStatefulSet ¶
func CreateInstrumentedJob ¶
func CreateInstrumentedPod ¶
func CreateWorkload ¶
func CronJobWithOptOutLabel ¶
func DeleteAllCreatedObjects ¶
func DeleteAllEvents ¶
func DeleteAllEvents( ctx context.Context, clientset *kubernetes.Clientset, namespace string, )
func DeploymentWithExistingDash0Artifacts ¶
func DeploymentWithExistingDash0Artifacts(namespace string, name string) *appsv1.Deployment
func DeploymentWithMoreBellsAndWhistles ¶
func DeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment
func DeploymentWithOptOutLabel ¶
func DeploymentWithOptOutLabel(namespace string, name string) *appsv1.Deployment
func EnsureDash0CustomResourceExistsAndIsAvailableInNamespace ¶
func EnsureDash0CustomResourceExistsAndIsAvailableInNamespace( ctx context.Context, k8sClient client.Client, namespacedName types.NamespacedName, ) *operatorv1alpha1.Dash0
func EnsureDash0CustomResourceExistsWithNamespacedName ¶
func EnsureDash0CustomResourceExistsWithNamespacedName( ctx context.Context, k8sClient client.Client, namespacesName types.NamespacedName, ) *operatorv1alpha1.Dash0
func EnsureNamespaceExists ¶
func GetCronJob ¶
func GetDaemonSet ¶
func GetDeployment ¶
func GetDeploymentEventually ¶
func GetReplicaSet ¶
func GetStatefulSet ¶
func InstrumentedDaemonSet ¶
func InstrumentedDeployment ¶
func InstrumentedDeployment(namespace string, name string) *appsv1.Deployment
func InstrumentedDeploymentWithMoreBellsAndWhistles ¶
func InstrumentedDeploymentWithMoreBellsAndWhistles(namespace string, name string) *appsv1.Deployment
func InstrumentedReplicaSet ¶
func InstrumentedReplicaSet(namespace string, name string) *appsv1.ReplicaSet
func InstrumentedReplicaSetOwnedByDeployment ¶
func InstrumentedReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet
func InstrumentedStatefulSet ¶
func InstrumentedStatefulSet(namespace string, name string) *appsv1.StatefulSet
func LoadDash0CustomResourceByName ¶
func LoadDash0CustomResourceByName( ctx context.Context, k8sClient client.Client, g Gomega, dash0CustomResourceName types.NamespacedName, failTestsOnNonExists bool, ) *operatorv1alpha1.Dash0
func LoadDash0CustomResourceByNameIfItExists ¶
func LoadDash0CustomResourceByNameIfItExists( ctx context.Context, k8sClient client.Client, g Gomega, dash0CustomResourceName types.NamespacedName, ) *operatorv1alpha1.Dash0
func LoadDash0CustomResourceByNameOrFail ¶
func LoadDash0CustomResourceByNameOrFail( ctx context.Context, k8sClient client.Client, g Gomega, dash0CustomResourceName types.NamespacedName, ) *operatorv1alpha1.Dash0
func MatchEnvVar ¶
func MatchEnvVar(name string, value string, args ...interface{}) gomega.OmegaMatcher
func MatchEvent ¶
func MatchVolumeMount ¶
func MatchVolumeMount(name string, mountPath string, args ...interface{}) gomega.OmegaMatcher
func RemoveLabel ¶
func RemoveLabel(meta *metav1.ObjectMeta, key string)
func RemoveOptOutLabel ¶
func RemoveOptOutLabel(meta *metav1.ObjectMeta)
func ReplicaSetOwnedByDeployment ¶
func ReplicaSetOwnedByDeployment(namespace string, name string) *appsv1.ReplicaSet
func ReplicaSetWithOptOutLabel ¶
func ReplicaSetWithOptOutLabel(namespace string, name string) *appsv1.ReplicaSet
func StatefulSetWithOptOutLabel ¶
func StatefulSetWithOptOutLabel(namespace string, name string) *appsv1.StatefulSet
func UniqueName ¶
func UpdateLabel ¶
func UpdateLabel(meta *metav1.ObjectMeta, key string, value string)
func UpdateWorkload ¶
func VerifyDeploymentWithOptOutLabel ¶
func VerifyDeploymentWithOptOutLabel(resource *appsv1.Deployment)
func VerifyModifiedCronJob ¶
func VerifyModifiedCronJob(resource *batchv1.CronJob, expectations PodSpecExpectations)
func VerifyModifiedDaemonSet ¶
func VerifyModifiedDaemonSet(resource *appsv1.DaemonSet, expectations PodSpecExpectations)
func VerifyModifiedDeployment ¶
func VerifyModifiedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations)
func VerifyModifiedJob ¶
func VerifyModifiedJob(resource *batchv1.Job, expectations PodSpecExpectations)
func VerifyModifiedPod ¶
func VerifyModifiedPod(resource *corev1.Pod, expectations PodSpecExpectations)
func VerifyModifiedReplicaSet ¶
func VerifyModifiedReplicaSet(resource *appsv1.ReplicaSet, expectations PodSpecExpectations)
func VerifyModifiedStatefulSet ¶
func VerifyModifiedStatefulSet(resource *appsv1.StatefulSet, expectations PodSpecExpectations)
func VerifyNoEvents ¶
func VerifyNoEvents( ctx context.Context, clientset *kubernetes.Clientset, namespace string, )
func VerifyReplicaSetWithOptOutLabel ¶
func VerifyReplicaSetWithOptOutLabel(resource *appsv1.ReplicaSet)
func VerifyRevertedDeployment ¶
func VerifyRevertedDeployment(resource *appsv1.Deployment, expectations PodSpecExpectations)
func VerifyStatefulSetWithOptOutLabel ¶
func VerifyStatefulSetWithOptOutLabel(resource *appsv1.StatefulSet)
func VerifyUnmodifiedCronJob ¶
func VerifyUnmodifiedDeployment ¶
func VerifyUnmodifiedDeployment(resource *appsv1.Deployment)
func VerifyUnmodifiedDeploymentEventually ¶
func VerifyUnmodifiedDeploymentEventually(g Gomega, resource *appsv1.Deployment)
func VerifyUnmodifiedJob ¶
func VerifyUnmodifiedPod ¶
func VerifyUnmodifiedReplicaSet ¶
func VerifyUnmodifiedReplicaSet(resource *appsv1.ReplicaSet)
func VerifyUnmodifiedStatefulSet ¶
func VerifyUnmodifiedStatefulSet(resource *appsv1.StatefulSet)
func VerifyWebhookIgnoreOnceLabelIsAbesent ¶
func VerifyWebhookIgnoreOnceLabelIsAbesent(objectMeta *metav1.ObjectMeta)
func VerifyWebhookIgnoreOnceLabelIsPresent ¶
func VerifyWebhookIgnoreOnceLabelIsPresent(objectMeta *metav1.ObjectMeta)
func VerifyWebhookIgnoreOnceLabelIsPresentEventually ¶
func VerifyWebhookIgnoreOnceLabelIsPresentEventually(g Gomega, objectMeta *metav1.ObjectMeta)
Types ¶
type ContainerExpectations ¶
type MatchEnvVarMatcher ¶
func (*MatchEnvVarMatcher) FailureMessage ¶
func (matcher *MatchEnvVarMatcher) FailureMessage(actual interface{}) (message string)
func (*MatchEnvVarMatcher) Match ¶
func (matcher *MatchEnvVarMatcher) Match(actual interface{}) (success bool, err error)
func (*MatchEnvVarMatcher) NegatedFailureMessage ¶
func (matcher *MatchEnvVarMatcher) NegatedFailureMessage(actual interface{}) (message string)
type MatchEventMatcher ¶
type MatchEventMatcher struct { Namespace string ResourceName string Reason string Message string Args []interface{} }
func (*MatchEventMatcher) FailureMessage ¶
func (matcher *MatchEventMatcher) FailureMessage(actual interface{}) (message string)
func (*MatchEventMatcher) Match ¶
func (matcher *MatchEventMatcher) Match(actual interface{}) (success bool, err error)
func (*MatchEventMatcher) NegatedFailureMessage ¶
func (matcher *MatchEventMatcher) NegatedFailureMessage(actual interface{}) (message string)
type MatchVolumeMountMatcher ¶
func (*MatchVolumeMountMatcher) FailureMessage ¶
func (matcher *MatchVolumeMountMatcher) FailureMessage(actual interface{}) (message string)
func (*MatchVolumeMountMatcher) Match ¶
func (matcher *MatchVolumeMountMatcher) Match(actual interface{}) (success bool, err error)
func (*MatchVolumeMountMatcher) NegatedFailureMessage ¶
func (matcher *MatchVolumeMountMatcher) NegatedFailureMessage(actual interface{}) (message string)
type PodSpecExpectations ¶
type PodSpecExpectations struct { Volumes int Dash0VolumeIdx int InitContainers int Dash0InitContainerIdx int Containers []ContainerExpectations }
func BasicInstrumentedPodSpecExpectations ¶
func BasicInstrumentedPodSpecExpectations() PodSpecExpectations
Click to show internal directories.
Click to hide internal directories.