Documentation ¶
Index ¶
- Constants
- func CreateClusterRoleBinding(opt Options, crb *rbacv1.ClusterRoleBinding) error
- func CreateServiceAccount(opt Options, sa *v1.ServiceAccount) error
- func CreateTestingRBAC(opt Options) error
- func DeleteTestingRBAC(opt Options) error
- func FetchBearerToken(opt Options) (string, error)
- func LoadConfig(url, kubeconfig, context string) (*rest.Config, error)
- func NewHoHConfigMapGVR() schema.GroupVersionResource
- func NewManagedClustersGVR() schema.GroupVersionResource
- func NewPlacementRule() schema.GroupVersionResource
- func NewPolicyGVR() schema.GroupVersionResource
- func NewRouteGVR() schema.GroupVersionResource
- func NewSubscriptionreportsGVR() schema.GroupVersionResource
- func NewTestClient(opt Options) *client
- type Client
- type HOHCluster
- type ManagedCluster
- type Options
- type OptionsContainer
Constants ¶
View Source
const ( SERVICE_ACCOUNT_NAME = "hoh-e2e-test-sa" SERVICE_ACCOUNT_ROLE_BINDING_NAME = "hoh-e2e-test-crb" )
Variables ¶
This section is empty.
Functions ¶
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(opt Options, crb *rbacv1.ClusterRoleBinding) error
func CreateServiceAccount ¶
func CreateServiceAccount(opt Options, sa *v1.ServiceAccount) error
func CreateTestingRBAC ¶
func DeleteTestingRBAC ¶
func FetchBearerToken ¶
func NewHoHConfigMapGVR ¶
func NewHoHConfigMapGVR() schema.GroupVersionResource
func NewManagedClustersGVR ¶
func NewManagedClustersGVR() schema.GroupVersionResource
func NewPlacementRule ¶
func NewPlacementRule() schema.GroupVersionResource
func NewPolicyGVR ¶
func NewPolicyGVR() schema.GroupVersionResource
func NewRouteGVR ¶
func NewRouteGVR() schema.GroupVersionResource
func NewSubscriptionreportsGVR ¶
func NewSubscriptionreportsGVR() schema.GroupVersionResource
func NewTestClient ¶
func NewTestClient(opt Options) *client
Types ¶
type Client ¶
type Client interface { KubeClient() kubernetes.Interface KubeDynamicClient() dynamic.Interface ControllerRuntimeClient(clusterName string, scheme *runtime.Scheme) (runClient.Client, error) Kubectl(clusterName string, args ...string) (string, error) RestConfig(clusterName string) (*rest.Config, error) }
type HOHCluster ¶
type HOHCluster struct { Name string `yaml:"name,omitempty"` Namespace string `yaml:"namespace,omitempty"` ApiServer string `yaml:"apiServer,omitempty"` KubeConfig string `yaml:"kubeconfig,omitempty"` KubeContext string `yaml:"kubecontext,omitempty"` Nonk8sApiServer string `yaml:"nonk8sApiServer,omitempty"` DatabaseURI string `yaml:"databaseURI,omitempty"` }
Define the shape of clusters that may be added under management
type ManagedCluster ¶
type Options ¶
type Options struct { HubCluster HOHCluster `yaml:"hub"` ManagedClusters []ManagedCluster `yaml:"clusters"` }
Define options available for Tests to consume
type OptionsContainer ¶
type OptionsContainer struct {
Options Options `yaml:"options"`
}
Click to show internal directories.
Click to hide internal directories.