Documentation ¶
Overview ¶
* Copyright (c) 2023 Baidu, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License. *
* Copyright (c) 2023 Baidu, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License. *
* Copyright (c) 2023 Baidu, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License. *
* Copyright (c) 2023 Baidu, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License. *
* Copyright (c) 2023 Baidu, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language governing permissions * and limitations under the License. *
Index ¶
- Constants
- func NewNetResourceSet(node *ipam.NetResource, k8sObj *ccev2.NetResourceSet, ...) *bceRDMANetResourceSet
- type BCERDMAAllocatorProvider
- type RdmaEniQuotaManager
- type RdmaNetResourceSetEventHandler
- func (handler *RdmaNetResourceSetEventHandler) Create(resource *ccev2.NetResourceSet) error
- func (handler *RdmaNetResourceSetEventHandler) Delete(netResourceSetName string) error
- func (handler *RdmaNetResourceSetEventHandler) ResourceType() string
- func (handler *RdmaNetResourceSetEventHandler) Resync(context.Context, time.Time)
- func (handler *RdmaNetResourceSetEventHandler) Update(resource *ccev2.NetResourceSet) error
Constants ¶
const (
DayDuration = 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
func NewNetResourceSet ¶
func NewNetResourceSet(node *ipam.NetResource, k8sObj *ccev2.NetResourceSet, manager *rdmaInstancesManager) *bceRDMANetResourceSet
NewNetResourceSet returns a new NetResourceSet
Types ¶
type BCERDMAAllocatorProvider ¶
type BCERDMAAllocatorProvider struct {
// contains filtered or unexported fields
}
func (*BCERDMAAllocatorProvider) Init ¶
func (provider *BCERDMAAllocatorProvider) Init(ctx context.Context) error
Init implements allocator.AllocatorProvider
func (*BCERDMAAllocatorProvider) Start ¶
func (provider *BCERDMAAllocatorProvider) Start(ctx context.Context, getterUpdater ipam.NetResourceSetGetterUpdater) (allocator.NetResourceSetEventHandler, error)
Start implements allocator.AllocatorProvider
type RdmaEniQuotaManager ¶
type RdmaEniQuotaManager interface { GetMaxENI() int SetMaxENI(max int) GetMaxIP() int SetMaxIP(max int) // SyncCapacity syncs node capacity SyncCapacityToK8s(ctx context.Context) error }
RdmaEniQuotaManager SyncCapacity syncs node capacity
type RdmaNetResourceSetEventHandler ¶
type RdmaNetResourceSetEventHandler struct {
// contains filtered or unexported fields
}
func (*RdmaNetResourceSetEventHandler) Create ¶
func (handler *RdmaNetResourceSetEventHandler) Create(resource *ccev2.NetResourceSet) error
Create implements allocator.NodeEventHandler
func (*RdmaNetResourceSetEventHandler) Delete ¶
func (handler *RdmaNetResourceSetEventHandler) Delete(netResourceSetName string) error
Delete implements allocator.NodeEventHandler
func (*RdmaNetResourceSetEventHandler) ResourceType ¶
func (handler *RdmaNetResourceSetEventHandler) ResourceType() string
func (*RdmaNetResourceSetEventHandler) Resync ¶
func (handler *RdmaNetResourceSetEventHandler) Resync(context.Context, time.Time)
Resync implements allocator.NodeEventHandler
func (*RdmaNetResourceSetEventHandler) Update ¶
func (handler *RdmaNetResourceSetEventHandler) Update(resource *ccev2.NetResourceSet) error
Update implements allocator.NodeEventHandler