util

package
v1.27.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 70 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CompartmentIDAnnotation is the annotation for OCI compartment
	CompartmentIDAnnotation = "oci.oraclecloud.com/compartment-id"

	// Error codes
	Err429           = "429"
	Err4XX           = "4XX"
	Err5XX           = "5XX"
	ErrValidation    = "VALIDATION_ERROR"
	ErrLimitExceeded = "LIMIT_EXCEEDED"
	ErrCtxTimeout    = "CTX_TIMEOUT"
	Success          = "SUCCESS"
	BackupCreating   = "CREATING"

	// Components generating errors
	// Load Balancer
	LoadBalancerType = "LB"
	NSGType          = "NSG"
	// storage types
	CSIStorageType = "CSI"
	FVDStorageType = "FVD"
)

Variables

This section is empty.

Functions

func GetError

func GetError(err error) string

func GetHttpStatusCode added in v1.25.2

func GetHttpStatusCode(err error) int

func GetMetricDimensionForComponent

func GetMetricDimensionForComponent(err string, component string) string

func LookupNodeCompartment

func LookupNodeCompartment(k kubernetes.Interface, nodeName string) (string, error)

LookupNodeCompartment returns the compartment OCID for the given nodeName.

Types

type MockCoreClient added in v1.26.3

type MockCoreClient v12.CoreV1Client

func (MockCoreClient) ComponentStatuses added in v1.26.3

func (m MockCoreClient) ComponentStatuses() v12.ComponentStatusInterface

func (MockCoreClient) ConfigMaps added in v1.26.3

func (m MockCoreClient) ConfigMaps(namespace string) v12.ConfigMapInterface

func (MockCoreClient) Endpoints added in v1.26.3

func (m MockCoreClient) Endpoints(namespace string) v12.EndpointsInterface

func (MockCoreClient) Events added in v1.26.3

func (m MockCoreClient) Events(namespace string) v12.EventInterface

func (MockCoreClient) LimitRanges added in v1.26.3

func (m MockCoreClient) LimitRanges(namespace string) v12.LimitRangeInterface

func (MockCoreClient) Namespaces added in v1.26.3

func (m MockCoreClient) Namespaces() v12.NamespaceInterface

func (MockCoreClient) Nodes added in v1.26.3

func (m MockCoreClient) Nodes() v12.NodeInterface

func (MockCoreClient) PersistentVolumeClaims added in v1.26.3

func (m MockCoreClient) PersistentVolumeClaims(namespace string) v12.PersistentVolumeClaimInterface

func (MockCoreClient) PersistentVolumes added in v1.26.3

func (m MockCoreClient) PersistentVolumes() v12.PersistentVolumeInterface

func (MockCoreClient) PodTemplates added in v1.26.3

func (m MockCoreClient) PodTemplates(namespace string) v12.PodTemplateInterface

func (MockCoreClient) Pods added in v1.26.3

func (m MockCoreClient) Pods(namespace string) v12.PodInterface

func (MockCoreClient) RESTClient added in v1.26.3

func (m MockCoreClient) RESTClient() rest.Interface

func (MockCoreClient) ReplicationControllers added in v1.26.3

func (m MockCoreClient) ReplicationControllers(namespace string) v12.ReplicationControllerInterface

func (MockCoreClient) ResourceQuotas added in v1.26.3

func (m MockCoreClient) ResourceQuotas(namespace string) v12.ResourceQuotaInterface

func (MockCoreClient) Secrets added in v1.26.3

func (m MockCoreClient) Secrets(namespace string) v12.SecretInterface

func (MockCoreClient) ServiceAccounts added in v1.26.3

func (m MockCoreClient) ServiceAccounts(namespace string) v12.ServiceAccountInterface

func (MockCoreClient) Services added in v1.26.3

func (m MockCoreClient) Services(namespace string) v12.ServiceInterface

type MockKubeClient added in v1.26.3

type MockKubeClient struct {
	CoreClient *MockCoreClient
}

func (MockKubeClient) AdmissionregistrationV1 added in v1.26.3

func (m MockKubeClient) AdmissionregistrationV1() v11.AdmissionregistrationV1Interface

func (MockKubeClient) AdmissionregistrationV1alpha1 added in v1.26.3

func (m MockKubeClient) AdmissionregistrationV1alpha1() v1alpha11.AdmissionregistrationV1alpha1Interface

func (MockKubeClient) AdmissionregistrationV1beta1 added in v1.26.3

func (m MockKubeClient) AdmissionregistrationV1beta1() v1beta11.AdmissionregistrationV1beta1Interface

func (MockKubeClient) AppsV1 added in v1.26.3

func (m MockKubeClient) AppsV1() v1.AppsV1Interface

func (MockKubeClient) AppsV1beta1 added in v1.26.3

func (MockKubeClient) AppsV1beta2 added in v1.26.3

func (MockKubeClient) AuthenticationV1 added in v1.26.3

func (m MockKubeClient) AuthenticationV1() v14.AuthenticationV1Interface

func (MockKubeClient) AuthenticationV1alpha1 added in v1.26.3

func (m MockKubeClient) AuthenticationV1alpha1() v1alpha13.AuthenticationV1alpha1Interface

func (MockKubeClient) AuthenticationV1beta1 added in v1.26.3

func (m MockKubeClient) AuthenticationV1beta1() v1beta13.AuthenticationV1beta1Interface

func (MockKubeClient) AuthorizationV1 added in v1.26.3

func (m MockKubeClient) AuthorizationV1() v15.AuthorizationV1Interface

func (MockKubeClient) AuthorizationV1beta1 added in v1.26.3

func (m MockKubeClient) AuthorizationV1beta1() v1beta14.AuthorizationV1beta1Interface

func (MockKubeClient) AutoscalingV1 added in v1.26.3

func (m MockKubeClient) AutoscalingV1() v16.AutoscalingV1Interface

func (MockKubeClient) AutoscalingV2 added in v1.26.3

func (m MockKubeClient) AutoscalingV2() v21.AutoscalingV2Interface

func (MockKubeClient) AutoscalingV2beta1 added in v1.26.3

func (m MockKubeClient) AutoscalingV2beta1() v2beta11.AutoscalingV2beta1Interface

func (MockKubeClient) AutoscalingV2beta2 added in v1.26.3

func (m MockKubeClient) AutoscalingV2beta2() v2beta21.AutoscalingV2beta2Interface

func (MockKubeClient) BatchV1 added in v1.26.3

func (m MockKubeClient) BatchV1() v17.BatchV1Interface

func (MockKubeClient) BatchV1beta1 added in v1.26.3

func (MockKubeClient) CertificatesV1 added in v1.26.3

func (m MockKubeClient) CertificatesV1() v18.CertificatesV1Interface

func (MockKubeClient) CertificatesV1alpha1 added in v1.27.2

func (m MockKubeClient) CertificatesV1alpha1() v1alpha18.CertificatesV1alpha1Interface

func (MockKubeClient) CertificatesV1beta1 added in v1.26.3

func (m MockKubeClient) CertificatesV1beta1() v1beta16.CertificatesV1beta1Interface

func (MockKubeClient) CoordinationV1 added in v1.26.3

func (m MockKubeClient) CoordinationV1() v19.CoordinationV1Interface

func (MockKubeClient) CoordinationV1beta1 added in v1.26.3

func (m MockKubeClient) CoordinationV1beta1() v1beta17.CoordinationV1beta1Interface

func (MockKubeClient) CoreV1 added in v1.26.3

func (m MockKubeClient) CoreV1() v12.CoreV1Interface

func (MockKubeClient) Discovery added in v1.26.3

func (MockKubeClient) DiscoveryV1 added in v1.26.3

func (m MockKubeClient) DiscoveryV1() v110.DiscoveryV1Interface

func (MockKubeClient) DiscoveryV1beta1 added in v1.26.3

func (m MockKubeClient) DiscoveryV1beta1() v1beta18.DiscoveryV1beta1Interface

func (MockKubeClient) EventsV1 added in v1.26.3

func (m MockKubeClient) EventsV1() v111.EventsV1Interface

func (MockKubeClient) EventsV1beta1 added in v1.26.3

func (MockKubeClient) ExtensionsV1beta1 added in v1.26.3

func (m MockKubeClient) ExtensionsV1beta1() v1beta110.ExtensionsV1beta1Interface

func (MockKubeClient) FlowcontrolV1alpha1 added in v1.26.3

func (m MockKubeClient) FlowcontrolV1alpha1() v1alpha14.FlowcontrolV1alpha1Interface

func (MockKubeClient) FlowcontrolV1beta1 added in v1.26.3

func (m MockKubeClient) FlowcontrolV1beta1() v1beta111.FlowcontrolV1beta1Interface

func (MockKubeClient) FlowcontrolV1beta2 added in v1.26.3

func (m MockKubeClient) FlowcontrolV1beta2() v1beta22.FlowcontrolV1beta2Interface

func (MockKubeClient) FlowcontrolV1beta3 added in v1.26.3

func (m MockKubeClient) FlowcontrolV1beta3() v1beta31.FlowcontrolV1beta3Interface

func (MockKubeClient) InternalV1alpha1 added in v1.26.3

func (m MockKubeClient) InternalV1alpha1() v1alpha12.InternalV1alpha1Interface

func (MockKubeClient) NetworkingV1 added in v1.26.3

func (m MockKubeClient) NetworkingV1() v112.NetworkingV1Interface

func (MockKubeClient) NetworkingV1alpha1 added in v1.26.3

func (m MockKubeClient) NetworkingV1alpha1() v1alpha15.NetworkingV1alpha1Interface

func (MockKubeClient) NetworkingV1beta1 added in v1.26.3

func (m MockKubeClient) NetworkingV1beta1() v1beta112.NetworkingV1beta1Interface

func (MockKubeClient) NodeV1 added in v1.26.3

func (m MockKubeClient) NodeV1() v113.NodeV1Interface

func (MockKubeClient) NodeV1alpha1 added in v1.26.3

func (MockKubeClient) NodeV1beta1 added in v1.26.3

func (MockKubeClient) PolicyV1 added in v1.26.3

func (m MockKubeClient) PolicyV1() v114.PolicyV1Interface

func (MockKubeClient) PolicyV1beta1 added in v1.26.3

func (MockKubeClient) RbacV1 added in v1.26.3

func (m MockKubeClient) RbacV1() v115.RbacV1Interface

func (MockKubeClient) RbacV1alpha1 added in v1.26.3

func (MockKubeClient) RbacV1beta1 added in v1.26.3

func (MockKubeClient) ResourceV1alpha2 added in v1.27.2

func (m MockKubeClient) ResourceV1alpha2() v1alpha2.ResourceV1alpha2Interface

func (MockKubeClient) SchedulingV1 added in v1.26.3

func (m MockKubeClient) SchedulingV1() v116.SchedulingV1Interface

func (MockKubeClient) SchedulingV1alpha1 added in v1.26.3

func (m MockKubeClient) SchedulingV1alpha1() v1alpha19.SchedulingV1alpha1Interface

func (MockKubeClient) SchedulingV1beta1 added in v1.26.3

func (m MockKubeClient) SchedulingV1beta1() v1beta116.SchedulingV1beta1Interface

func (MockKubeClient) StorageV1 added in v1.26.3

func (m MockKubeClient) StorageV1() v117.StorageV1Interface

func (MockKubeClient) StorageV1alpha1 added in v1.26.3

func (m MockKubeClient) StorageV1alpha1() v1alpha1.StorageV1alpha1Interface

func (MockKubeClient) StorageV1beta1 added in v1.26.3

type MockNodes added in v1.26.3

type MockNodes struct {
	// contains filtered or unexported fields
}

func (MockNodes) Apply added in v1.26.3

func (MockNodes) ApplyStatus added in v1.26.3

func (MockNodes) Create added in v1.26.3

func (m MockNodes) Create(ctx context.Context, node *api.Node, opts metav1.CreateOptions) (*api.Node, error)

func (MockNodes) Delete added in v1.26.3

func (m MockNodes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error

func (MockNodes) DeleteCollection added in v1.26.3

func (m MockNodes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error

func (MockNodes) Get added in v1.26.3

func (m MockNodes) Get(ctx context.Context, name string, opts metav1.GetOptions) (*api.Node, error)

func (MockNodes) List added in v1.26.3

func (m MockNodes) List(ctx context.Context, opts metav1.ListOptions) (*api.NodeList, error)

func (MockNodes) Patch added in v1.26.3

func (m MockNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *api.Node, err error)

func (MockNodes) PatchStatus added in v1.26.3

func (m MockNodes) PatchStatus(ctx context.Context, nodeName string, data []byte) (*api.Node, error)

func (MockNodes) Update added in v1.26.3

func (m MockNodes) Update(ctx context.Context, node *api.Node, opts metav1.UpdateOptions) (*api.Node, error)

func (MockNodes) UpdateStatus added in v1.26.3

func (m MockNodes) UpdateStatus(ctx context.Context, node *api.Node, opts metav1.UpdateOptions) (*api.Node, error)

func (MockNodes) Watch added in v1.26.3

type MockOCIBlockStorageClient added in v1.26.3

type MockOCIBlockStorageClient struct {
	// contains filtered or unexported fields
}

func (*MockOCIBlockStorageClient) ListVolumes added in v1.26.3

func (c *MockOCIBlockStorageClient) ListVolumes(ctx context.Context, request core.ListVolumesRequest) (response core.ListVolumesResponse, err error)

type MockOCIComputeClient added in v1.26.3

type MockOCIComputeClient struct {
	// contains filtered or unexported fields
}

func (MockOCIComputeClient) GetVolumeAttachment added in v1.26.3

func (c MockOCIComputeClient) GetVolumeAttachment(ctx context.Context, request core.GetVolumeAttachmentRequest) (response core.GetVolumeAttachmentResponse, err error)

func (MockOCIComputeClient) ListVolumeAttachments added in v1.26.3

func (c MockOCIComputeClient) ListVolumeAttachments(ctx context.Context, request core.ListVolumeAttachmentsRequest) (response core.ListVolumeAttachmentsResponse, err error)

type MockOCIFileStorageClient added in v1.26.3

type MockOCIFileStorageClient struct {
	// contains filtered or unexported fields
}

func (MockOCIFileStorageClient) ListExports added in v1.26.3

func (MockOCIFileStorageClient) ListFileSystems added in v1.26.3

func (MockOCIFileStorageClient) ListMountTargets added in v1.26.3

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL