Versions in this module Expand all Collapse all v1 v1.16.3 Oct 23, 2019 Changes in this version + var LocalhostCert = []byte(...) + var LocalhostKey = []byte(...) + func AddLabelsToNode(c clientset.Interface, nodeName string, labels map[string]string) error + func AdmissionWebhookHandler(t *testing.T, admit func(*v1beta1.AdmissionReview) error) http.HandlerFunc + func CheckDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName, revision, image string) error + func CheckForDuplicates(el auditinternal.EventList) (auditinternal.EventList, error) + func CreateConfigMapWithRetries(c clientset.Interface, namespace string, obj *v1.ConfigMap) error + func CreateDaemonSetWithRetries(c clientset.Interface, namespace string, obj *apps.DaemonSet) error + func CreateDeploymentWithRetries(c clientset.Interface, namespace string, obj *apps.Deployment) error + func CreateJobWithRetries(c clientset.Interface, namespace string, obj *batch.Job) error + func CreatePersistentVolumeClaimWithRetries(c clientset.Interface, namespace string, obj *v1.PersistentVolumeClaim) error + func CreatePersistentVolumeWithRetries(c clientset.Interface, obj *v1.PersistentVolume) error + func CreatePod(client clientset.Interface, namespace string, podCount int, ...) error + func CreatePodWithPersistentVolume(client clientset.Interface, namespace string, ...) error + func CreatePodWithRetries(c clientset.Interface, namespace string, obj *v1.Pod) error + func CreateRCWithRetries(c clientset.Interface, namespace string, obj *v1.ReplicationController) error + func CreateReplicaSetWithRetries(c clientset.Interface, namespace string, obj *apps.ReplicaSet) error + func CreateResourceQuotaWithRetries(c clientset.Interface, namespace string, obj *v1.ResourceQuota) error + func CreateSecretWithRetries(c clientset.Interface, namespace string, obj *v1.Secret) error + func CreateServiceWithRetries(c clientset.Interface, namespace string, obj *v1.Service) error + func DeleteResourceWithRetries(c clientset.Interface, kind schema.GroupKind, namespace, name string, ...) error + func DoCleanupNode(client clientset.Interface, nodeName string, strategy PrepareNodeStrategy) error + func DoPrepareNode(client clientset.Interface, node *v1.Node, strategy PrepareNodeStrategy) error + func EncodeCertPEM(cert *x509.Certificate) []byte + func FailedContainers(pod *v1.Pod) map[string]ContainerFailures + func GetCAdvisorRootDir() (string, error) + func GetK8sBuildOutputDir() (string, error) + func GetK8sRootDir() (string, error) + func GetNodeCondition(status *v1.NodeStatus, conditionType v1.NodeConditionType) (int, *v1.NodeCondition) + func IsRetryableAPIError(err error) bool + func LogPodsOfDeployment(c clientset.Interface, deployment *apps.Deployment, rsList []*apps.ReplicaSet, ...) + func LogReplicaSetsOfDeployment(deployment *apps.Deployment, allOldRSs []*apps.ReplicaSet, ...) + func MakePodSpec() v1.PodSpec + func MakeTempDirOrDie(prefix string, baseDir string) string + func NewAdmissionWebhookServer(handler http.Handler) (string, func(), error) + func NewPrivateKey() (*rsa.PrivateKey, error) + func NewSignedCert(cfg *certutil.Config, key crypto.Signer, caCert *x509.Certificate, ...) (*x509.Certificate, error) + func PodNotReady(p *v1.Pod) (bool, error) + func PodRunningReady(p *v1.Pod) (bool, error) + func PodRunningReadyOrSucceeded(p *v1.Pod) (bool, error) + func RemoveLabelOffNode(c clientset.Interface, nodeName string, labelKeys []string) error + func RetryErrorCondition(condition wait.ConditionFunc) wait.ConditionFunc + func RetryWithExponentialBackOff(fn wait.ConditionFunc) error + func RootDir() (string, error) + func RunDeployment(config DeploymentConfig) error + func RunJob(config JobConfig) error + func RunPodAndGetNodeName(c clientset.Interface, pod *v1.Pod, timeout time.Duration) (string, error) + func RunRC(config RCConfig) error + func RunReplicaSet(config ReplicaSetConfig) error + func ScaleResourceWithRetries(scalesGetter scaleclient.ScalesGetter, namespace, name string, size uint, ...) error + func StartPods(c clientset.Interface, replicas int, namespace string, podNamePrefix string, ...) error + func TerminatedContainers(pod *v1.Pod) map[string]string + func UpdateDeploymentWithRetries(c clientset.Interface, namespace, name string, ...) (*apps.Deployment, error) + func UpdateReplicaSetStatusWithRetries(c clientset.Interface, namespace, name string, ...) (*apps.ReplicaSet, error) + func UpdateReplicaSetWithRetries(c clientset.Interface, namespace, name string, ...) (*apps.ReplicaSet, error) + func VerifyLabelsRemoved(c clientset.Interface, nodeName string, labelKeys []string) error + func WaitForDeploymentComplete(c clientset.Interface, d *apps.Deployment, logf LogfFn, ...) error + func WaitForDeploymentCompleteAndCheckRolling(c clientset.Interface, d *apps.Deployment, logf LogfFn, ...) error + func WaitForDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName string, revision, image string, ...) error + func WaitForDeploymentRollbackCleared(c clientset.Interface, ns, deploymentName string, ...) error + func WaitForDeploymentUpdatedReplicasGTE(c clientset.Interface, ns, deploymentName string, minUpdatedReplicas int32, ...) error + func WaitForDeploymentWithCondition(c clientset.Interface, ns, deploymentName, reason string, ...) error + func WaitForEnoughPodsWithLabelRunning(c clientset.Interface, ns string, label labels.Selector, replicas int) error + func WaitForObservedDeployment(c clientset.Interface, ns, deploymentName string, desiredGeneration int64) error + func WaitForPodsWithLabelRunning(c clientset.Interface, ns string, label labels.Selector) error + func WaitRSStable(t *testing.T, clientSet clientset.Interface, rs *apps.ReplicaSet, ...) error + func WaitUntilPodIsScheduled(c clientset.Interface, name, namespace string, timeout time.Duration) (*v1.Pod, error) + type AuditEvent struct + AdmissionWebhookMutationAnnotations map[string]string + AdmissionWebhookPatchAnnotations map[string]string + AuthorizeDecision string + Code int32 + ID types.UID + ImpersonatedGroups string + ImpersonatedUser string + Level auditinternal.Level + Namespace string + RequestObject bool + RequestURI string + Resource string + ResponseObject bool + Stage auditinternal.Stage + User string + Verb string + func CheckAuditList(el auditinternal.EventList, expected []AuditEvent) (missing []AuditEvent, err error) + type AuditTestServer struct + LockedEventList *LockedEventList + Name string + Server *httptest.Server + func NewAuditTestServer(t *testing.T, name string) *AuditTestServer + func (a *AuditTestServer) AppendEvents(events []auditinternal.Event) + func (a *AuditTestServer) BuildSinkConfiguration() *auditregv1alpha1.AuditSink + func (a *AuditTestServer) Close() + func (a *AuditTestServer) GetEventList() auditinternal.EventList + func (a *AuditTestServer) Health() error + func (a *AuditTestServer) ResetEventList() + func (a *AuditTestServer) WaitForEvents(expected []AuditEvent) ([]AuditEvent, error) + func (a *AuditTestServer) WaitForNumEvents(numEvents int) error + type ConfigMapConfig struct + Client clientset.Interface + Content map[string]string + LogFunc func(fmt string, args ...interface{}) + Name string + Namespace string + func (config *ConfigMapConfig) Run() error + func (config *ConfigMapConfig) Stop() error + type ContainerFailures struct + Restarts int + type CountToPodStrategy struct + Count int + Strategy TestPodCreateStrategy + type CountToStrategy struct + Count int + Strategy PrepareNodeStrategy + type DaemonConfig struct + Client clientset.Interface + Image string + LogFunc func(fmt string, args ...interface{}) + Name string + Namespace string + Timeout time.Duration + func (config *DaemonConfig) Run() error + type DeploymentConfig struct + func (config *DeploymentConfig) GetGroupResource() schema.GroupResource + func (config *DeploymentConfig) GetGroupVersionResource() schema.GroupVersionResource + func (config *DeploymentConfig) GetKind() schema.GroupKind + func (config *DeploymentConfig) Run() error + type JobConfig struct + func (config *JobConfig) GetGroupResource() schema.GroupResource + func (config *JobConfig) GetGroupVersionResource() schema.GroupVersionResource + func (config *JobConfig) GetKind() schema.GroupKind + func (config *JobConfig) Run() error + type LabelNodePrepareStrategy struct + func NewLabelNodePrepareStrategy(labelKey string, labelValue string) *LabelNodePrepareStrategy + func (*LabelNodePrepareStrategy) CleanupDependentObjects(nodeName string, client clientset.Interface) error + func (*LabelNodePrepareStrategy) PrepareDependentObjects(node *v1.Node, client clientset.Interface) error + func (s *LabelNodePrepareStrategy) CleanupNode(node *v1.Node) *v1.Node + func (s *LabelNodePrepareStrategy) PreparePatch(*v1.Node) []byte + type LockedEventList struct + EventList auditinternal.EventList + func NewLockedEventList() *LockedEventList + type LogfFn func(format string, args ...interface{}) + type MissingEventsReport struct + FirstEventChecked *auditinternal.Event + LastEventChecked *auditinternal.Event + MissingEvents []AuditEvent + NumEventsChecked int + func CheckAuditLines(stream io.Reader, expected []AuditEvent, version schema.GroupVersion) (missingReport *MissingEventsReport, err error) + func (m *MissingEventsReport) String() string + type NodeAllocatableStrategy struct + func NewNodeAllocatableStrategy(nodeAllocatable map[v1.ResourceName]string, ...) *NodeAllocatableStrategy + func (s *NodeAllocatableStrategy) CleanupDependentObjects(nodeName string, client clientset.Interface) error + func (s *NodeAllocatableStrategy) CleanupNode(node *v1.Node) *v1.Node + func (s *NodeAllocatableStrategy) PrepareDependentObjects(node *v1.Node, client clientset.Interface) error + func (s *NodeAllocatableStrategy) PreparePatch(node *v1.Node) []byte + type PodDiff map[string]*podInfo + func Diff(oldPods []*v1.Pod, curPods []*v1.Pod) PodDiff + func (p PodDiff) DeletedPods() []string + func (p PodDiff) String(ignorePhases sets.String) string + type PodStore struct + Reflector *cache.Reflector + func NewPodStore(c clientset.Interface, namespace string, label labels.Selector, ...) (*PodStore, error) + func (s *PodStore) List() []*v1.Pod + func (s *PodStore) Stop() + type PrepareNodeStrategy interface + CleanupDependentObjects func(nodeName string, client clientset.Interface) error + CleanupNode func(node *v1.Node) *v1.Node + PrepareDependentObjects func(node *v1.Node, client clientset.Interface) error + PreparePatch func(node *v1.Node) []byte + type RCConfig struct + Affinity *v1.Affinity + Annotations map[string]string + Client clientset.Interface + Command []string + ConfigMapNames []string + ContainerDumpFunc func(c clientset.Interface, ns string, ...) + CpuLimit int64 + CpuRequest int64 + CreatedPods *[]*v1.Pod + DNSPolicy *v1.DNSPolicy + Env map[string]string + GpuLimit int64 + HostPorts map[string]int + Image string + Labels map[string]string + Lifecycle *v1.Lifecycle + LogFunc func(fmt string, args ...interface{}) + MaxAllowedPodDeletions int + MaxContainerFailures *int + MemLimit int64 + MemRequest int64 + Name string + Namespace string + NodeDumpFunc func(c clientset.Interface, nodeNames []string, ...) + NodeSelector map[string]string + PodStatusFile *os.File + PollInterval time.Duration + Ports map[string]int + PriorityClassName string + ReadinessProbe *v1.Probe + Replicas int + ScalesGetter scaleclient.ScalesGetter + SecretNames []string + ServiceAccountTokenProjections int + Silent bool + TerminationGracePeriodSeconds *int64 + Timeout time.Duration + Tolerations []v1.Toleration + VolumeMounts []v1.VolumeMount + Volumes []v1.Volume + func (config *RCConfig) GetClient() clientset.Interface + func (config *RCConfig) GetGroupResource() schema.GroupResource + func (config *RCConfig) GetGroupVersionResource() schema.GroupVersionResource + func (config *RCConfig) GetKind() schema.GroupKind + func (config *RCConfig) GetLabelValue(key string) (string, bool) + func (config *RCConfig) GetName() string + func (config *RCConfig) GetNamespace() string + func (config *RCConfig) GetReplicas() int + func (config *RCConfig) GetScalesGetter() scaleclient.ScalesGetter + func (config *RCConfig) Run() error + func (config *RCConfig) SetClient(c clientset.Interface) + func (config *RCConfig) SetScalesClient(getter scaleclient.ScalesGetter) + func (rc *RCConfig) RCConfigLog(fmt string, args ...interface{}) + type RCStartupStatus struct + ContainerRestartNodes sets.String + Created []*v1.Pod + Expected int + FailedContainers int + Inactive int + Pending int + Running int + RunningButNotReady int + Scheduled int + Terminating int + Unknown int + Waiting int + func ComputeRCStartupStatus(pods []*v1.Pod, expected int) RCStartupStatus + func (s *RCStartupStatus) String(name string) string + type ReplicaSetConfig struct + func (config *ReplicaSetConfig) GetGroupResource() schema.GroupResource + func (config *ReplicaSetConfig) GetGroupVersionResource() schema.GroupVersionResource + func (config *ReplicaSetConfig) GetKind() schema.GroupKind + func (config *ReplicaSetConfig) Run() error + type RunObjectConfig interface + GetClient func() clientset.Interface + GetGroupResource func() schema.GroupResource + GetGroupVersionResource func() schema.GroupVersionResource + GetKind func() schema.GroupKind + GetLabelValue func(string) (string, bool) + GetName func() string + GetNamespace func() string + GetReplicas func() int + GetScalesGetter func() scaleclient.ScalesGetter + Run func() error + SetClient func(clientset.Interface) + SetScalesClient func(scaleclient.ScalesGetter) + type SecretConfig struct + Client clientset.Interface + Content map[string]string + LogFunc func(fmt string, args ...interface{}) + Name string + Namespace string + func (config *SecretConfig) Run() error + func (config *SecretConfig) Stop() error + type TestNodePreparer interface + CleanupNodes func() error + PrepareNodes func() error + type TestPodCreateStrategy func(client clientset.Interface, namespace string, podCount int) error + func NewCreatePodWithPersistentVolumeStrategy(claimTemplate *v1.PersistentVolumeClaim, factory volumeFactory, ...) TestPodCreateStrategy + func NewCustomCreatePodStrategy(podTemplate *v1.Pod) TestPodCreateStrategy + func NewSimpleCreatePodStrategy() TestPodCreateStrategy + func NewSimpleWithControllerCreatePodStrategy(controllerName string) TestPodCreateStrategy + type TestPodCreator struct + Client clientset.Interface + Config *TestPodCreatorConfig + func NewTestPodCreator(client clientset.Interface, config *TestPodCreatorConfig) *TestPodCreator + func (c *TestPodCreator) CreatePods() error + type TestPodCreatorConfig map[string][]CountToPodStrategy + func NewTestPodCreatorConfig() *TestPodCreatorConfig + func (c *TestPodCreatorConfig) AddStrategy(namespace string, podCount int, strategy TestPodCreateStrategy) + type TrivialNodePrepareStrategy struct + func (*TrivialNodePrepareStrategy) CleanupDependentObjects(nodeName string, client clientset.Interface) error + func (*TrivialNodePrepareStrategy) CleanupNode(node *v1.Node) *v1.Node + func (*TrivialNodePrepareStrategy) PrepareDependentObjects(node *v1.Node, client clientset.Interface) error + func (*TrivialNodePrepareStrategy) PreparePatch(*v1.Node) []byte + type UpdateDeploymentFunc func(d *apps.Deployment) + type UpdateReplicaSetFunc func(d *apps.ReplicaSet)