Documentation ¶
Index ¶
- func AnnotateNode(kubeClient kubernetes.Interface, nodeName string, key string, value string) error
- func BuildCSINodePod() *apiv1.Pod
- func BuildFlannelPod() *apiv1.Pod
- func BuildGenericLabels(ocid string, nodeName, shape, availabilityDomain string) map[string]string
- func BuildProxymuxClientPod() *apiv1.Pod
- func GetAllPoolTypes(groups []string) (string, error)
- func GetPoolType(group string) (string, error)
- func IsRetryable(err error) bool
- func LabelNode(kubeClient kubernetes.Interface, nodeName string, key string, value string) error
- func NewRetryPolicy() *common.RetryPolicy
- func NewRetryPolicyWithMaxAttempts(retryAttempts uint) *common.RetryPolicy
- func SetNodeProviderID(kubeClient kubernetes.Interface, nodeName string, value string) error
- type CloudConfig
- type OciRef
- type Shape
- type ShapeClient
- type ShapeClientImpl
- type ShapeGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnnotateNode ¶
AnnotateNode adds an annotation to a new based on the key/value
func BuildCSINodePod ¶
BuildCSINodePod builds a template of the CSI Node Driver pod
func BuildFlannelPod ¶
BuildFlannelPod builds a template of the Flannel pod
func BuildGenericLabels ¶
BuildGenericLabels defines all the default labels that nodes should have
func BuildProxymuxClientPod ¶
BuildProxymuxClientPod builds a template of the Proxymux Client pod
func GetAllPoolTypes ¶
GetAllPoolTypes returns the resource type of the specified groups i.e. (instance pool or node pool) or an error if it cannot be determined
func GetPoolType ¶
GetPoolType returns the resource type of the specified group i.e. (instance pool or node pool) or an error if it cannot be determined
func IsRetryable ¶
IsRetryable returns true if the given error is retryable.
func NewRetryPolicy ¶
func NewRetryPolicy() *common.RetryPolicy
NewRetryPolicy returns an exponential backoff retry policy
func NewRetryPolicyWithMaxAttempts ¶
func NewRetryPolicyWithMaxAttempts(retryAttempts uint) *common.RetryPolicy
NewRetryPolicyWithMaxAttempts returns a RetryPolicy with the specified max retryAttempts
func SetNodeProviderID ¶
func SetNodeProviderID(kubeClient kubernetes.Interface, nodeName string, value string) error
SetNodeProviderID sets the provider id value on the node object
Types ¶
type CloudConfig ¶
type CloudConfig struct { Global struct { RefreshInterval time.Duration `gcfg:"refresh-interval"` CompartmentID string `gcfg:"compartment-id"` Region string `gcfg:"region"` UseInstancePrinciples bool `gcfg:"use-instance-principals"` UseNonMemberAnnotation bool `gcfg:"use-non-member-annotation"` } }
CloudConfig holds the cloud config for OCI provider.
func CreateCloudConfig ¶
func CreateCloudConfig(cloudConfigPath string, configProvider common.ConfigurationProvider, implType string) (*CloudConfig, error)
CreateCloudConfig creates a CloudConfig object based on a file or env vars
type OciRef ¶
type OciRef struct { AvailabilityDomain string Name string CompartmentID string InstanceID string NodePoolID string InstancePoolID string PrivateIPAddress string PublicIPAddress string Shape string }
OciRef contains s reference to some entity in OCI world.
type Shape ¶
Shape includes the resource attributes of a given shape which should be used for constructing node templates.
type ShapeClient ¶
type ShapeClient interface { GetInstanceConfiguration(context.Context, core.GetInstanceConfigurationRequest) (core.GetInstanceConfigurationResponse, error) ListShapes(context.Context, core.ListShapesRequest) (core.ListShapesResponse, error) }
ShapeClient is an interface around the GetInstanceConfiguration and ListShapes calls.
type ShapeClientImpl ¶
type ShapeClientImpl struct { // Can fetch instance configs (flexible shapes) ComputeMgmtClient core.ComputeManagementClient // Can fetch shapes directly ComputeClient core.ComputeClient }
ShapeClientImpl is the implementation for fetching shape information.
func (ShapeClientImpl) GetInstanceConfiguration ¶
func (cc ShapeClientImpl) GetInstanceConfiguration(ctx context.Context, req core.GetInstanceConfigurationRequest) (core.GetInstanceConfigurationResponse, error)
GetInstanceConfiguration gets the instance configuration.
func (ShapeClientImpl) ListShapes ¶
func (cc ShapeClientImpl) ListShapes(ctx context.Context, req core.ListShapesRequest) (core.ListShapesResponse, error)
ListShapes lists the shapes.
type ShapeGetter ¶
type ShapeGetter interface { GetNodePoolShape(*oke.NodePool) (*Shape, error) GetInstancePoolShape(pool *core.InstancePool) (*Shape, error) Refresh() }
ShapeGetter returns the oci shape attributes for the pool.
func CreateShapeGetter ¶
func CreateShapeGetter(shapeClient ShapeClient) ShapeGetter
CreateShapeGetter creates a new oci shape getter.