Documentation ¶
Index ¶
- Constants
- Variables
- func APIUserToKubermaticUser(user apiv1.User) *kubermaticv1.User
- func CheckStatusCode(wantStatusCode int, recorder *httptest.ResponseRecorder, t *testing.T)
- func CompareVersions(t *testing.T, versions, expected []*apiv1.MasterVersion)
- func CompareWithResult(t *testing.T, res *httptest.ResponseRecorder, response string)
- func CreateRawVariables(t *testing.T, in map[string]interface{}) *runtime.RawExtension
- func CreateTestEndpoint(user apiv1.User, kubeObjects, kubermaticObjects []ctrlruntimeclient.Object, ...) (http.Handler, error)
- func CreateTestSeedsGetter(ctx context.Context, client ctrlruntimeclient.Client) provider.SeedsGetter
- func DefaultCreationTimestamp() time.Time
- func GenAPIEtcdBackupConfig(id, name, clusterID string) *apiv2.EtcdBackupConfig
- func GenAPIEtcdRestore(name, clusterID string) *apiv2.EtcdRestore
- func GenAPIMLAAdminSetting(value int32) *apiv2.MLAAdminSetting
- func GenAPIRuleGroup(name string, ruleGroupType kubermaticv1.RuleGroupType) *apiv2.RuleGroup
- func GenAPIUser(name, email string) *apiv1.User
- func GenAdminUser(name, email string, isAdmin bool) *kubermaticv1.User
- func GenAlertmanager(namespace, configSecretName string) *kubermaticv1.Alertmanager
- func GenAlertmanagerConfigSecret(name, namespace string, config []byte) *corev1.Secret
- func GenAllowedRegistry(name, registryPrefix string) *kubermaticv1.AllowedRegistry
- func GenBinding(projectID, email, group string) *kubermaticv1.UserProjectBinding
- func GenBlacklistTokenSecret(name string, tokens []byte) *corev1.Secret
- func GenCluster(id string, name string, projectID string, creationTime time.Time, ...) *kubermaticv1.Cluster
- func GenClusterTemplate(name, id, projectID, scope, userEmail string) *kubermaticv1.ClusterTemplate
- func GenClusterTemplateInstance(projectID, templateID string, replicas int64) *kubermaticv1.ClusterTemplateInstance
- func GenClusterWithOpenstack(cluster *kubermaticv1.Cluster) *kubermaticv1.Cluster
- func GenConstraint(name, namespace, kind string) *kubermaticv1.Constraint
- func GenConstraintTemplate(name string) *kubermaticv1.ConstraintTemplate
- func GenDefaultAPIAllowedRegistry(name, registryPrefix string) apiv2.AllowedRegistry
- func GenDefaultAPIBackupCredentials() *apiv2.BackupCredentials
- func GenDefaultAPIConstraint(name, kind string) apiv2.Constraint
- func GenDefaultAPIUser() *apiv1.User
- func GenDefaultAdminAPIUser() *apiv1.User
- func GenDefaultBackupCredentials() *corev1.Secret
- func GenDefaultCluster() *kubermaticv1.Cluster
- func GenDefaultClusterRole(name string) *rbacv1.ClusterRole
- func GenDefaultClusterRoleBinding(name, roleID, userEmail string) *rbacv1.ClusterRoleBinding
- func GenDefaultConstraintTemplate(name string) apiv2.ConstraintTemplate
- func GenDefaultExpiry() (apiv1.Time, error)
- func GenDefaultExternalClusterNode() (*corev1.Node, error)
- func GenDefaultExternalClusterNodes() ([]ctrlruntimeclient.Object, error)
- func GenDefaultGlobalSettings() *kubermaticv1.KubermaticSetting
- func GenDefaultGroupClusterRoleBinding(name, roleID, group string) *rbacv1.ClusterRoleBinding
- func GenDefaultGroupRoleBinding(name, namespace, roleID, group string) *rbacv1.RoleBinding
- func GenDefaultKubermaticObjects(objs ...ctrlruntimeclient.Object) []ctrlruntimeclient.Object
- func GenDefaultOwnerBinding() *kubermaticv1.UserProjectBinding
- func GenDefaultPreset() *kubermaticv1.Preset
- func GenDefaultProject() *kubermaticv1.Project
- func GenDefaultRole(name, namespace string) *rbacv1.Role
- func GenDefaultRoleBinding(name, namespace, roleID, userEmail string) *rbacv1.RoleBinding
- func GenDefaultSaToken(projectID, saID, name, id string) *corev1.Secret
- func GenDefaultSettings() *kubermaticv1.KubermaticSetting
- func GenDefaultUser() *kubermaticv1.User
- func GenDefaultVersions() []*version.Version
- func GenEtcdBackupConfig(id, name string, cluster *kubermaticv1.Cluster, projectID string) *kubermaticv1.EtcdBackupConfig
- func GenEtcdRestore(name string, cluster *kubermaticv1.Cluster, projectID string) *kubermaticv1.EtcdRestore
- func GenInactiveProjectServiceAccount(id, name, group, projectName string) *kubermaticv1.User
- func GenMLAAdminSetting(name, clusterName string, value int32) *kubermaticv1.MLAAdminSetting
- func GenMainServiceAccount(id, name, group, ownerEmail string) *kubermaticv1.User
- func GenProject(name, phase string, creationTime time.Time, oRef ...metav1.OwnerReference) *kubermaticv1.Project
- func GenProjectServiceAccount(id, name, group, projectName string) *kubermaticv1.User
- func GenRuleGroup(name, clusterName string, ruleGroupType kubermaticv1.RuleGroupType) *kubermaticv1.RuleGroup
- func GenTestAddon(name string, variables *runtime.RawExtension, cluster *kubermaticv1.Cluster, ...) *kubermaticv1.Addon
- func GenTestEvent(eventName, eventType, eventReason, eventMessage, kind, uid string) *corev1.Event
- func GenTestMachine(name, rawProviderSpec string, labels map[string]string, ...) *clusterv1alpha1.Machine
- func GenTestMachineDeployment(name, rawProviderSpec string, selector map[string]string, dynamicConfig bool) *clusterv1alpha1.MachineDeployment
- func GenTestSeed(modifiers ...func(seed *kubermaticv1.Seed)) *kubermaticv1.Seed
- func GenUser(id, name, email string) *kubermaticv1.User
- func GenerateTestKubeconfig(clusterID, token string) string
- func GenerateTestRuleGroupData(ruleGroupName string) []byte
- func GetUser(email, id, name string) apiv1.User
- func RegisterScheme(builder runtime.SchemeBuilder) error
- type ClientsSets
- type ConstraintSpec
- type ConstraintStatus
- type FakeConstraintProvider
- func (p *FakeConstraintProvider) Create(userInfo *provider.UserInfo, constraint *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
- func (p *FakeConstraintProvider) Delete(cluster *kubermaticapiv1.Cluster, userInfo *provider.UserInfo, name string) error
- func (p *FakeConstraintProvider) Get(cluster *kubermaticapiv1.Cluster, name string) (*kubermaticapiv1.Constraint, error)
- func (p *FakeConstraintProvider) List(cluster *kubermaticapiv1.Cluster) (*kubermaticapiv1.ConstraintList, error)
- func (p *FakeConstraintProvider) Update(userInfo *provider.UserInfo, constraint *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
- type FakeConstraintTemplateProvider
- func (p *FakeConstraintTemplateProvider) Create(ct *kubermaticapiv1.ConstraintTemplate) (*kubermaticapiv1.ConstraintTemplate, error)
- func (p *FakeConstraintTemplateProvider) Delete(ct *kubermaticapiv1.ConstraintTemplate) error
- func (p *FakeConstraintTemplateProvider) Get(name string) (*kubermaticapiv1.ConstraintTemplate, error)
- func (p *FakeConstraintTemplateProvider) List() (*kubermaticapiv1.ConstraintTemplateList, error)
- func (p *FakeConstraintTemplateProvider) Update(ct *kubermaticapiv1.ConstraintTemplate) (*kubermaticapiv1.ConstraintTemplate, error)
- type FakeDefaultConstraintProvider
- func (p *FakeDefaultConstraintProvider) Create(ct *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
- func (p *FakeDefaultConstraintProvider) Delete(name string) error
- func (p *FakeDefaultConstraintProvider) Get(name string) (*kubermaticapiv1.Constraint, error)
- func (p *FakeDefaultConstraintProvider) List() (*kubermaticapiv1.ConstraintList, error)
- func (p *FakeDefaultConstraintProvider) Update(constraint *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
- type FakeEtcdBackupConfigProvider
- func (p *FakeEtcdBackupConfigProvider) Create(userInfo *provider.UserInfo, ebc *kubermaticapiv1.EtcdBackupConfig) (*kubermaticapiv1.EtcdBackupConfig, error)
- func (p *FakeEtcdBackupConfigProvider) Delete(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) error
- func (p *FakeEtcdBackupConfigProvider) Get(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) (*kubermaticapiv1.EtcdBackupConfig, error)
- func (p *FakeEtcdBackupConfigProvider) List(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster) (*kubermaticapiv1.EtcdBackupConfigList, error)
- func (p *FakeEtcdBackupConfigProvider) Patch(userInfo *provider.UserInfo, old, new *kubermaticapiv1.EtcdBackupConfig) (*kubermaticapiv1.EtcdBackupConfig, error)
- type FakeEtcdRestoreProvider
- func (p *FakeEtcdRestoreProvider) Create(userInfo *provider.UserInfo, ebc *kubermaticapiv1.EtcdRestore) (*kubermaticapiv1.EtcdRestore, error)
- func (p *FakeEtcdRestoreProvider) Delete(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) error
- func (p *FakeEtcdRestoreProvider) Get(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) (*kubermaticapiv1.EtcdRestore, error)
- func (p *FakeEtcdRestoreProvider) List(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster) (*kubermaticapiv1.EtcdRestoreList, error)
- type FakeExternalClusterProvider
- func (p *FakeExternalClusterProvider) CreateOrUpdateKubeconfigSecretForCluster(ctx context.Context, cluster *kubermaticapiv1.ExternalCluster, ...) error
- func (p *FakeExternalClusterProvider) Delete(userInfo *provider.UserInfo, cluster *kubermaticapiv1.ExternalCluster) error
- func (p *FakeExternalClusterProvider) GenerateClient(cfg *clientcmdapi.Config) (ctrlruntimeclient.Client, error)
- func (p *FakeExternalClusterProvider) Get(userInfo *provider.UserInfo, clusterName string) (*kubermaticapiv1.ExternalCluster, error)
- func (p *FakeExternalClusterProvider) GetClient(cluster *kubermaticapiv1.ExternalCluster) (ctrlruntimeclient.Client, error)
- func (p *FakeExternalClusterProvider) GetNode(cluster *kubermaticapiv1.ExternalCluster, nodeName string) (*corev1.Node, error)
- func (p *FakeExternalClusterProvider) GetVersion(cluster *kubermaticapiv1.ExternalCluster) (*semver.Semver, error)
- func (p *FakeExternalClusterProvider) IsMetricServerAvailable(cluster *kubermaticapiv1.ExternalCluster) (bool, error)
- func (p *FakeExternalClusterProvider) List(project *kubermaticapiv1.Project) (*kubermaticapiv1.ExternalClusterList, error)
- func (p *FakeExternalClusterProvider) ListNodes(cluster *kubermaticapiv1.ExternalCluster) (*corev1.NodeList, error)
- func (p *FakeExternalClusterProvider) New(userInfo *provider.UserInfo, project *kubermaticapiv1.Project, ...) (*kubermaticapiv1.ExternalCluster, error)
- func (p *FakeExternalClusterProvider) Update(userInfo *provider.UserInfo, cluster *kubermaticapiv1.ExternalCluster) (*kubermaticapiv1.ExternalCluster, error)
- type FakePrivilegedAllowedRegistryProvider
- func (p *FakePrivilegedAllowedRegistryProvider) CreateUnsecured(wr *kubermaticapiv1.AllowedRegistry) (*kubermaticapiv1.AllowedRegistry, error)
- func (p *FakePrivilegedAllowedRegistryProvider) DeleteUnsecured(name string) error
- func (p *FakePrivilegedAllowedRegistryProvider) GetUnsecured(name string) (*kubermaticapiv1.AllowedRegistry, error)
- func (p *FakePrivilegedAllowedRegistryProvider) ListUnsecured() (*kubermaticapiv1.AllowedRegistryList, error)
- func (p *FakePrivilegedAllowedRegistryProvider) UpdateUnsecured(wr *kubermaticapiv1.AllowedRegistry) (*kubermaticapiv1.AllowedRegistry, error)
- type FakePrivilegedProjectProvider
- func (f *FakePrivilegedProjectProvider) DeleteUnsecured(projectInternalName string) error
- func (f *FakePrivilegedProjectProvider) GetUnsecured(projectInternalName string, options *provider.ProjectGetOptions) (*kubermaticapiv1.Project, error)
- func (f *FakePrivilegedProjectProvider) UpdateUnsecured(project *kubermaticapiv1.Project) (*kubermaticapiv1.Project, error)
- type FakeProjectProvider
- func (f *FakeProjectProvider) Delete(userInfo *provider.UserInfo, projectInternalName string) error
- func (f *FakeProjectProvider) Get(userInfo *provider.UserInfo, projectInternalName string, ...) (*kubermaticapiv1.Project, error)
- func (f *FakeProjectProvider) List(options *provider.ProjectListOptions) ([]*kubermaticapiv1.Project, error)
- func (f *FakeProjectProvider) New(user []*kubermaticapiv1.User, name string, labels map[string]string) (*kubermaticapiv1.Project, error)
- func (f *FakeProjectProvider) Update(userInfo *provider.UserInfo, newProject *kubermaticapiv1.Project) (*kubermaticapiv1.Project, error)
- type IssuerVerifier
- func (o *IssuerVerifier) AuthCodeURL(state string, offlineAsScope bool, scopes ...string) string
- func (o *IssuerVerifier) Exchange(ctx context.Context, code string) (auth.OIDCToken, error)
- func (o *IssuerVerifier) Extract(_ *http.Request) (string, error)
- func (o *IssuerVerifier) Verify(ctx context.Context, token string) (auth.TokenClaims, error)
- type NewAddonSliceWrapper
- type NewAllowedRegistrySliceWrapper
- type NewClusterTemplateSliceWrapper
- type NewClusterV1SliceWrapper
- type NewConstraintTemplateV1SliceWrapper
- type NewConstraintsSliceWrapper
- type NewEtcdBackupConfigSliceWrapper
- type NewEtcdRestoreSliceWrapper
- type NewRoleNameSliceWrapper
- type NewRuleGroupSliceWrapper
- type NewSSHKeyV1SliceWrapper
- type NewServiceAccountTokenV1SliceWrapper
- type NewServiceAccountV1SliceWrapper
- type NewUserV1SliceWrapper
- type NodeDeploymentSliceWrapper
- type NodeV1SliceWrapper
- type OicdProvider
- type ProjectV1SliceWrapper
- type RequiredLabel
- type RequiredLabelList
- type UniqueLabel
- type UniqueLabelList
- type Violation
Constants ¶
const ( // AuthorizationCode represents a shared secret used by IssuerVerifier // TODO: consider injecting it into IssuerVerifier AuthorizationCode = "fakeCode" // IDToken represents a shared fake token IDToken = "fakeTokenId" IDViewerToken = "fakeViewerTokenId" // IssuerURL holds test issuer URL IssuerURL = "url://dex" // IssuerClientID holds test issuer client ID IssuerClientID = "kubermatic" // IssuerClientSecret holds test issuer client secret IssuerClientSecret = "secret" )
const ( NoExistingFakeProject = "NoExistingFakeProject" NoExistingFakeProjectID = "NoExistingFakeProject-ID" ForbiddenFakeProject = "ForbiddenFakeProject" ForbiddenFakeProjectID = "ForbiddenFakeProject-ID" ExistingFakeProject = "ExistingFakeProject" ExistingFakeProjectID = "ExistingFakeProject-ID" ImpersonatedClientErrorMsg = "forbidden" )
const ( // UserID holds a test user ID UserID = "1233" // UserID2 holds a test user ID UserID2 = "1523" // UserName holds a test user name UserName = "user1" // UserName2 holds a test user name UserName2 = "user2" // UserEmail holds a test user email UserEmail = "john@acme.com" // UserEmail2 holds a test user email UserEmail2 = "bob@example.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" // TestDatacenter holds datacenter name TestSeedDatacenter = "us-central1" // TestServiceAccountHashKey authenticates the service account's token value using HMAC TestServiceAccountHashKey = "eyJhbGciOiJIUzI1NeyJhbGciOiJIUzI1N" // TestFakeToken signed JWT token with fake data TestFakeToken = "" /* 193-byte string literal not displayed */ // TestOSdomain OpenStack domain TestOSdomain = "OSdomain" // TestOSuserPass OpenStack user password TestOSuserPass = "OSpass" // TestOSuserName OpenStack user name TestOSuserName = "OSuser" // TestFakeCredential Fake provider credential name TestFakeCredential = "fake" // RequiredEmailDomain required domain for predefined credentials RequiredEmailDomain = "acme.com" // DefaultKubernetesVersion kubernetes version DefaultKubernetesVersion = "1.22.2" // Kubermatic namespace KubermaticNamespace = "kubermatic" )
Variables ¶
var SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
var SchemeGroupVersion = schema.GroupVersion{Group: constraint.ConstraintsGroup, Version: constraint.ConstraintsVersion}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func APIUserToKubermaticUser ¶
func APIUserToKubermaticUser(user apiv1.User) *kubermaticv1.User
APIUserToKubermaticUser simply converts apiv1.User to kubermaticv1.User type
func CheckStatusCode ¶
func CheckStatusCode(wantStatusCode int, recorder *httptest.ResponseRecorder, t *testing.T)
func CompareVersions ¶
func CompareVersions(t *testing.T, versions, expected []*apiv1.MasterVersion)
func CompareWithResult ¶
func CompareWithResult(t *testing.T, res *httptest.ResponseRecorder, response string)
CompareWithResult a convenience function for comparing http.Body content with response
func CreateRawVariables ¶ added in v2.16.3
func CreateRawVariables(t *testing.T, in map[string]interface{}) *runtime.RawExtension
func CreateTestEndpoint ¶
func CreateTestEndpoint(user apiv1.User, kubeObjects, kubermaticObjects []ctrlruntimeclient.Object, versions []*version.Version, updates []*version.Update, providerIncompatibilities []*version.ProviderIncompatibility, routingFunc newRoutingFunc) (http.Handler, error)
CreateTestEndpoint does exactly the same as CreateTestEndpointAndGetClients except it omits ClientsSets when returning
func CreateTestSeedsGetter ¶ added in v2.17.0
func CreateTestSeedsGetter(ctx context.Context, client ctrlruntimeclient.Client) provider.SeedsGetter
CreateTestSeedsGetter creates a SeedsGetter only useful for generic tests, as it does not follow the CE/EE conventions and always returns all Seeds.
func DefaultCreationTimestamp ¶
DefaultCreationTimestamp returns default test timestamp
func GenAPIEtcdBackupConfig ¶ added in v2.18.0
func GenAPIEtcdBackupConfig(id, name, clusterID string) *apiv2.EtcdBackupConfig
func GenAPIEtcdRestore ¶ added in v2.18.0
func GenAPIEtcdRestore(name, clusterID string) *apiv2.EtcdRestore
func GenAPIMLAAdminSetting ¶ added in v2.18.0
func GenAPIMLAAdminSetting(value int32) *apiv2.MLAAdminSetting
func GenAPIRuleGroup ¶ added in v2.18.0
func GenAPIRuleGroup(name string, ruleGroupType kubermaticv1.RuleGroupType) *apiv2.RuleGroup
func GenAdminUser ¶ added in v2.16.3
func GenAdminUser(name, email string, isAdmin bool) *kubermaticv1.User
func GenAlertmanager ¶ added in v2.18.0
func GenAlertmanager(namespace, configSecretName string) *kubermaticv1.Alertmanager
func GenAlertmanagerConfigSecret ¶ added in v2.18.0
func GenAllowedRegistry ¶ added in v2.18.0
func GenAllowedRegistry(name, registryPrefix string) *kubermaticv1.AllowedRegistry
func GenBinding ¶
func GenBinding(projectID, email, group string) *kubermaticv1.UserProjectBinding
GenBinding generates a binding
func GenBlacklistTokenSecret ¶
func GenCluster ¶
func GenCluster(id string, name string, projectID string, creationTime time.Time, modifiers ...func(*kubermaticv1.Cluster)) *kubermaticv1.Cluster
func GenClusterTemplate ¶ added in v2.18.0
func GenClusterTemplate(name, id, projectID, scope, userEmail string) *kubermaticv1.ClusterTemplate
func GenClusterTemplateInstance ¶ added in v2.18.0
func GenClusterTemplateInstance(projectID, templateID string, replicas int64) *kubermaticv1.ClusterTemplateInstance
func GenClusterWithOpenstack ¶
func GenClusterWithOpenstack(cluster *kubermaticv1.Cluster) *kubermaticv1.Cluster
func GenConstraint ¶ added in v2.16.3
func GenConstraint(name, namespace, kind string) *kubermaticv1.Constraint
func GenConstraintTemplate ¶ added in v2.16.3
func GenConstraintTemplate(name string) *kubermaticv1.ConstraintTemplate
func GenDefaultAPIAllowedRegistry ¶ added in v2.18.0
func GenDefaultAPIAllowedRegistry(name, registryPrefix string) apiv2.AllowedRegistry
func GenDefaultAPIBackupCredentials ¶ added in v2.18.0
func GenDefaultAPIBackupCredentials() *apiv2.BackupCredentials
func GenDefaultAPIConstraint ¶ added in v2.16.3
func GenDefaultAPIConstraint(name, kind string) apiv2.Constraint
func GenDefaultAPIUser ¶
GenDefaultAPIUser generates a default API user
func GenDefaultAdminAPIUser ¶
GenDefaultAdminAPIUser generates a default admin API user
func GenDefaultBackupCredentials ¶ added in v2.18.0
func GenDefaultCluster ¶
func GenDefaultCluster() *kubermaticv1.Cluster
func GenDefaultClusterRole ¶ added in v2.16.3
func GenDefaultClusterRole(name string) *rbacv1.ClusterRole
func GenDefaultClusterRoleBinding ¶ added in v2.16.3
func GenDefaultClusterRoleBinding(name, roleID, userEmail string) *rbacv1.ClusterRoleBinding
func GenDefaultConstraintTemplate ¶ added in v2.16.3
func GenDefaultConstraintTemplate(name string) apiv2.ConstraintTemplate
func GenDefaultExpiry ¶
func GenDefaultExternalClusterNodes ¶
func GenDefaultExternalClusterNodes() ([]ctrlruntimeclient.Object, error)
func GenDefaultGlobalSettings ¶
func GenDefaultGlobalSettings() *kubermaticv1.KubermaticSetting
func GenDefaultGroupClusterRoleBinding ¶ added in v2.16.3
func GenDefaultGroupClusterRoleBinding(name, roleID, group string) *rbacv1.ClusterRoleBinding
func GenDefaultGroupRoleBinding ¶ added in v2.16.3
func GenDefaultGroupRoleBinding(name, namespace, roleID, group string) *rbacv1.RoleBinding
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 GenDefaultRole ¶ added in v2.16.3
func GenDefaultRoleBinding ¶ added in v2.16.3
func GenDefaultRoleBinding(name, namespace, roleID, userEmail string) *rbacv1.RoleBinding
func GenDefaultSaToken ¶
func GenDefaultSettings ¶
func GenDefaultSettings() *kubermaticv1.KubermaticSetting
func GenDefaultUser ¶
func GenDefaultUser() *kubermaticv1.User
GenDefaultUser generates a default user
func GenDefaultVersions ¶
func GenEtcdBackupConfig ¶ added in v2.18.0
func GenEtcdBackupConfig(id, name string, cluster *kubermaticv1.Cluster, projectID string) *kubermaticv1.EtcdBackupConfig
func GenEtcdRestore ¶ added in v2.18.0
func GenEtcdRestore(name string, cluster *kubermaticv1.Cluster, projectID string) *kubermaticv1.EtcdRestore
func GenInactiveProjectServiceAccount ¶ added in v2.17.0
func GenInactiveProjectServiceAccount(id, name, group, projectName string) *kubermaticv1.User
GenInactiveProjectServiceAccount generates a Service Account resource
func GenMLAAdminSetting ¶ added in v2.18.0
func GenMLAAdminSetting(name, clusterName string, value int32) *kubermaticv1.MLAAdminSetting
func GenMainServiceAccount ¶ added in v2.17.0
func GenMainServiceAccount(id, name, group, ownerEmail string) *kubermaticv1.User
func GenProject ¶
func GenProject(name, phase string, creationTime time.Time, oRef ...metav1.OwnerReference) *kubermaticv1.Project
GenProject generates new empty project
func GenProjectServiceAccount ¶ added in v2.17.0
func GenProjectServiceAccount(id, name, group, projectName string) *kubermaticv1.User
func GenRuleGroup ¶ added in v2.18.0
func GenRuleGroup(name, clusterName string, ruleGroupType kubermaticv1.RuleGroupType) *kubermaticv1.RuleGroup
func GenTestAddon ¶
func GenTestAddon(name string, variables *runtime.RawExtension, cluster *kubermaticv1.Cluster, creationTime time.Time) *kubermaticv1.Addon
func GenTestEvent ¶
func GenTestMachine ¶
func GenTestMachine(name, rawProviderSpec string, labels map[string]string, ownerRef []metav1.OwnerReference) *clusterv1alpha1.Machine
func GenTestMachineDeployment ¶
func GenTestMachineDeployment(name, rawProviderSpec string, selector map[string]string, dynamicConfig bool) *clusterv1alpha1.MachineDeployment
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 GenerateTestKubeconfig ¶
GenerateTestKubeconfig returns test kubeconfig yaml structure
func GenerateTestRuleGroupData ¶ added in v2.18.0
func RegisterScheme ¶ added in v2.16.3
func RegisterScheme(builder runtime.SchemeBuilder) error
Types ¶
type ClientsSets ¶
type ClientsSets struct { FakeKubermaticClient *kubermaticfakeclientset.Clientset FakeClient ctrlruntimeclient.Client // this client is used for unprivileged methods where impersonated client is used FakeKubernetesCoreClient kubernetesclientset.Interface TokenAuthenticator serviceaccount.TokenAuthenticator TokenGenerator serviceaccount.TokenGenerator }
ClientsSets a simple wrapper that holds fake client sets
func CreateTestEndpointAndGetClients ¶
func CreateTestEndpointAndGetClients(user apiv1.User, seedsGetter provider.SeedsGetter, kubeObjects, machineObjects, kubermaticObjects []ctrlruntimeclient.Object, versions []*version.Version, updates []*version.Update, providerIncompatibilities []*version.ProviderIncompatibility, routingFunc newRoutingFunc) (http.Handler, *ClientsSets, error)
CreateTestEndpointAndGetClients is a convenience function that instantiates fake providers and sets up routes for the tests
type ConstraintSpec ¶ added in v2.16.3
type ConstraintSpec struct { Match v1.Match `json:"match,omitempty"` Parameters map[string]string `json:"parameters,omitempty"` }
func (*ConstraintSpec) DeepCopy ¶ added in v2.16.3
func (in *ConstraintSpec) DeepCopy() *ConstraintSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredLabelSpec.
func (*ConstraintSpec) DeepCopyInto ¶ added in v2.16.3
func (in *ConstraintSpec) DeepCopyInto(out *ConstraintSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConstraintStatus ¶ added in v2.16.3
type ConstraintStatus struct { Enforcement string `json:"enforcement,omitempty"` AuditTimestamp string `json:"auditTimestamp,omitempty"` Violations []Violation `json:"violations,omitempty"` }
func (*ConstraintStatus) DeepCopy ¶ added in v2.16.3
func (in *ConstraintStatus) DeepCopy() *ConstraintStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConstraintStatus.
func (*ConstraintStatus) DeepCopyInto ¶ added in v2.16.3
func (in *ConstraintStatus) DeepCopyInto(out *ConstraintStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FakeConstraintProvider ¶ added in v2.16.3
type FakeConstraintProvider struct { Provider *kubernetes.ConstraintProvider FakeClient ctrlruntimeclient.Client }
func (*FakeConstraintProvider) Create ¶ added in v2.16.3
func (p *FakeConstraintProvider) Create(userInfo *provider.UserInfo, constraint *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
func (*FakeConstraintProvider) Delete ¶ added in v2.16.3
func (p *FakeConstraintProvider) Delete(cluster *kubermaticapiv1.Cluster, userInfo *provider.UserInfo, name string) error
func (*FakeConstraintProvider) Get ¶ added in v2.16.3
func (p *FakeConstraintProvider) Get(cluster *kubermaticapiv1.Cluster, name string) (*kubermaticapiv1.Constraint, error)
func (*FakeConstraintProvider) List ¶ added in v2.16.3
func (p *FakeConstraintProvider) List(cluster *kubermaticapiv1.Cluster) (*kubermaticapiv1.ConstraintList, error)
func (*FakeConstraintProvider) Update ¶ added in v2.16.3
func (p *FakeConstraintProvider) Update(userInfo *provider.UserInfo, constraint *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
type FakeConstraintTemplateProvider ¶ added in v2.16.3
type FakeConstraintTemplateProvider struct { Provider *kubernetes.ConstraintTemplateProvider FakeClient ctrlruntimeclient.Client }
func (*FakeConstraintTemplateProvider) Create ¶ added in v2.16.3
func (p *FakeConstraintTemplateProvider) Create(ct *kubermaticapiv1.ConstraintTemplate) (*kubermaticapiv1.ConstraintTemplate, error)
func (*FakeConstraintTemplateProvider) Delete ¶ added in v2.16.3
func (p *FakeConstraintTemplateProvider) Delete(ct *kubermaticapiv1.ConstraintTemplate) error
func (*FakeConstraintTemplateProvider) Get ¶ added in v2.16.3
func (p *FakeConstraintTemplateProvider) Get(name string) (*kubermaticapiv1.ConstraintTemplate, error)
func (*FakeConstraintTemplateProvider) List ¶ added in v2.16.3
func (p *FakeConstraintTemplateProvider) List() (*kubermaticapiv1.ConstraintTemplateList, error)
func (*FakeConstraintTemplateProvider) Update ¶ added in v2.16.3
func (p *FakeConstraintTemplateProvider) Update(ct *kubermaticapiv1.ConstraintTemplate) (*kubermaticapiv1.ConstraintTemplate, error)
type FakeDefaultConstraintProvider ¶ added in v2.18.0
type FakeDefaultConstraintProvider struct { Provider *kubernetes.DefaultConstraintProvider FakeClient ctrlruntimeclient.Client }
func (*FakeDefaultConstraintProvider) Create ¶ added in v2.18.0
func (p *FakeDefaultConstraintProvider) Create(ct *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
func (*FakeDefaultConstraintProvider) Delete ¶ added in v2.18.0
func (p *FakeDefaultConstraintProvider) Delete(name string) error
func (*FakeDefaultConstraintProvider) Get ¶ added in v2.18.0
func (p *FakeDefaultConstraintProvider) Get(name string) (*kubermaticapiv1.Constraint, error)
func (*FakeDefaultConstraintProvider) List ¶ added in v2.18.0
func (p *FakeDefaultConstraintProvider) List() (*kubermaticapiv1.ConstraintList, error)
func (*FakeDefaultConstraintProvider) Update ¶ added in v2.18.0
func (p *FakeDefaultConstraintProvider) Update(constraint *kubermaticapiv1.Constraint) (*kubermaticapiv1.Constraint, error)
type FakeEtcdBackupConfigProvider ¶ added in v2.18.0
type FakeEtcdBackupConfigProvider struct { Provider *kubernetes.EtcdBackupConfigProvider FakeClient ctrlruntimeclient.Client }
func (*FakeEtcdBackupConfigProvider) Create ¶ added in v2.18.0
func (p *FakeEtcdBackupConfigProvider) Create(userInfo *provider.UserInfo, ebc *kubermaticapiv1.EtcdBackupConfig) (*kubermaticapiv1.EtcdBackupConfig, error)
func (*FakeEtcdBackupConfigProvider) Delete ¶ added in v2.18.0
func (p *FakeEtcdBackupConfigProvider) Delete(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) error
func (*FakeEtcdBackupConfigProvider) Get ¶ added in v2.18.0
func (p *FakeEtcdBackupConfigProvider) Get(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) (*kubermaticapiv1.EtcdBackupConfig, error)
func (*FakeEtcdBackupConfigProvider) List ¶ added in v2.18.0
func (p *FakeEtcdBackupConfigProvider) List(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster) (*kubermaticapiv1.EtcdBackupConfigList, error)
func (*FakeEtcdBackupConfigProvider) Patch ¶ added in v2.18.0
func (p *FakeEtcdBackupConfigProvider) Patch(userInfo *provider.UserInfo, old, new *kubermaticapiv1.EtcdBackupConfig) (*kubermaticapiv1.EtcdBackupConfig, error)
type FakeEtcdRestoreProvider ¶ added in v2.18.0
type FakeEtcdRestoreProvider struct { Provider *kubernetes.EtcdRestoreProvider FakeClient ctrlruntimeclient.Client }
func (*FakeEtcdRestoreProvider) Create ¶ added in v2.18.0
func (p *FakeEtcdRestoreProvider) Create(userInfo *provider.UserInfo, ebc *kubermaticapiv1.EtcdRestore) (*kubermaticapiv1.EtcdRestore, error)
func (*FakeEtcdRestoreProvider) Delete ¶ added in v2.18.0
func (p *FakeEtcdRestoreProvider) Delete(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) error
func (*FakeEtcdRestoreProvider) Get ¶ added in v2.18.0
func (p *FakeEtcdRestoreProvider) Get(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster, name string) (*kubermaticapiv1.EtcdRestore, error)
func (*FakeEtcdRestoreProvider) List ¶ added in v2.18.0
func (p *FakeEtcdRestoreProvider) List(userInfo *provider.UserInfo, cluster *kubermaticapiv1.Cluster) (*kubermaticapiv1.EtcdRestoreList, error)
type FakeExternalClusterProvider ¶
type FakeExternalClusterProvider struct { Provider *kubernetes.ExternalClusterProvider FakeClient ctrlruntimeclient.Client }
func (*FakeExternalClusterProvider) CreateOrUpdateKubeconfigSecretForCluster ¶
func (p *FakeExternalClusterProvider) CreateOrUpdateKubeconfigSecretForCluster(ctx context.Context, cluster *kubermaticapiv1.ExternalCluster, kubeconfig string) error
func (*FakeExternalClusterProvider) Delete ¶
func (p *FakeExternalClusterProvider) Delete(userInfo *provider.UserInfo, cluster *kubermaticapiv1.ExternalCluster) error
func (*FakeExternalClusterProvider) GenerateClient ¶
func (p *FakeExternalClusterProvider) GenerateClient(cfg *clientcmdapi.Config) (ctrlruntimeclient.Client, error)
func (*FakeExternalClusterProvider) Get ¶
func (p *FakeExternalClusterProvider) Get(userInfo *provider.UserInfo, clusterName string) (*kubermaticapiv1.ExternalCluster, error)
func (*FakeExternalClusterProvider) GetClient ¶
func (p *FakeExternalClusterProvider) GetClient(cluster *kubermaticapiv1.ExternalCluster) (ctrlruntimeclient.Client, error)
func (*FakeExternalClusterProvider) GetNode ¶
func (p *FakeExternalClusterProvider) GetNode(cluster *kubermaticapiv1.ExternalCluster, nodeName string) (*corev1.Node, error)
func (*FakeExternalClusterProvider) GetVersion ¶
func (p *FakeExternalClusterProvider) GetVersion(cluster *kubermaticapiv1.ExternalCluster) (*semver.Semver, error)
func (*FakeExternalClusterProvider) IsMetricServerAvailable ¶
func (p *FakeExternalClusterProvider) IsMetricServerAvailable(cluster *kubermaticapiv1.ExternalCluster) (bool, error)
func (*FakeExternalClusterProvider) List ¶
func (p *FakeExternalClusterProvider) List(project *kubermaticapiv1.Project) (*kubermaticapiv1.ExternalClusterList, error)
func (*FakeExternalClusterProvider) ListNodes ¶
func (p *FakeExternalClusterProvider) ListNodes(cluster *kubermaticapiv1.ExternalCluster) (*corev1.NodeList, error)
func (*FakeExternalClusterProvider) New ¶
func (p *FakeExternalClusterProvider) New(userInfo *provider.UserInfo, project *kubermaticapiv1.Project, cluster *kubermaticapiv1.ExternalCluster) (*kubermaticapiv1.ExternalCluster, error)
func (*FakeExternalClusterProvider) Update ¶
func (p *FakeExternalClusterProvider) Update(userInfo *provider.UserInfo, cluster *kubermaticapiv1.ExternalCluster) (*kubermaticapiv1.ExternalCluster, error)
type FakePrivilegedAllowedRegistryProvider ¶ added in v2.18.0
type FakePrivilegedAllowedRegistryProvider struct { Provider *kubernetes.PrivilegedAllowedRegistryProvider FakeClient ctrlruntimeclient.Client }
func (*FakePrivilegedAllowedRegistryProvider) CreateUnsecured ¶ added in v2.18.0
func (p *FakePrivilegedAllowedRegistryProvider) CreateUnsecured(wr *kubermaticapiv1.AllowedRegistry) (*kubermaticapiv1.AllowedRegistry, error)
func (*FakePrivilegedAllowedRegistryProvider) DeleteUnsecured ¶ added in v2.18.0
func (p *FakePrivilegedAllowedRegistryProvider) DeleteUnsecured(name string) error
func (*FakePrivilegedAllowedRegistryProvider) GetUnsecured ¶ added in v2.18.0
func (p *FakePrivilegedAllowedRegistryProvider) GetUnsecured(name string) (*kubermaticapiv1.AllowedRegistry, error)
func (*FakePrivilegedAllowedRegistryProvider) ListUnsecured ¶ added in v2.18.0
func (p *FakePrivilegedAllowedRegistryProvider) ListUnsecured() (*kubermaticapiv1.AllowedRegistryList, error)
func (*FakePrivilegedAllowedRegistryProvider) UpdateUnsecured ¶ added in v2.18.0
func (p *FakePrivilegedAllowedRegistryProvider) UpdateUnsecured(wr *kubermaticapiv1.AllowedRegistry) (*kubermaticapiv1.AllowedRegistry, error)
type FakePrivilegedProjectProvider ¶
type FakePrivilegedProjectProvider struct { }
func NewFakePrivilegedProjectProvider ¶
func NewFakePrivilegedProjectProvider() *FakePrivilegedProjectProvider
func (*FakePrivilegedProjectProvider) DeleteUnsecured ¶
func (f *FakePrivilegedProjectProvider) DeleteUnsecured(projectInternalName string) error
DeleteUnsecured deletes any given project This function is unsafe in a sense that it uses privileged account to delete project with the given name
func (*FakePrivilegedProjectProvider) GetUnsecured ¶
func (f *FakePrivilegedProjectProvider) GetUnsecured(projectInternalName string, options *provider.ProjectGetOptions) (*kubermaticapiv1.Project, error)
GetUnsecured returns the project with the given name This function is unsafe in a sense that it uses privileged account to get project with the given name
func (*FakePrivilegedProjectProvider) UpdateUnsecured ¶
func (f *FakePrivilegedProjectProvider) UpdateUnsecured(project *kubermaticapiv1.Project) (*kubermaticapiv1.Project, error)
UpdateUnsecured update an existing project and returns it This function is unsafe in a sense that it uses privileged account to update project
type FakeProjectProvider ¶
type FakeProjectProvider struct { }
func NewFakeProjectProvider ¶
func NewFakeProjectProvider() *FakeProjectProvider
func (*FakeProjectProvider) Delete ¶
func (f *FakeProjectProvider) Delete(userInfo *provider.UserInfo, projectInternalName string) error
Delete deletes the given project as the given user
Note: Before deletion project's status.phase is set to ProjectTerminating
func (*FakeProjectProvider) Get ¶
func (f *FakeProjectProvider) Get(userInfo *provider.UserInfo, projectInternalName string, options *provider.ProjectGetOptions) (*kubermaticapiv1.Project, error)
Get returns the project with the given name
func (*FakeProjectProvider) List ¶
func (f *FakeProjectProvider) List(options *provider.ProjectListOptions) ([]*kubermaticapiv1.Project, error)
List gets a list of projects, by default it returns all resources. If you want to filter the result please set ProjectListOptions
Note that the list is taken from the cache
func (*FakeProjectProvider) New ¶
func (f *FakeProjectProvider) New(user []*kubermaticapiv1.User, name string, labels map[string]string) (*kubermaticapiv1.Project, error)
func (*FakeProjectProvider) Update ¶
func (f *FakeProjectProvider) Update(userInfo *provider.UserInfo, newProject *kubermaticapiv1.Project) (*kubermaticapiv1.Project, error)
Update update an existing project and returns it
type IssuerVerifier ¶
type IssuerVerifier struct {
// contains filtered or unexported fields
}
IssuerVerifier is a test stub that mocks OIDC responses
func NewFakeOIDCClient ¶
func NewFakeOIDCClient(user apiv1.User) *IssuerVerifier
NewFakeOIDCClient returns fake OIDC issuer and verifier
func (*IssuerVerifier) AuthCodeURL ¶
func (o *IssuerVerifier) AuthCodeURL(state string, offlineAsScope bool, scopes ...string) string
AuthCodeURL returns a URL to OpenID provider's consent page
func (*IssuerVerifier) Extract ¶
func (o *IssuerVerifier) Extract(_ *http.Request) (string, error)
Extractor knows how to extract the ID token from the request
func (*IssuerVerifier) Verify ¶
func (o *IssuerVerifier) Verify(ctx context.Context, token string) (auth.TokenClaims, error)
Verify parses a raw ID Token, verifies it's been signed by the provider, performs any additional checks depending on the Config, and returns the payload as TokenClaims.
type NewAddonSliceWrapper ¶
NewAddonSliceWrapper wraps []apiv1.Addon to provide convenient methods for tests
func (*NewAddonSliceWrapper) DecodeOrDie ¶
func (k *NewAddonSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewAddonSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewAddonSliceWrapper) EqualOrDie ¶
func (k NewAddonSliceWrapper) EqualOrDie(expected NewAddonSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewAddonSliceWrapper) Sort ¶
func (k NewAddonSliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type NewAllowedRegistrySliceWrapper ¶ added in v2.18.0
type NewAllowedRegistrySliceWrapper []*apiv2.AllowedRegistry
NewAllowedRegistrySliceWrapper wraps []apiv2.AllowedRegistry to provide convenient methods for tests
func (*NewAllowedRegistrySliceWrapper) DecodeOrDie ¶ added in v2.18.0
func (k *NewAllowedRegistrySliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewAllowedRegistrySliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewAllowedRegistrySliceWrapper) EqualOrDie ¶ added in v2.18.0
func (k NewAllowedRegistrySliceWrapper) EqualOrDie(expected NewAllowedRegistrySliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewAllowedRegistrySliceWrapper) Sort ¶ added in v2.18.0
func (k NewAllowedRegistrySliceWrapper) Sort()
Sort sorts the collection by Name
type NewClusterTemplateSliceWrapper ¶ added in v2.18.0
type NewClusterTemplateSliceWrapper []apiv2.ClusterTemplate
NewClusterTemplateSliceWrapper wraps []apiv2.ClusterTemplate to provide convenient methods for tests
func (*NewClusterTemplateSliceWrapper) DecodeOrDie ¶ added in v2.18.0
func (k *NewClusterTemplateSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewClusterTemplateSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewClusterTemplateSliceWrapper) EqualOrDie ¶ added in v2.18.0
func (k NewClusterTemplateSliceWrapper) EqualOrDie(expected NewClusterTemplateSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewClusterTemplateSliceWrapper) Sort ¶ added in v2.18.0
func (k NewClusterTemplateSliceWrapper) Sort()
Sort sorts the collection by Name
type NewClusterV1SliceWrapper ¶
NewClusterV1SliceWrapper wraps []apiv1.Cluster to provide convenient methods for tests
func (*NewClusterV1SliceWrapper) DecodeOrDie ¶
func (k *NewClusterV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewClusterV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewClusterV1SliceWrapper) EqualOrDie ¶
func (k NewClusterV1SliceWrapper) EqualOrDie(expected NewClusterV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewClusterV1SliceWrapper) Sort ¶
func (k NewClusterV1SliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type NewConstraintTemplateV1SliceWrapper ¶ added in v2.16.3
type NewConstraintTemplateV1SliceWrapper []apiv2.ConstraintTemplate
NewConstraintTemplateV1SliceWrapper wraps []apiv1.ConstraintTemplate to provide convenient methods for tests
func (*NewConstraintTemplateV1SliceWrapper) DecodeOrDie ¶ added in v2.16.3
func (k *NewConstraintTemplateV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewConstraintTemplateV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewConstraintTemplateV1SliceWrapper) EqualOrDie ¶ added in v2.16.3
func (k NewConstraintTemplateV1SliceWrapper) EqualOrDie(expected NewConstraintTemplateV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewConstraintTemplateV1SliceWrapper) Sort ¶ added in v2.16.3
func (k NewConstraintTemplateV1SliceWrapper) Sort()
Sort sorts the collection by Name
type NewConstraintsSliceWrapper ¶ added in v2.16.3
type NewConstraintsSliceWrapper []apiv2.Constraint
NewConstraintsSliceWrapper wraps []apiv2.Constraints to provide convenient methods for tests
func (*NewConstraintsSliceWrapper) DecodeOrDie ¶ added in v2.16.3
func (k *NewConstraintsSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewConstraintsSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewConstraintsSliceWrapper) EqualOrDie ¶ added in v2.16.3
func (k NewConstraintsSliceWrapper) EqualOrDie(expected NewConstraintsSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewConstraintsSliceWrapper) Sort ¶ added in v2.16.3
func (k NewConstraintsSliceWrapper) Sort()
Sort sorts the collection by Name
type NewEtcdBackupConfigSliceWrapper ¶ added in v2.18.0
type NewEtcdBackupConfigSliceWrapper []*apiv2.EtcdBackupConfig
NewEtcdBackupConfigSliceWrapper wraps []apiv2.EtcdBackupConfig to provide convenient methods for tests
func (*NewEtcdBackupConfigSliceWrapper) DecodeOrDie ¶ added in v2.18.0
func (k *NewEtcdBackupConfigSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewEtcdBackupConfigSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewEtcdBackupConfigSliceWrapper) EqualOrDie ¶ added in v2.18.0
func (k NewEtcdBackupConfigSliceWrapper) EqualOrDie(expected NewEtcdBackupConfigSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewEtcdBackupConfigSliceWrapper) Sort ¶ added in v2.18.0
func (k NewEtcdBackupConfigSliceWrapper) Sort()
Sort sorts the collection by Name
type NewEtcdRestoreSliceWrapper ¶ added in v2.18.0
type NewEtcdRestoreSliceWrapper []*apiv2.EtcdRestore
NewEtcdRestoreSliceWrapper wraps []apiv2.EtcdRestore to provide convenient methods for tests
func (*NewEtcdRestoreSliceWrapper) DecodeOrDie ¶ added in v2.18.0
func (k *NewEtcdRestoreSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewEtcdRestoreSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewEtcdRestoreSliceWrapper) EqualOrDie ¶ added in v2.18.0
func (k NewEtcdRestoreSliceWrapper) EqualOrDie(expected NewEtcdRestoreSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewEtcdRestoreSliceWrapper) Sort ¶ added in v2.18.0
func (k NewEtcdRestoreSliceWrapper) Sort()
Sort sorts the collection by Name
type NewRoleNameSliceWrapper ¶
NewRoleNameSliceWrapper wraps []apiv1.RoleName to provide convenient methods for tests
func (*NewRoleNameSliceWrapper) DecodeOrDie ¶
func (k *NewRoleNameSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewRoleNameSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewRoleNameSliceWrapper) EqualOrDie ¶
func (k NewRoleNameSliceWrapper) EqualOrDie(expected NewRoleNameSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewRoleNameSliceWrapper) Sort ¶
func (k NewRoleNameSliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type NewRuleGroupSliceWrapper ¶ added in v2.18.0
NewRuleGroupSliceWrapper wraps []apiv2.RuleGroup to provide convenient methods for tests
func (*NewRuleGroupSliceWrapper) DecodeOrDie ¶ added in v2.18.0
func (k *NewRuleGroupSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewRuleGroupSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewRuleGroupSliceWrapper) EqualOrDie ¶ added in v2.18.0
func (k NewRuleGroupSliceWrapper) EqualOrDie(expected NewRuleGroupSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewRuleGroupSliceWrapper) Sort ¶ added in v2.18.0
func (k NewRuleGroupSliceWrapper) Sort()
Sort sorts the collection by Name
type NewSSHKeyV1SliceWrapper ¶
NewSSHKeyV1SliceWrapper wraps []apiv1.SSHKey to provide convenient methods for tests
func (*NewSSHKeyV1SliceWrapper) DecodeOrDie ¶
func (k *NewSSHKeyV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewSSHKeyV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewSSHKeyV1SliceWrapper) EqualOrDie ¶
func (k NewSSHKeyV1SliceWrapper) EqualOrDie(expected NewSSHKeyV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewSSHKeyV1SliceWrapper) Sort ¶
func (k NewSSHKeyV1SliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type NewServiceAccountTokenV1SliceWrapper ¶
type NewServiceAccountTokenV1SliceWrapper []apiv1.PublicServiceAccountToken
NewServiceAccountTokenV1SliceWrapper wraps []apiv1.ServiceAccountToken to provide convenient methods for tests
func (*NewServiceAccountTokenV1SliceWrapper) DecodeOrDie ¶
func (k *NewServiceAccountTokenV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewServiceAccountTokenV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewServiceAccountTokenV1SliceWrapper) EqualOrDie ¶
func (k NewServiceAccountTokenV1SliceWrapper) EqualOrDie(expected NewServiceAccountTokenV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewServiceAccountTokenV1SliceWrapper) Sort ¶
func (k NewServiceAccountTokenV1SliceWrapper) Sort()
Sort sorts the collection by name
type NewServiceAccountV1SliceWrapper ¶
type NewServiceAccountV1SliceWrapper []apiv1.ServiceAccount
NewServiceAccountV1SliceWrapper wraps []apiv1.ServiceAccount to provide convenient methods for tests
func (*NewServiceAccountV1SliceWrapper) DecodeOrDie ¶
func (k *NewServiceAccountV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewServiceAccountV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewServiceAccountV1SliceWrapper) EqualOrDie ¶
func (k NewServiceAccountV1SliceWrapper) EqualOrDie(expected NewServiceAccountV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewServiceAccountV1SliceWrapper) Sort ¶
func (k NewServiceAccountV1SliceWrapper) Sort()
Sort sorts the collection by name
type NewUserV1SliceWrapper ¶
NewUserV1SliceWrapper wraps []apiv1.User to provide convenient methods for tests
func (*NewUserV1SliceWrapper) DecodeOrDie ¶
func (k *NewUserV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NewUserV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NewUserV1SliceWrapper) EqualOrDie ¶
func (k NewUserV1SliceWrapper) EqualOrDie(expected NewUserV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NewUserV1SliceWrapper) Sort ¶
func (k NewUserV1SliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type NodeDeploymentSliceWrapper ¶ added in v2.16.3
type NodeDeploymentSliceWrapper []apiv1.NodeDeployment
NodeDeploymentSliceWrapper wraps []apiv1.NodeDeployment to provide convenient methods for tests
func (*NodeDeploymentSliceWrapper) DecodeOrDie ¶ added in v2.16.3
func (k *NodeDeploymentSliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NodeDeploymentSliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NodeDeploymentSliceWrapper) EqualOrDie ¶ added in v2.16.3
func (k NodeDeploymentSliceWrapper) EqualOrDie(expected NodeDeploymentSliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NodeDeploymentSliceWrapper) Sort ¶ added in v2.16.3
func (k NodeDeploymentSliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type NodeV1SliceWrapper ¶
NodeV1SliceWrapper wraps []apiv1.Node to provide convenient methods for tests
func (*NodeV1SliceWrapper) DecodeOrDie ¶
func (k *NodeV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *NodeV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (NodeV1SliceWrapper) EqualOrDie ¶
func (k NodeV1SliceWrapper) EqualOrDie(expected NodeV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (NodeV1SliceWrapper) Sort ¶
func (k NodeV1SliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type OicdProvider ¶
type OicdProvider struct {
// contains filtered or unexported fields
}
OicdProvider is a test stub that mocks *oidc.Provider
func (*OicdProvider) Endpoint ¶
func (p *OicdProvider) Endpoint() oauth2.Endpoint
Endpoint returns the OAuth2 auth and token endpoints for the given provider.
type ProjectV1SliceWrapper ¶
ProjectV1SliceWrapper wraps []apiv1.Project to provide convenient methods for tests
func (*ProjectV1SliceWrapper) DecodeOrDie ¶
func (k *ProjectV1SliceWrapper) DecodeOrDie(r io.Reader, t *testing.T) *ProjectV1SliceWrapper
DecodeOrDie reads and decodes json data from the reader
func (ProjectV1SliceWrapper) EqualOrDie ¶
func (k ProjectV1SliceWrapper) EqualOrDie(expected ProjectV1SliceWrapper, t *testing.T)
EqualOrDie compares whether expected collection is equal to the actual one
func (ProjectV1SliceWrapper) Sort ¶
func (k ProjectV1SliceWrapper) Sort()
Sort sorts the collection by CreationTimestamp
type RequiredLabel ¶ added in v2.16.3
type RequiredLabel struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ConstraintSpec `json:"spec,omitempty"` Status ConstraintStatus `json:"status,omitempty"` }
func (*RequiredLabel) DeepCopy ¶ added in v2.16.3
func (in *RequiredLabel) DeepCopy() *RequiredLabel
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredLabel.
func (*RequiredLabel) DeepCopyInto ¶ added in v2.16.3
func (in *RequiredLabel) DeepCopyInto(out *RequiredLabel)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RequiredLabel) DeepCopyObject ¶ added in v2.16.3
func (in *RequiredLabel) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RequiredLabelList ¶ added in v2.16.3
type RequiredLabelList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []runtime.RawExtension `json:"items"` }
func (*RequiredLabelList) DeepCopy ¶ added in v2.16.3
func (in *RequiredLabelList) DeepCopy() *RequiredLabelList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredLabelList.
func (*RequiredLabelList) DeepCopyInto ¶ added in v2.16.3
func (in *RequiredLabelList) DeepCopyInto(out *RequiredLabelList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RequiredLabelList) DeepCopyObject ¶ added in v2.16.3
func (in *RequiredLabelList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UniqueLabel ¶ added in v2.16.3
type UniqueLabel struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ConstraintSpec `json:"spec,omitempty"` Status ConstraintStatus `json:"status,omitempty"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*UniqueLabel) DeepCopy ¶ added in v2.16.3
func (in *UniqueLabel) DeepCopy() *UniqueLabel
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UniqueLabel.
func (*UniqueLabel) DeepCopyInto ¶ added in v2.16.3
func (in *UniqueLabel) DeepCopyInto(out *UniqueLabel)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UniqueLabel) DeepCopyObject ¶ added in v2.16.3
func (in *UniqueLabel) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UniqueLabelList ¶ added in v2.16.3
type UniqueLabelList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []runtime.RawExtension `json:"items"` }
func (*UniqueLabelList) DeepCopy ¶ added in v2.16.3
func (in *UniqueLabelList) DeepCopy() *UniqueLabelList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UniqueLabelList.
func (*UniqueLabelList) DeepCopyInto ¶ added in v2.16.3
func (in *UniqueLabelList) DeepCopyInto(out *UniqueLabelList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UniqueLabelList) DeepCopyObject ¶ added in v2.16.3
func (in *UniqueLabelList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Violation ¶ added in v2.16.3
type Violation struct { EnforcementAction string `json:"enforcementAction,omitempty"` Kind string `json:"kind,omitempty"` Message string `json:"message,omitempty"` Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` }
func (*Violation) DeepCopy ¶ added in v2.16.3
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Violation.
func (*Violation) DeepCopyInto ¶ added in v2.16.3
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.