generator

package
v2.26.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// UserID holds a test user ID.
	UserID = "1233"
	// UserName holds a test user name.
	UserName = "user1"
	// UserEmail holds a test user email.
	UserEmail = "john@acme.com"
	// ClusterID holds the test cluster ID.
	ClusterID = "AbcClusterID"
	// DefaultClusterID holds the test default cluster ID.
	DefaultClusterID = "defClusterID"
	// DefaultClusterName holds the test default cluster name.
	DefaultClusterName = "defClusterName"
	// ProjectName holds the test project ID.
	ProjectName = "my-first-project-ID"
	// TestOSdomain OpenStack domain.
	TestOSdomain = "OSdomain"
	// TestOSuserPass OpenStack user password.
	TestOSuserPass = "OSpass"
	// TestOSuserName OpenStack user name.
	TestOSuserName = "OSuser"
	// TestFakeCredential Fake provider credential name.
	TestFakeCredential = "fake"
)

Variables

View Source
var (
	// UserLastSeen hold a time the user was last seen.
	UserLastSeen = time.Date(2020, time.December, 31, 23, 0, 0, 0, time.UTC)
)

Functions

func DefaultCreationTimestamp

func DefaultCreationTimestamp() time.Time

DefaultCreationTimestamp returns default test timestamp.

func GenAdminUser

func GenAdminUser(name, email string, isAdmin bool) *kubermaticv1.User

func GenApplicationDefinition

func GenApplicationDefinition(name string) *appskubermaticv1.ApplicationDefinition

func GenBinding

func GenBinding(projectID, email, group string) *kubermaticv1.UserProjectBinding

GenBinding generates a binding.

func GenBlacklistTokenSecret

func GenBlacklistTokenSecret(name string, tokens []byte) *corev1.Secret

func GenCluster

func GenCluster(id string, name string, projectID string, creationTime time.Time, modifiers ...func(*kubermaticv1.Cluster)) *kubermaticv1.Cluster

func GenClusterTemplate

func GenClusterTemplate(name, id, projectID, scope, userEmail string) *kubermaticv1.ClusterTemplate

func GenClusterTemplateInstance

func GenClusterTemplateInstance(projectID, templateID, owner string, replicas int64) *kubermaticv1.ClusterTemplateInstance

func GenConstraint

func GenConstraint(name, namespace, kind string) *kubermaticv1.Constraint

func GenConstraintTemplate

func GenConstraintTemplate(name string) *kubermaticv1.ConstraintTemplate

func GenDefaultAPIConstraint

func GenDefaultAPIConstraint(name, kind string) apiv2.Constraint

func GenDefaultCluster

func GenDefaultCluster() *kubermaticv1.Cluster

func GenDefaultKubermaticObjects

func GenDefaultKubermaticObjects(objs ...ctrlruntimeclient.Object) []ctrlruntimeclient.Object

GenDefaultKubermaticObjects generates default kubermatic object.

func GenDefaultOwnerBinding

func GenDefaultOwnerBinding() *kubermaticv1.UserProjectBinding

GenDefaultOwnerBinding generates default owner binding.

func GenDefaultPreset

func GenDefaultPreset() *kubermaticv1.Preset

func GenDefaultProject

func GenDefaultProject() *kubermaticv1.Project

GenDefaultProject generates a default project.

func GenDefaultUser

func GenDefaultUser() *kubermaticv1.User

GenDefaultUser generates a default user.

func GenGroupBinding

func GenGroupBinding(projectID, groupName, role string) *kubermaticv1.GroupProjectBinding

GenGroupBinding generates a binding.

func GenMLAAdminSetting

func GenMLAAdminSetting(name, clusterName string, value int32) *kubermaticv1.MLAAdminSetting

func GenProject

func GenProject(name string, phase kubermaticv1.ProjectPhase, creationTime time.Time) *kubermaticv1.Project

GenProject generates new empty project.

func GenRuleGroup

func GenRuleGroup(name, clusterName string, ruleGroupType kubermaticv1.RuleGroupType, isDefault bool) *kubermaticv1.RuleGroup

func GenTestMachine

func GenTestMachine(name, rawProviderSpec string, labels map[string]string, ownerRef []metav1.OwnerReference) *clusterv1alpha1.Machine

func GenTestSeed

func GenTestSeed(modifiers ...func(seed *kubermaticv1.Seed)) *kubermaticv1.Seed

func GenUser

func GenUser(id, name, email string) *kubermaticv1.User

GenUser generates a User resource note if the id is empty then it will be auto generated.

func GenUserWithGroups

func GenUserWithGroups(id, name, email string, groups []string) *kubermaticv1.User

GenUserWithGroups generates a User resource note if the id is empty then it will be auto generated.

func GenerateTestRuleGroupData

func GenerateTestRuleGroupData(ruleGroupName string) []byte

func RegisterScheme

func RegisterScheme(builder runtime.SchemeBuilder) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL