Documentation
¶
Index ¶
- func GetAWSAccount(ctx context.Context, cli client.Client, namespace, accountCRName string) (*awsv1alpha1.Account, error)
- func GetAWSAccountClaim(ctx context.Context, cli client.Client, namespace, accountClaimName string) (*awsv1alpha1.AccountClaim, error)
- func GetAWSAccountCredentials(ctx context.Context, cli client.Client, namespace, secretName string) (*awsprovider.ClientInput, error)
- func GetAccountClaimFromClusterID(ctx context.Context, cli client.Client, clusterID string) (*awsv1alpha1.AccountClaim, error)
- func GetCurrentCluster() (string, error)
- func New(clusterID string, options client.Options) (client.Client, error)
- func NewAWSSecret(name, namespace, accessKeyID, secretAccessKey string) string
- func NewAsBackplaneClusterAdmin(clusterID string, options client.Options, elevationReasons ...string) (client.Client, error)
- func NewAsBackplaneClusterAdminWithConn(clusterID string, options client.Options, ocmConn *sdk.Connection, ...) (client.Client, error)
- func NewRestConfig(clusterID string) (*rest.Config, error)
- func NewWithConn(clusterID string, options client.Options, ocmConn *sdk.Connection) (client.Client, error)
- type LazyClient
- func (s *LazyClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (s *LazyClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (s *LazyClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (s *LazyClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, ...) error
- func (*LazyClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
- func (s *LazyClient) Impersonate(userName string, elevationReasons ...string)
- func (*LazyClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (s *LazyClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (s *LazyClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (s *LazyClient) RESTMapper() meta.RESTMapper
- func (s *LazyClient) Scheme() *runtime.Scheme
- func (s *LazyClient) Status() client.StatusWriter
- func (s *LazyClient) SubResource(subResource string) client.SubResourceClient
- func (s *LazyClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAWSAccount ¶
func GetAWSAccount( ctx context.Context, cli client.Client, namespace, accountCRName string, ) (*awsv1alpha1.Account, error)
Get AWS Account CR
func GetAWSAccountClaim ¶
func GetAWSAccountClaim( ctx context.Context, cli client.Client, namespace, accountClaimName string, ) (*awsv1alpha1.AccountClaim, error)
Get AWS Account Claim CR
func GetAWSAccountCredentials ¶
func GetAWSAccountCredentials( ctx context.Context, cli client.Client, namespace, secretName string, ) (*awsprovider.ClientInput, error)
Get the IAM Credentials created with AWS Account CR
func GetAccountClaimFromClusterID ¶
func GetAccountClaimFromClusterID( ctx context.Context, cli client.Client, clusterID string, ) (*awsv1alpha1.AccountClaim, error)
GetAccountClaimFromClusterID returns an account based on the cluster ID
func GetCurrentCluster ¶ added in v0.35.0
func NewAWSSecret ¶
func NewAsBackplaneClusterAdmin ¶ added in v0.17.0
func NewAsBackplaneClusterAdminWithConn ¶ added in v0.52.0
func NewAsBackplaneClusterAdminWithConn(clusterID string, options client.Options, ocmConn *sdk.Connection, elevationReasons ...string) (client.Client, error)
Create Backplane connection as cluster admin to a provided cluster, using a provided ocm sdk connection This is intended to allow backplane connections to multiple clusters which exist in different ocm environments by allowing the caller to provide an ocm connection to the function.
func NewRestConfig ¶ added in v0.46.0
NewRestConfig returns a *rest.Config for the given cluster ID using backplane configuration
func NewWithConn ¶ added in v0.52.0
func NewWithConn(clusterID string, options client.Options, ocmConn *sdk.Connection) (client.Client, error)
Create Backplane connection to a provided cluster, using a provided ocm sdk connection This is intended to allow backplane connections to multiple clusters which exist in different ocm environments by allowing the caller to provide an ocm connection to the function.
Types ¶
type LazyClient ¶ added in v0.8.0
type LazyClient struct {
// contains filtered or unexported fields
}
func LazyClientInit ¶ added in v0.43.0
func LazyClientInit(fc client.WithWatch) *LazyClient
func LazyClientMock ¶ added in v0.43.0
func LazyClientMock(c client.Client) *LazyClient
func NewClient ¶
func NewClient(flags *genericclioptions.ConfigFlags) *LazyClient
func NewFakeClient ¶ added in v0.25.0
func NewFakeClient(clientBuilder *fake.ClientBuilder) *LazyClient
func (*LazyClient) Create ¶ added in v0.8.0
func (s *LazyClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
func (*LazyClient) Delete ¶ added in v0.8.0
func (s *LazyClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
func (*LazyClient) DeleteAllOf ¶ added in v0.8.0
func (s *LazyClient) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
func (*LazyClient) GroupVersionKindFor ¶ added in v0.21.0
func (*LazyClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
GroupVersionKindFor implements client.Client.
func (*LazyClient) Impersonate ¶ added in v0.25.0
func (s *LazyClient) Impersonate(userName string, elevationReasons ...string)
func (*LazyClient) IsObjectNamespaced ¶ added in v0.21.0
func (*LazyClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
IsObjectNamespaced implements client.Client.
func (*LazyClient) List ¶ added in v0.8.0
func (s *LazyClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
func (*LazyClient) Patch ¶ added in v0.8.0
func (s *LazyClient) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
func (*LazyClient) RESTMapper ¶ added in v0.13.0
func (s *LazyClient) RESTMapper() meta.RESTMapper
func (*LazyClient) Scheme ¶ added in v0.13.0
func (s *LazyClient) Scheme() *runtime.Scheme
func (*LazyClient) Status ¶ added in v0.8.0
func (s *LazyClient) Status() client.StatusWriter
func (*LazyClient) SubResource ¶ added in v0.17.0
func (s *LazyClient) SubResource(subResource string) client.SubResourceClient
func (*LazyClient) Update ¶ added in v0.8.0
func (s *LazyClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error