Documentation ¶
Index ¶
- func DoTimeStampsDiffer(cpTimeUpdated *common.SDKTime, operatorTimeUpdated *metav1.Time) bool
- type AccessPolicyDetails
- type BaseValidator
- type CustomResourceHandler
- type CustomResourceValidator
- type CustomValidationManager
- type Dependencies
- type Finalizer
- type IngressGatewayDetails
- type IngressGatewayRouteTableDetails
- type MeshDetails
- type Resource
- type ResourceDetails
- type SdkOperations
- type ServiceMeshServiceManager
- func (c *ServiceMeshServiceManager) CreateOrUpdate(ctx context.Context, obj runtime.Object, req ctrl.Request) (servicemanager.OSOKResponse, error)
- func (c *ServiceMeshServiceManager) Delete(ctx context.Context, obj runtime.Object) (bool, error)
- func (c *ServiceMeshServiceManager) GetCrdStatus(obj runtime.Object) (*api.OSOKStatus, error)
- func (c *ServiceMeshServiceManager) UpdateK8s(ctx context.Context, obj client.Object, details *ResourceDetails, ...) (servicemanager.OSOKResponse, error)
- func (c *ServiceMeshServiceManager) UpdateOpcRetryToken(ctx context.Context, obj client.Object, opcRetryToken *string) error
- func (c *ServiceMeshServiceManager) UpdateServiceMeshActiveStatus(ctx context.Context, obj client.Object, err error)
- func (c *ServiceMeshServiceManager) UpdateServiceMeshCondition(ctx context.Context, obj client.Object, status metav1.ConditionStatus, ...) error
- func (c *ServiceMeshServiceManager) UpdateServiceMeshConfiguredStatus(ctx context.Context, obj client.Object, err error) error
- func (c *ServiceMeshServiceManager) UpdateServiceMeshDependenciesActiveStatus(ctx context.Context, object client.Object, err error)
- type ServiceMeshValidationManager
- func (v *ServiceMeshValidationManager) GetObject() client.Object
- func (v *ServiceMeshValidationManager) ValidateCreateRequest(ctx context.Context, object client.Object) admission.Response
- func (v *ServiceMeshValidationManager) ValidateDeleteRequest(ctx context.Context, object client.Object) admission.Response
- func (v *ServiceMeshValidationManager) ValidateUpdateRequest(ctx context.Context, object client.Object, oldObject client.Object) admission.Response
- type Status
- type Verify
- type VirtualDeploymentDetails
- type VirtualServiceDetails
- type VirtualServiceRouteTableDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessPolicyDetails ¶
type AccessPolicyDetails struct { Dependencies *meshConversions.AccessPolicyDependencies SdkAp *sdk.AccessPolicy BuildSdkAp *sdk.AccessPolicy }
type BaseValidator ¶
type BaseValidator struct { Client client.Client Reader client.Reader Decoder *admission.Decoder ValidationManager CustomValidationManager Log loggerutil.OSOKLogger Metrics *metrics.Metrics Recorder record.EventRecorder }
client - uses cache client, and has read/write both operations reader - uses direct client, but only allows read operations
func (*BaseValidator) InjectDecoder ¶
func (c *BaseValidator) InjectDecoder(d *admission.Decoder) error
InjectDecoder injects the Decoder. BaseValidator implements admission.DecoderInjector. A Decoder will be automatically injected.
type CustomResourceHandler ¶
type CustomResourceHandler interface { Resource Finalizer Status Verify Dependencies SdkOperations }
type CustomResourceValidator ¶
type CustomResourceValidator interface { ValidateOnCreate(context context.Context, object client.Object) (bool, string) ValidateOnUpdate(context context.Context, object client.Object, oldObject client.Object) (bool, string) GetStatus(object client.Object) (*servicemeshapi.ServiceMeshStatus, error) ResolveRef(object client.Object) (bool, string) ValidateObject(object client.Object) error GetEntityType() client.Object }
type CustomValidationManager ¶
type CustomValidationManager interface { ValidateCreateRequest(ctx context.Context, object client.Object) admission.Response ValidateUpdateRequest(ctx context.Context, object client.Object, oldObject client.Object) admission.Response ValidateDeleteRequest(ctx context.Context, object client.Object) admission.Response GetObject() client.Object }
type Dependencies ¶
type IngressGatewayDetails ¶
type IngressGatewayDetails struct { MeshId *api.OCID SdkIg *sdk.IngressGateway BuildSdkIg *sdk.IngressGateway }
type IngressGatewayRouteTableDetails ¶
type IngressGatewayRouteTableDetails struct { SdkIgrt *sdk.IngressGatewayRouteTable BuildSdkIgrt *sdk.IngressGatewayRouteTable Dependencies *meshConversions.IGRTDependencies }
type Resource ¶
type Resource interface { GetResource(ctx context.Context, object client.Object, details *ResourceDetails) error CreateResource(ctx context.Context, object client.Object, details *ResourceDetails) (bool, error) UpdateResource(ctx context.Context, object client.Object, details *ResourceDetails) error DeleteResource(ctx context.Context, object client.Object) error ChangeCompartment(ctx context.Context, object client.Object, details *ResourceDetails) error }
type ResourceDetails ¶
type ResourceDetails struct { MeshDetails MeshDetails VsDetails VirtualServiceDetails VdDetails VirtualDeploymentDetails VsrtDetails VirtualServiceRouteTableDetails ApDetails AccessPolicyDetails IgDetails IngressGatewayDetails IgrtDetails IngressGatewayRouteTableDetails OpcRetryToken *string }
type SdkOperations ¶
type SdkOperations interface { BuildSdk(object client.Object, details *ResourceDetails) error HasCompartmentIdChanged(object client.Object, details *ResourceDetails) (bool, error) GetLifecycleState(details *ResourceDetails) string GetMessage(details *ResourceDetails) string HasSdk(details *ResourceDetails) bool }
type ServiceMeshServiceManager ¶
type ServiceMeshServiceManager struct {
// contains filtered or unexported fields
}
func NewServiceMeshServiceManager ¶
func NewServiceMeshServiceManager(client client.Client, log loggerutil.OSOKLogger, handler CustomResourceHandler) *ServiceMeshServiceManager
func (*ServiceMeshServiceManager) CreateOrUpdate ¶
func (c *ServiceMeshServiceManager) CreateOrUpdate(ctx context.Context, obj runtime.Object, req ctrl.Request) (servicemanager.OSOKResponse, error)
func (*ServiceMeshServiceManager) GetCrdStatus ¶
func (c *ServiceMeshServiceManager) GetCrdStatus(obj runtime.Object) (*api.OSOKStatus, error)
func (*ServiceMeshServiceManager) UpdateK8s ¶
func (c *ServiceMeshServiceManager) UpdateK8s(ctx context.Context, obj client.Object, details *ResourceDetails, hasCompartmentChanged bool, hasResourceUpdatedInCp bool) (servicemanager.OSOKResponse, error)
func (*ServiceMeshServiceManager) UpdateOpcRetryToken ¶
func (*ServiceMeshServiceManager) UpdateServiceMeshActiveStatus ¶
func (*ServiceMeshServiceManager) UpdateServiceMeshCondition ¶
func (c *ServiceMeshServiceManager) UpdateServiceMeshCondition(ctx context.Context, obj client.Object, status metav1.ConditionStatus, reason string, message string, meshConditionType servicemeshapi.ServiceMeshConditionType) error
UpdateServiceMeshCondition updates the status of the resource Called when there is an error from CP Additionally, also called when the state is not Active We haven't fully synced the spec, hence using the existing generation from the status for generation field
func (*ServiceMeshServiceManager) UpdateServiceMeshConfiguredStatus ¶
func (*ServiceMeshServiceManager) UpdateServiceMeshDependenciesActiveStatus ¶
type ServiceMeshValidationManager ¶
type ServiceMeshValidationManager struct {
// contains filtered or unexported fields
}
func NewServiceMeshValidationManager ¶
func NewServiceMeshValidationManager(validationManager CustomResourceValidator, log loggerutil.OSOKLogger) *ServiceMeshValidationManager
func (*ServiceMeshValidationManager) GetObject ¶
func (v *ServiceMeshValidationManager) GetObject() client.Object
func (*ServiceMeshValidationManager) ValidateCreateRequest ¶
func (*ServiceMeshValidationManager) ValidateDeleteRequest ¶
type Status ¶
type Status interface { GetServiceMeshStatus(object client.Object) (*servicemeshapi.ServiceMeshStatus, error) GetConditionStatus(details *ResourceDetails) metav1.ConditionStatus UpdateStatus(object client.Object, details *ResourceDetails) (bool, error) GetTimeUpdated(details *ResourceDetails) *common.SDKTime }
type VirtualDeploymentDetails ¶
type VirtualDeploymentDetails struct { VsRef *meshCommons.ResourceRef SdkVd *sdk.VirtualDeployment BuildSdkVd *sdk.VirtualDeployment }
type VirtualServiceDetails ¶
type VirtualServiceDetails struct { MeshId *api.OCID SdkVs *sdk.VirtualService BuildSdkVs *sdk.VirtualService }
type VirtualServiceRouteTableDetails ¶
type VirtualServiceRouteTableDetails struct { SdkVsrt *sdk.VirtualServiceRouteTable BuildSdkVsrt *sdk.VirtualServiceRouteTable Dependencies *meshConversions.VSRTDependencies }
Click to show internal directories.
Click to hide internal directories.