Documentation ¶
Index ¶
- func CreateResource(kubeconfig *restclient.Config, apiResource metav1.APIResource, ...) (*unstructured.Unstructured, error)
- func Equivalent(actual, desired pkgruntime.Object) bool
- func GetGenericStatus(client genericclient.Client, gvk schema.GroupVersionKind, ...) (*status.GenericFederatedStatus, error)
- func GetTypeConfig(genericClient client.Client, name, namespace string) (typeconfig.Interface, error)
- func NewDNSEndpoint(dnsName string, targets []string, recordType string, recordTTL dnsv1a1.TTL) *dnsv1a1.Endpoint
- func NewDomainObject(federation, domain string) *dnsv1a1.Domain
- func NewEndpointObject(name, namespace string) *apiv1.Endpoints
- func NewIngressDNSObject(baseName, namespace string) *dnsv1a1.IngressDNSRecord
- func NewIngressObject(name, namespace string) *extv1b1.Ingress
- func NewServiceDNSObject(baseName, namespace string) *dnsv1a1.ServiceDNSRecord
- func NewServiceObject(name, namespace string) *apiv1.Service
- func NewTestObject(typeConfig typeconfig.Interface, namespace string, clusterNames []string, ...) (*unstructured.Unstructured, error)
- func NewTestTargetObject(typeConfig typeconfig.Interface, namespace string, ...) (*unstructured.Unstructured, error)
- func OverridesFromFixture(clusterNames []string, fixture *unstructured.Unstructured) ([]interface{}, error)
- func TypeConfigFixturesOrDie(tl TestLogger) map[string]*unstructured.Unstructured
- func ValidKubeFedCluster() *v1beta1.KubeFedCluster
- func WaitForNamespaceOrDie(tl TestLogger, client kubeclientset.Interface, clusterName, namespace string, ...)
- type FederatedTypeCrudTester
- func (c *FederatedTypeCrudTester) CheckCreate(targetObject *unstructured.Unstructured, overrides []interface{}) *unstructured.Unstructured
- func (c *FederatedTypeCrudTester) CheckDelete(fedObject *unstructured.Unstructured, orphanDependents bool)
- func (c *FederatedTypeCrudTester) CheckLifecycle(targetObject *unstructured.Unstructured, overrides []interface{})
- func (c *FederatedTypeCrudTester) CheckPlacementChange(fedObject *unstructured.Unstructured)
- func (c *FederatedTypeCrudTester) CheckPropagation(fedObject *unstructured.Unstructured)
- func (c *FederatedTypeCrudTester) CheckStatusCreated(qualifiedName util.QualifiedName)
- func (c *FederatedTypeCrudTester) CheckUpdate(fedObject *unstructured.Unstructured)
- func (c *FederatedTypeCrudTester) Create(targetObject *unstructured.Unstructured, overrides []interface{}) *unstructured.Unstructured
- func (c *FederatedTypeCrudTester) TestClusters() map[string]TestCluster
- type TestCluster
- type TestClusterConfig
- type TestLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateResource ¶ added in v0.0.7
func CreateResource(kubeconfig *restclient.Config, apiResource metav1.APIResource, desiredObj *unstructured.Unstructured) (*unstructured.Unstructured, error)
func Equivalent ¶
func Equivalent(actual, desired pkgruntime.Object) bool
func GetGenericStatus ¶
func GetGenericStatus(client genericclient.Client, gvk schema.GroupVersionKind, qualifiedName util.QualifiedName) (*status.GenericFederatedStatus, error)
GetGenericStatus retrieves a federated resource and converts it to the generic status interface.
func GetTypeConfig ¶ added in v0.0.7
func NewDNSEndpoint ¶ added in v0.0.2
func NewDomainObject ¶ added in v0.0.3
func NewEndpointObject ¶
func NewIngressDNSObject ¶ added in v0.0.2
func NewIngressDNSObject(baseName, namespace string) *dnsv1a1.IngressDNSRecord
func NewIngressObject ¶ added in v0.0.2
func NewServiceDNSObject ¶
func NewServiceDNSObject(baseName, namespace string) *dnsv1a1.ServiceDNSRecord
func NewServiceObject ¶
func NewTestObject ¶ added in v0.0.6
func NewTestObject(typeConfig typeconfig.Interface, namespace string, clusterNames []string, fixture *unstructured.Unstructured) (*unstructured.Unstructured, error)
func NewTestTargetObject ¶ added in v0.0.7
func NewTestTargetObject(typeConfig typeconfig.Interface, namespace string, fixture *unstructured.Unstructured) (*unstructured.Unstructured, error)
func OverridesFromFixture ¶ added in v0.0.7
func OverridesFromFixture(clusterNames []string, fixture *unstructured.Unstructured) ([]interface{}, error)
func TypeConfigFixturesOrDie ¶ added in v0.0.4
func TypeConfigFixturesOrDie(tl TestLogger) map[string]*unstructured.Unstructured
func ValidKubeFedCluster ¶
func ValidKubeFedCluster() *v1beta1.KubeFedCluster
func WaitForNamespaceOrDie ¶ added in v0.0.2
func WaitForNamespaceOrDie(tl TestLogger, client kubeclientset.Interface, clusterName, namespace string, interval, timeout time.Duration)
WaitForNamespace waits for namespace to be created in a cluster.
Types ¶
type FederatedTypeCrudTester ¶
type FederatedTypeCrudTester struct {
// contains filtered or unexported fields
}
FederatedTypeCrudTester exercises Create/Read/Update/Delete operations for federated types via the KubeFed API and validates that the results of those operations are propagated to clusters registered with the KubeFed control plane.
func NewFederatedTypeCrudTester ¶
func NewFederatedTypeCrudTester(testLogger TestLogger, typeConfig typeconfig.Interface, kubeConfig *rest.Config, testClusters map[string]TestCluster, waitInterval, clusterWaitTimeout time.Duration) (*FederatedTypeCrudTester, error)
func (*FederatedTypeCrudTester) CheckCreate ¶
func (c *FederatedTypeCrudTester) CheckCreate(targetObject *unstructured.Unstructured, overrides []interface{}) *unstructured.Unstructured
func (*FederatedTypeCrudTester) CheckDelete ¶
func (c *FederatedTypeCrudTester) CheckDelete(fedObject *unstructured.Unstructured, orphanDependents bool)
func (*FederatedTypeCrudTester) CheckLifecycle ¶
func (c *FederatedTypeCrudTester) CheckLifecycle(targetObject *unstructured.Unstructured, overrides []interface{})
func (*FederatedTypeCrudTester) CheckPlacementChange ¶
func (c *FederatedTypeCrudTester) CheckPlacementChange(fedObject *unstructured.Unstructured)
CheckPlacementChange verifies that a change in the list of clusters in a placement resource has the desired impact on member cluster state.
func (*FederatedTypeCrudTester) CheckPropagation ¶
func (c *FederatedTypeCrudTester) CheckPropagation(fedObject *unstructured.Unstructured)
CheckPropagation checks propagation for the crud tester's clients
func (*FederatedTypeCrudTester) CheckStatusCreated ¶ added in v0.0.3
func (c *FederatedTypeCrudTester) CheckStatusCreated(qualifiedName util.QualifiedName)
func (*FederatedTypeCrudTester) CheckUpdate ¶
func (c *FederatedTypeCrudTester) CheckUpdate(fedObject *unstructured.Unstructured)
func (*FederatedTypeCrudTester) Create ¶
func (c *FederatedTypeCrudTester) Create(targetObject *unstructured.Unstructured, overrides []interface{}) *unstructured.Unstructured
func (*FederatedTypeCrudTester) TestClusters ¶ added in v0.0.2
func (c *FederatedTypeCrudTester) TestClusters() map[string]TestCluster
type TestCluster ¶
type TestCluster struct { TestClusterConfig Client util.ResourceClient }
type TestClusterConfig ¶ added in v0.0.3
type TestLogger ¶
type TestLogger interface { Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Log(args ...interface{}) Logf(format string, args ...interface{}) }
TestLogger defines operations common across different types of testing