Documentation
¶
Index ¶
- Constants
- func CreateSelfSubjectAccessReviews(ctx context.Context, kubeClient kubernetes.Interface, ...) (bool, *authorizationv1.SelfSubjectAccessReview, error)
- func FilterClusterAnnotations(annotations map[string]string) map[string]string
- func GetAwsAccountIdAndClusterName(clusterArn string) (string, string)
- func GetAwsRegion(clusterArn string) string
- func GetBootstrapSSARs() []authorizationv1.SelfSubjectAccessReview
- func GetClusterChanges(client clusterlister.PlacementDecisionLister, ...) (sets.Set[string], sets.Set[string], error)
- func GetHubConfigSSARs(clusterName string) []authorizationv1.SelfSubjectAccessReview
- func HasFinalizer(finalizers []string, finalizer string) bool
- func Md5HashSuffix(hubClusterAccountId string, hubClusterName string, ...) string
- func NewEventRecorder(ctx context.Context, scheme *runtime.Scheme, kubeClient kubernetes.Interface, ...) (kevents.EventRecorder, error)
- type PlacementDecisionGetter
- type RequeueError
Constants ¶
View Source
const ( AwsIrsaAuthType = "awsirsa" CSRAuthType = "csr" )
View Source
const (
// GcFinalizer is added to the managedCluster for resource cleanup, which maintained by gc controller.
GcFinalizer = "cluster.open-cluster-management.io/resource-cleanup"
)
Variables ¶
This section is empty.
Functions ¶
func CreateSelfSubjectAccessReviews ¶ added in v0.14.0
func CreateSelfSubjectAccessReviews( ctx context.Context, kubeClient kubernetes.Interface, selfSubjectAccessReviews []authorizationv1.SelfSubjectAccessReview) (bool, *authorizationv1.SelfSubjectAccessReview, error)
func GetAwsAccountIdAndClusterName ¶ added in v0.16.0
GetAwsAccountIdAndClusterName Parses aws accountId and cluster-name from clusterArn e.g. if clusterArn is arn:aws:eks:us-west-2:123456789012:cluster/hub-cluster1 accountId is 123456789012 and clusterName is hub-cluster1
func GetAwsRegion ¶ added in v0.16.0
GetAwsRegion Parses aws accountId and cluster-name from clusterArn e.g. if clusterArn is arn:aws:eks:us-west-2:123456789012:cluster/hub-cluster1 awsRegion is us-west-2
func GetBootstrapSSARs ¶ added in v0.14.0
func GetBootstrapSSARs() []authorizationv1.SelfSubjectAccessReview
func GetClusterChanges ¶
func GetClusterChanges(client clusterlister.PlacementDecisionLister, placement *clusterv1beta1.Placement, existingClusters sets.Set[string]) (sets.Set[string], sets.Set[string], error)
Get added and deleted clusters names
func GetHubConfigSSARs ¶ added in v0.14.0
func GetHubConfigSSARs(clusterName string) []authorizationv1.SelfSubjectAccessReview
func HasFinalizer ¶ added in v0.16.0
func Md5HashSuffix ¶ added in v0.16.0
func NewEventRecorder ¶ added in v0.14.0
func NewEventRecorder(ctx context.Context, scheme *runtime.Scheme, kubeClient kubernetes.Interface, controllerName string) (kevents.EventRecorder, error)
NewEventRecorder creates a new event recorder for the given controller, it will also log the events
Types ¶
type PlacementDecisionGetter ¶
type PlacementDecisionGetter struct {
Client clusterlister.PlacementDecisionLister
}
func (PlacementDecisionGetter) List ¶
func (pdl PlacementDecisionGetter) List(selector labels.Selector, namespace string) ([]*clusterv1beta1.PlacementDecision, error)
type RequeueError ¶ added in v0.13.0
func NewRequeueError ¶ added in v0.13.0
func NewRequeueError(msg string, requeueTime time.Duration) RequeueError
func (RequeueError) Error ¶ added in v0.13.0
func (r RequeueError) Error() string
Click to show internal directories.
Click to hide internal directories.