resourceprepares

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAutoScaleCM = "autoscale-defaults"
	CappNS             = "capp-operator-system"
)
View Source
const (
	LogTypeElastic       string = "elastic"
	LogTypeSplunk        string = "splunk"
	KnativeConfiguration        = "serving.knative.dev/configuration"
	NginxPraser                 = "nginx"
	ElasticPort                 = 9200
	SplunkHecPort               = 8088
	ElasticSSLVersion           = "TLSv1_2"
	BufferTimekey               = "1m"
	BufferTimekeyWait           = "30s"
	BufferTimekeyUseUtc         = true
)
View Source
const (
	DomainMapping  = "domainMapping"
	KnativeServing = "knativeServing"
	Flow           = "flow"
	Output         = "output"
	NFSPVC         = "NfsPvc"
)
View Source
const (
	CappResourceKey = "rcs.dana.io/parent-capp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowManager added in v0.1.2

type FlowManager struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (FlowManager) CleanUp added in v0.1.2

func (f FlowManager) CleanUp(capp cappv1alpha1.Capp) error

CleanUp deletes the flow resource associated with the Capp object. The flow resource is deleted by calling the DeleteResource method of the resourceManager object.

func (FlowManager) CreateOrUpdateObject added in v0.1.2

func (f FlowManager) CreateOrUpdateObject(capp cappv1alpha1.Capp) error

CreateOrUpdateObject creates or updates a flow object based on the provided capp. It returns an error if any operation fails.

func (FlowManager) IsRequired added in v0.1.6

func (f FlowManager) IsRequired(capp cappv1alpha1.Capp) bool

IsRequired is responsible to determine if resource logging operator flow is required.

type KnativeDomainMappingManager

type KnativeDomainMappingManager struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (KnativeDomainMappingManager) CleanUp

func (KnativeDomainMappingManager) CreateOrUpdateObject

func (k KnativeDomainMappingManager) CreateOrUpdateObject(capp cappv1alpha1.Capp) error

func (KnativeDomainMappingManager) HandleIrrelevantDomainMapping

func (k KnativeDomainMappingManager) HandleIrrelevantDomainMapping(capp cappv1alpha1.Capp) error

func (KnativeDomainMappingManager) IsRequired added in v0.1.6

IsRequired is responsible to determine if resource knative domain mapping is required.

type KnativeServiceManager

type KnativeServiceManager struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (KnativeServiceManager) CleanUp

func (k KnativeServiceManager) CleanUp(capp cappv1alpha1.Capp) error

CleanUp attempts to delete the associated KnativeService for a given Capp resource. If the KnativeService is not found, the function completes without error. If any other errors occur during the deletion process, an error detailing the issue is returned.

func (KnativeServiceManager) CreateOrUpdateObject

func (k KnativeServiceManager) CreateOrUpdateObject(capp cappv1alpha1.Capp) error

CreateOrUpdateObject ensures a KnativeService resource exists based on the provided Capp. If the Capp doesn't require a KnativeService, it triggers a cleanup. Otherwise, it either creates a new KnativeService or updates an existing one based on the Capp's specifications.

func (KnativeServiceManager) IsRequired added in v0.1.6

func (k KnativeServiceManager) IsRequired(capp cappv1alpha1.Capp) bool

IsRequired determines if a Knative service (ksvc) is required based on the Capp's spec.

type NFSPVCManager added in v0.1.8

type NFSPVCManager struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (NFSPVCManager) CleanUp added in v0.1.8

func (n NFSPVCManager) CleanUp(capp cappv1alpha1.Capp) error

CleanUp deletes the NFSPVC resource associated with the Capp object. The NFSPVC resource is deleted by calling the DeleteResource method of the resourceManager object.

func (NFSPVCManager) CreateOrUpdateObject added in v0.1.8

func (n NFSPVCManager) CreateOrUpdateObject(capp cappv1alpha1.Capp) error

CreateOrUpdateObject creates or updates a nfspvc object based on the provided capp. It returns an error if any operation fails.

func (NFSPVCManager) IsRequired added in v0.1.8

func (n NFSPVCManager) IsRequired(capp cappv1alpha1.Capp) bool

IsRequired is responsible to determine if resource NfsPvc is required.

type OutputManager added in v0.1.2

type OutputManager struct {
	Ctx           context.Context
	K8sclient     client.Client
	Log           logr.Logger
	EventRecorder record.EventRecorder
}

func (OutputManager) CleanUp added in v0.1.2

func (o OutputManager) CleanUp(capp cappv1alpha1.Capp) error

CleanUp deletes the output resource associated with the Capp object. The output resource is deleted by calling the DeleteResource method of the resourceManager object.

func (OutputManager) CreateOrUpdateObject added in v0.1.2

func (o OutputManager) CreateOrUpdateObject(capp cappv1alpha1.Capp) error

CreateOrUpdateObject creates or updates an output object based on the provided Capp. It returns an error if any operation fails.

func (OutputManager) IsRequired added in v0.1.6

func (o OutputManager) IsRequired(capp cappv1alpha1.Capp) bool

IsRequired is responsible to determine if resource logging operator is required.

type ResourceManager

type ResourceManager interface {
	CreateOrUpdateObject(capp cappv1alpha1.Capp) error
	CleanUp(capp cappv1alpha1.Capp) error
	IsRequired(capp cappv1alpha1.Capp) bool
}

Jump to

Keyboard shortcuts

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