Documentation
¶
Index ¶
- Constants
- Variables
- func AcceptManagedCluster(clusterClient clusterclientset.Interface, spokeClusterName string) error
- func AcceptManagedClusterWithLeaseDuration(clusterClient clusterclientset.Interface, spokeClusterName string, ...) error
- func CmpResourceQuantity(key string, nodeResourceList corev1.ResourceList, ...) bool
- func CordonNode(kubeClient kubernetes.Interface, name string) error
- func CreateNode(kubeClient kubernetes.Interface, name string, ...) error
- func FindAddOnCSRs(kubeClient kubernetes.Interface, spokeClusterName, addOnName string) ([]*certificates.CertificateSigningRequest, error)
- func FindAutoApprovedSpokeCSR(kubeClient kubernetes.Interface, spokeClusterName string) (*certificates.CertificateSigningRequest, error)
- func FindUnapprovedAddOnCSR(kubeClient kubernetes.Interface, spokeClusterName, addOnName string) (*certificates.CertificateSigningRequest, error)
- func FindUnapprovedSpokeCSR(kubeClient kubernetes.Interface, spokeClusterName string) (*certificates.CertificateSigningRequest, error)
- func GetFilledHubKubeConfigSecret(kubeClient kubernetes.Interface, secretNamespace, secretName string) (*corev1.Secret, error)
- func GetManagedCluster(clusterClient clusterclientset.Interface, spokeClusterName string) (*clusterv1.ManagedCluster, error)
- func NewIntegrationTestEventRecorder(componet string) events.Recorder
- func NewResourceList(cpu, mem int) corev1.ResourceList
- func PrepareSpokeAgentNamespace(kubeClient kubernetes.Interface, namespace string) error
- func RunAgent(name string, opt spoke.SpokeAgentOptions, cfg *rest.Config) context.CancelFunc
- type IntegrationTestEventRecorder
- func (r *IntegrationTestEventRecorder) ComponentName() string
- func (r *IntegrationTestEventRecorder) Event(reason, message string)
- func (r *IntegrationTestEventRecorder) Eventf(reason, messageFmt string, args ...interface{})
- func (r *IntegrationTestEventRecorder) ForComponent(c string) events.Recorder
- func (r *IntegrationTestEventRecorder) Shutdown()
- func (r *IntegrationTestEventRecorder) Warning(reason, message string)
- func (r *IntegrationTestEventRecorder) Warningf(reason, messageFmt string, args ...interface{})
- func (r *IntegrationTestEventRecorder) WithComponentSuffix(suffix string) events.Recorder
- func (r *IntegrationTestEventRecorder) WithContext(ctx context.Context) events.Recorder
- type TestAuthn
- func (t *TestAuthn) AddUser(user envtest.User, baseCfg *rest.Config) (*rest.Config, error)
- func (t *TestAuthn) ApproveCSR(kubeClient kubernetes.Interface, csr *certificates.CertificateSigningRequest, ...) error
- func (t *TestAuthn) ApproveSpokeClusterCSR(kubeClient kubernetes.Interface, spokeClusterName string, ...) error
- func (t *TestAuthn) ApproveSpokeClusterCSRWithExpiredCert(kubeClient kubernetes.Interface, spokeClusterName string) error
- func (t *TestAuthn) Configure(workDir string, args *envtest.Arguments) error
- func (t *TestAuthn) CreateBootstrapKubeConfig(configFileName, serverCertFile, securePort, bootstrapUser string, ...) error
- func (t *TestAuthn) CreateBootstrapKubeConfigWithCertAge(configFileName, serverCertFile, securePort string, certAge time.Duration) error
- func (t *TestAuthn) CreateBootstrapKubeConfigWithUser(configFileName, serverCertFile, securePort, bootstrapUser string) error
- func (t *TestAuthn) FillCertificateToApprovedCSR(kubeClient kubernetes.Interface, csr *certificates.CertificateSigningRequest, ...) error
- func (t *TestAuthn) Start() error
- func (t *TestAuthn) Stop() error
Constants ¶
View Source
const ( TestLeaseDurationSeconds = 1 TestDir = "/tmp/registration-integration-test" )
View Source
const AutoApprovalBootstrapUser = "autoapproval-user"
Variables ¶
View Source
var ( CertDir = path.Join(TestDir, "client-certs") DefaultTestAuthn = NewTestAuthn(caFile, caKeyFile) )
Functions ¶
func AcceptManagedCluster ¶
func AcceptManagedCluster(clusterClient clusterclientset.Interface, spokeClusterName string) error
func AcceptManagedClusterWithLeaseDuration ¶ added in v0.10.0
func AcceptManagedClusterWithLeaseDuration(clusterClient clusterclientset.Interface, spokeClusterName string, leaseDuration int32) error
func CmpResourceQuantity ¶ added in v0.6.0
func CmpResourceQuantity(key string, nodeResourceList corev1.ResourceList, clusterResorceList clusterv1.ResourceList) bool
func CordonNode ¶ added in v0.6.0
func CordonNode(kubeClient kubernetes.Interface, name string) error
func CreateNode ¶ added in v0.6.0
func CreateNode(kubeClient kubernetes.Interface, name string, capacity, allocatable corev1.ResourceList) error
func FindAddOnCSRs ¶
func FindAddOnCSRs(kubeClient kubernetes.Interface, spokeClusterName, addOnName string) ([]*certificates.CertificateSigningRequest, error)
func FindAutoApprovedSpokeCSR ¶
func FindAutoApprovedSpokeCSR(kubeClient kubernetes.Interface, spokeClusterName string) (*certificates.CertificateSigningRequest, error)
func FindUnapprovedAddOnCSR ¶
func FindUnapprovedAddOnCSR(kubeClient kubernetes.Interface, spokeClusterName, addOnName string) (*certificates.CertificateSigningRequest, error)
func FindUnapprovedSpokeCSR ¶
func FindUnapprovedSpokeCSR(kubeClient kubernetes.Interface, spokeClusterName string) (*certificates.CertificateSigningRequest, error)
func GetManagedCluster ¶
func GetManagedCluster(clusterClient clusterclientset.Interface, spokeClusterName string) (*clusterv1.ManagedCluster, error)
func NewResourceList ¶ added in v0.6.0
func NewResourceList(cpu, mem int) corev1.ResourceList
func PrepareSpokeAgentNamespace ¶
func PrepareSpokeAgentNamespace(kubeClient kubernetes.Interface, namespace string) error
func RunAgent ¶ added in v0.6.0
func RunAgent(name string, opt spoke.SpokeAgentOptions, cfg *rest.Config) context.CancelFunc
Types ¶
type IntegrationTestEventRecorder ¶
type IntegrationTestEventRecorder struct {
// contains filtered or unexported fields
}
func (*IntegrationTestEventRecorder) ComponentName ¶
func (r *IntegrationTestEventRecorder) ComponentName() string
func (*IntegrationTestEventRecorder) Event ¶
func (r *IntegrationTestEventRecorder) Event(reason, message string)
func (*IntegrationTestEventRecorder) Eventf ¶
func (r *IntegrationTestEventRecorder) Eventf(reason, messageFmt string, args ...interface{})
func (*IntegrationTestEventRecorder) ForComponent ¶
func (r *IntegrationTestEventRecorder) ForComponent(c string) events.Recorder
func (*IntegrationTestEventRecorder) Shutdown ¶
func (r *IntegrationTestEventRecorder) Shutdown()
func (*IntegrationTestEventRecorder) Warning ¶
func (r *IntegrationTestEventRecorder) Warning(reason, message string)
func (*IntegrationTestEventRecorder) Warningf ¶
func (r *IntegrationTestEventRecorder) Warningf(reason, messageFmt string, args ...interface{})
func (*IntegrationTestEventRecorder) WithComponentSuffix ¶
func (r *IntegrationTestEventRecorder) WithComponentSuffix(suffix string) events.Recorder
func (*IntegrationTestEventRecorder) WithContext ¶ added in v0.6.0
func (r *IntegrationTestEventRecorder) WithContext(ctx context.Context) events.Recorder
type TestAuthn ¶ added in v0.6.0
type TestAuthn struct {
// contains filtered or unexported fields
}
func NewTestAuthn ¶ added in v0.6.0
func (*TestAuthn) AddUser ¶ added in v0.6.0
AddUser provisions a user, returning a copy of the given base rest.Config configured to authenticate as that users.
May only be called while the authenticator is "running".
func (*TestAuthn) ApproveCSR ¶ added in v0.6.0
func (t *TestAuthn) ApproveCSR(kubeClient kubernetes.Interface, csr *certificates.CertificateSigningRequest, notBefore, notAfter time.Time) error
func (*TestAuthn) ApproveSpokeClusterCSR ¶ added in v0.6.0
func (*TestAuthn) ApproveSpokeClusterCSRWithExpiredCert ¶ added in v0.6.0
func (t *TestAuthn) ApproveSpokeClusterCSRWithExpiredCert(kubeClient kubernetes.Interface, spokeClusterName string) error
func (*TestAuthn) CreateBootstrapKubeConfig ¶ added in v0.11.0
func (*TestAuthn) CreateBootstrapKubeConfigWithCertAge ¶ added in v0.6.0
func (*TestAuthn) CreateBootstrapKubeConfigWithUser ¶ added in v0.11.0
func (*TestAuthn) FillCertificateToApprovedCSR ¶ added in v0.11.0
func (t *TestAuthn) FillCertificateToApprovedCSR(kubeClient kubernetes.Interface, csr *certificates.CertificateSigningRequest, notBefore, notAfter time.Time) error
Click to show internal directories.
Click to hide internal directories.