Documentation ¶
Index ¶
- Constants
- Variables
- func AreEqualWithIgnoringLastTransitionTime(c1, c2 *capi.Condition) bool
- func EnsureCRExist(ctx context.Context, t *testing.T, client ctrl.Client, manifestPath string) error
- func GetTestedCluster(ctx context.Context, t *testing.T, client ctrl.Client, manifestPath string) (*capi.Cluster, error)
- func ListMachinePoolsByClusterID(ctx context.Context, c client.Client, clusterNamespace, clusterID string) (*capiexp.MachinePoolList, error)
- func ListMachinePoolsByMetadata(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*capiexp.MachinePoolList, error)
- func LoadCR(manifestPath string) (ctrl.Object, error)
- func NewFakeClient(addToSchemeFuncs ...func(s *runtime.Scheme) error) ctrl.Client
- func SprintComparedCondition(condition *capi.Condition) string
- type Handler
- type HandlerConfig
- type MockProviderCluster
- func (c *MockProviderCluster) DeepCopyInto(out *MockProviderCluster)
- func (c *MockProviderCluster) DeepCopyObject() runtime.Object
- func (c *MockProviderCluster) GetConditions() capi.Conditions
- func (c *MockProviderCluster) GetObjectKind() schema.ObjectKind
- func (c *MockProviderCluster) GroupVersionKind() schema.GroupVersionKind
- func (c *MockProviderCluster) SetConditions(conditions capi.Conditions)
- type MockProviderClusterList
- type MockProviderClusterSpec
- type MockProviderClusterStatus
Constants ¶
View Source
const ( // lastDeployedReleaseVersion is the version annotation put into Cluster CR to // define which Giant Swarm release version was last successfully deployed // during cluster creation or upgrade. Versions are defined as semver version // without the "v" prefix, e.g. 14.1.0, which means that cluster was created // with or upgraded to Giant Swarm release v14.1.0. LastDeployedReleaseVersion = "release.giantswarm.io/last-deployed-version" // UpgradingToNodePools is set to True during the first cluster upgrade to node pools release. UpgradingToNodePools = "release.giantswarm.io/upgrading-to-node-pools" )
Variables ¶
View Source
var (
// AddMockToScheme is used by the generated client.
AddMockToScheme = schemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{
Group: group,
Version: version,
}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func AreEqualWithIgnoringLastTransitionTime ¶ added in v0.1.2
AreEqualWithIgnoringLastTransitionTime is checking if two conditions are have all fields equal, except LastTransitionTime.
func EnsureCRExist ¶
func GetTestedCluster ¶
func ListMachinePoolsByMetadata ¶
func ListMachinePoolsByMetadata(ctx context.Context, c client.Client, obj metav1.ObjectMeta) (*capiexp.MachinePoolList, error)
func NewFakeClient ¶
func SprintComparedCondition ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(config HandlerConfig) (*Handler, error)
func (*Handler) EnsureCreated ¶
func (*Handler) EnsureDeleted ¶
type HandlerConfig ¶
type HandlerConfig struct { CtrlClient ctrl.Client Logger micrologger.Logger UpdateStatus bool ConditionType capi.ConditionType EnsureCreatedFunc func(ctx context.Context, object conditions.Object) error EnsureDeletedFunc func(ctx context.Context, object conditions.Object) error }
type MockProviderCluster ¶
type MockProviderCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MockProviderClusterSpec `json:"spec,omitempty"` Status MockProviderClusterStatus `json:"status,omitempty"` }
MockProviderCluster is the Schema for the mockproviderclusters API
func (*MockProviderCluster) DeepCopyInto ¶
func (c *MockProviderCluster) DeepCopyInto(out *MockProviderCluster)
func (*MockProviderCluster) DeepCopyObject ¶
func (c *MockProviderCluster) DeepCopyObject() runtime.Object
func (*MockProviderCluster) GetConditions ¶
func (c *MockProviderCluster) GetConditions() capi.Conditions
GetConditions returns the list of conditions for an MockProviderCluster API object.
func (*MockProviderCluster) GetObjectKind ¶
func (c *MockProviderCluster) GetObjectKind() schema.ObjectKind
func (*MockProviderCluster) GroupVersionKind ¶
func (c *MockProviderCluster) GroupVersionKind() schema.GroupVersionKind
func (*MockProviderCluster) SetConditions ¶
func (c *MockProviderCluster) SetConditions(conditions capi.Conditions)
SetConditions will set the given conditions on an MockProviderCluster object
type MockProviderClusterList ¶
type MockProviderClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []MockProviderCluster `json:"items"` }
func (*MockProviderClusterList) DeepCopyObject ¶
func (c *MockProviderClusterList) DeepCopyObject() runtime.Object
func (*MockProviderClusterList) GetObjectKind ¶
func (c *MockProviderClusterList) GetObjectKind() schema.ObjectKind
func (*MockProviderClusterList) GroupVersionKind ¶
func (c *MockProviderClusterList) GroupVersionKind() schema.GroupVersionKind
type MockProviderClusterSpec ¶
type MockProviderClusterSpec struct{}
MockProviderClusterSpec defines the desired state of MockProviderCluster
type MockProviderClusterStatus ¶
type MockProviderClusterStatus struct {
Conditions capi.Conditions `json:"conditions,omitempty"`
}
MockProviderClusterStatus defines the observed state of MockProviderCluster
Click to show internal directories.
Click to hide internal directories.