Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +groupName=ocicommon.oracle.com
Index ¶
- Constants
- Variables
- type Dependency
- type DependsOn
- type ObjectInterface
- type ResourceState
- type ResourceStatus
- func (s *ResourceStatus) AddDependent(kind string, obj runtime.Object) error
- func (in *ResourceStatus) DeepCopy() *ResourceStatus
- func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
- func (s *ResourceStatus) HandleError(e error) error
- func (s *ResourceStatus) IsDependentRegistered(kind string, obj runtime.Object) (bool, error)
- func (s *ResourceStatus) RemoveDependent(kind string, obj runtime.Object) error
Constants ¶
const ( AnyStringValidationRegex = ".+" AvailabilityDomainValidationRegex = "^[a-zA-Z0-9]+\\:[a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9]$" CidrValidationRegex = "" /* 136-byte string literal not displayed */ DomainValidationRegex = "^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]\\.[a-zA-Z]{2,}$" HostnameValidationRegex = "^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])$" Ipv4ValidationRegex = "^$|^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$" LoadBalancerProtocolRegex = "^HTTP$|^HTTP2$|^TCP$" NoOrAnyStringValidationRegex = "^$|.+" ValidationTypeArray = "array" ValidationTypeBoolean = "boolean" ValidationTypeInteger = "integer" ValidationTypeString = "string" )
Regex constants used for object fields validation to ensure proper types and values Defined as constants because they are used multiple times in difference OCI resource types
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder() AddToScheme = SchemeBuilder.AddToScheme )
Register scheme and api resources
var MetaDataValidation = apiextv1beta1.JSONSchemaProps{ Required: []string{"name"}, Properties: map[string]apiextv1beta1.JSONSchemaProps{ "name": { Type: ValidationTypeString, Pattern: HostnameValidationRegex, }, "namespace": { Type: ValidationTypeString, Pattern: HostnameValidationRegex, }, }, }
MetaDataValidation is variable used to construct the schema validation property for the CRDs
var SchemeGroupVersion = schema.GroupVersion{Group: "ocicommon.oracle.com", Version: "v1alpha1"}
SchemeGroupVersion is the group version used to register these objects.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
Dependency is an array of explicit DependsOn relations between objects
func (*Dependency) DeepCopy ¶
func (in *Dependency) DeepCopy() *Dependency
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dependency.
func (*Dependency) DeepCopyInto ¶
func (in *Dependency) DeepCopyInto(out *Dependency)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Dependency) GetDependsOn ¶
func (d *Dependency) GetDependsOn() map[string]DependsOn
GetDependsOn is getter for DependsOn
type DependsOn ¶
type DependsOn struct { LabelSelector map[string]string `json:"labelselector,omitempty"` FieldSelector map[string]string `json:"fieldselector,omitempty"` }
DependsOn is user-defined explicit relationship between objects using selectors
func (*DependsOn) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependsOn.
func (*DependsOn) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectInterface ¶
type ObjectInterface interface { AddDependent(kind string, obj runtime.Object) error RemoveDependent(kind string, obj runtime.Object) error IsDependentRegistered(kind string, obj runtime.Object) (bool, error) GetResourcePlural() string GetResourceID() string IsResource() bool GetGroupVersionResource() schema.GroupVersionResource GetResourceState() ResourceState }
ObjectInterface is an interface for resource objects that supports dependencies
type ResourceState ¶
type ResourceState string
ResourceState stores state for any OCI resource
const ( // ResourceStatePending is used when the resource is pending reconcilation ResourceStatePending ResourceState = "Pending" // ResourceStateCreated is used when the resource is created in OCI ResourceStateCreated ResourceState = "Created" // ResourceStateProcessed is used when the reconcilation completes ResourceStateProcessed ResourceState = "Processed" // ResourceStateError indicates if the resource reconcilation encountered an error ResourceStateError ResourceState = "Error" )
type ResourceStatus ¶
type ResourceStatus struct { State ResourceState `json:"state,omitempty"` ResetCounter int `json:"resetcounter,omitempty"` Message string `json:"message,omitempty"` Dependents map[string][]string `json:"dependents,omitempty"` }
ResourceStatus is a generic struct to store status information about any OCI resource
func (*ResourceStatus) AddDependent ¶
func (s *ResourceStatus) AddDependent(kind string, obj runtime.Object) error
AddDependent adds a dependent to the resource status
func (*ResourceStatus) DeepCopy ¶
func (in *ResourceStatus) DeepCopy() *ResourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceStatus.
func (*ResourceStatus) DeepCopyInto ¶
func (in *ResourceStatus) DeepCopyInto(out *ResourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceStatus) HandleError ¶
func (s *ResourceStatus) HandleError(e error) error
HandleError updates the object with errors
func (*ResourceStatus) IsDependentRegistered ¶
IsDependentRegistered checks if a dependent exists in the resource status
func (*ResourceStatus) RemoveDependent ¶
func (s *ResourceStatus) RemoveDependent(kind string, obj runtime.Object) error
RemoveDependent removes a dependant from the resource status