Documentation
¶
Index ¶
- Constants
- Variables
- func CreatePodMonitors(config *rest.Config, ns string, services []*v1.Service, sInterval string, ...) error
- func DataFromDirectory(assets embed.FS, directoryPath string, parameters interface{}) (map[string]string, error)
- func DownloadFile(fullURLFile string, fileName string) error
- func DownloadFileTLS(ctx context.Context, contentPackPath *v11.ContentPackPathHTTPConfig, ...) error
- func GeneratePodMonitor(s *v1.Service, sInterval string, sTimeout string) *promv1.PodMonitor
- func GetAggregatorIds(num int) []int
- func GetFromResourceMap(resourceList core.ResourceList, key string) string
- func GetInstanceLabel(name, namespace string) string
- func GetLogLevel() zapcore.Level
- func GetTagFromImage(image string) string
- func GetTimeNow() string
- func IsStatusEqual(source loggingService.LoggingServiceCondition, ...) bool
- func Logger(name string) logr.Logger
- func MustAssetReader(assets embed.FS, asset string) string
- func ParseTemplate(fileContent, filePath string, parameters interface{}) (string, error)
- func ReadFile(filePath string) (string, error)
- func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)
- func ToJSON(object interface{}) string
- func ToString(duration time.Duration) string
- func Unzip(src string, dest string) ([]string, error)
- func WaitForHostActive(host string, port int, timeout time.Duration) error
- type Component
- type ComponentReconciler
- func (r *ComponentReconciler) CreateResource(cr *loggingService.LoggingService, o K8sResource, setRefOptional ...bool) error
- func (r *ComponentReconciler) DeleteResource(o K8sResource) error
- func (r *ComponentReconciler) GetResource(o K8sResource) error
- func (r *ComponentReconciler) UpdateResource(o K8sResource) error
- type ComponentsPendingReconciler
- type DynamicParameters
- type K8sResource
- type PodManager
- func (manager *PodManager) DeletePods(labelSelectors map[string]string) (bool, error)
- func (manager *PodManager) FindPods(labelSelectors map[string]string) (podList *core.PodList, err error)
- func (manager *PodManager) IsDaemonSetAvailable(serviceName string) (bool, error)
- func (manager *PodManager) IsDaemonSetExists(serviceName string) (bool, error)
- func (manager *PodManager) IsDeploymentExists(serviceName string) (bool, error)
- func (manager *PodManager) IsDeploymentReplicasSynchronised(serviceName string) (bool, error)
- func (manager *PodManager) IsJobSucceeded(jobName string) (bool, error)
- func (manager *PodManager) IsStatefulsetReplicasSynchronised(serviceName string) (bool, error)
- func (manager *PodManager) ToPodNameList(podList *core.PodList) []string
- func (manager *PodManager) WaitForJobSucceeded(jobName string, timeout time.Duration) (bool, error)
- func (manager *PodManager) WaitForStatefulsetUpdated(serviceName string, timeout time.Duration) (bool, error)
- func (manager *PodManager) WaitForTerminatingPods(terminatedPodNames []string, labelSelectors map[string]string) (bool, error)
- type RestClient
- type SkipStatusUpdatePredicate
- func (predicate *SkipStatusUpdatePredicate) Create(event event.CreateEvent) bool
- func (predicate *SkipStatusUpdatePredicate) Delete(event event.DeleteEvent) bool
- func (predicate *SkipStatusUpdatePredicate) Generic(event event.GenericEvent) bool
- func (predicate *SkipStatusUpdatePredicate) IsStatusUpdated(oldInstance runtime.Object, newInstance runtime.Object) bool
- func (predicate *SkipStatusUpdatePredicate) Update(event event.UpdateEvent) bool
- type StatusUpdater
- func (updater *StatusUpdater) GetCondition(newConditionReason string) (int, *loggingService.LoggingServiceCondition)
- func (updater *StatusUpdater) IsStatusFailed(conditionReason string) bool
- func (updater *StatusUpdater) RemoveStatus(reason string) bool
- func (updater *StatusUpdater) RemoveTemporaryStatuses()
- func (updater *StatusUpdater) UpdateStatus(reason string, statusType string, status bool, message string)
- type Сreds
Constants ¶
View Source
const ( Debug = 1 Info = 2 Warn = -1 Error = -2 )
View Source
const ( InProgress = "In Progress" Success = "Successful" Failed = "Failed" )
View Source
const ( Interval = time.Second * 10 TerminatingPodTimeout = time.Minute * 2 )
View Source
const (
BufferSize int = 100
)
Variables ¶
View Source
var ( ErrPodMonitorNotPresent = fmt.Errorf("no PodMonitor registered with the API") SelectorLabels = map[string]string{"name": "logging-service-operator"} )
View Source
var ( BasePath = "assets/" LoggingServiceStatus = "ReconcileCycleStatus" FluentdComponentName = "logging-fluentd" FluentdStatus = "ReconcileFluentdStatus" FluentdConfigMapDirectory = "fluentd.configmap/conf.d" FluentdDaemonSet = path.Join(BasePath, "daemon-set.yaml") FluentdServiceTemplate = path.Join(BasePath, "service.yaml") FluentdLabels = map[string]string{"component": "logging-fluentd"} FluentbitComponentName = "logging-fluentbit" FluentbitStatus = "ReconcileFluentbitStatus" FluentbitDaemonSet = path.Join(BasePath, "daemon-set.yaml") FluentbitService = path.Join(BasePath, "service.yaml") FluentbitLabels = map[string]string{"component": "logging-fluentbit"} ForwarderFluentbitComponentName = "logging-fluentbit-forwarder" HAFluentStatus = "ReconcileHAFluentStatus" ForwarderFluentbitDaemonSet = path.Join(BasePath, "flb-forwarder-daemon-set.yaml") ForwarderFluentbitService = path.Join(BasePath, "flb-forwarder-service.yaml") ForwarderFluentbitLabels = map[string]string{"component": "logging-fluentbit-forwarder"} AggregatorFluentbitComponentName = "logging-fluentbit-aggregator" AggregatorFluentbitStatefulSet = path.Join(BasePath, "flb-aggregator-stateful-set.yaml") AggregatorFluentbitService = path.Join(BasePath, "flb-aggregator-service.yaml") AggregatorFluentbitConfigMap = path.Join(BasePath, "flb-aggregator-configmap.yaml") AggregatorFluentbitLabels = map[string]string{"component": "logging-fluentbit-aggregator"} ForwarderFluentbitConfigMapDirectory = "forwarder.configmap/conf.d" AggregatorFluentbitConfigMapDirectory = "aggregator.configmap/conf.d" FluentbitConfigMapDirectory = "fluentbit.configmap/conf.d" EventsReaderComponentName = "events-reader" EventsReaderStatus = "ReconcileEventsReaderStatus" EventsReaderDeployment = path.Join(BasePath, "deployment.yaml") EventsReaderService = path.Join(BasePath, "service.yaml") MonitoringAgentComponentName = "monitoring-agent-logging-plugin" MonitoringAgentStatus = "ReconcileMonitoringAgentLoggingPluginStatus" MonitoringAgentSecret = path.Join(BasePath, "secret.yaml") MonitoringAgentDeployment = path.Join(BasePath, "deployment.yaml") MonitoringAgentService = path.Join(BasePath, "service.yaml") GraylogComponentName = "graylog-service" GraylogServiceAccountName = "logging-graylog" GraylogDeploymentName = "graylog" GraylogStatefulsetName = "graylog" GraylogClaimName = "graylog-claim" MongoClaimName = "mongo-claim" GraylogStatus = "ReconcileGraylogStatus" GraylogConfig = "config/" GraylogServiceAccount = path.Join(BasePath, "service-account.yaml") GraylogStatefulset = path.Join(BasePath, "statefulset.yaml") GraylogService = path.Join(BasePath, "service.yaml") GraylogConfigMapDirectory = path.Join(GraylogConfig, "configmap") GraylogGrokPatterns = path.Join(GraylogConfig, "grok_patterns.json") GraylogDefaultStream = "Default Stream" GraylogAllMessagesStream = "All messages" GraylogAuditIndexSet = "Audit index set" GraylogAuditStream = "Audit logs" GraylogSystemIndexSet = "Default index set" GraylogSystemStream = "System logs" GraylogAccessIndexSet = "Access index set" GraylogAccessStream = "Access logs" GraylogIntegrationIndexSet = "Integration index set" GraylogIntegrationStream = "Integration logs" GraylogBillCycleIndexSet = "Bill Cycle index set" GraylogBillCycleStream = "Bill Cycle logs" GraylogNginxIndexSet = "Ingress-nginx index set" GraylogNginxStream = "Nginx logs" GraylogDefaultIndexSet = "Default index set" GraylogKubernetesEventsStream = "Kubernetes events" GraylogKubernetesEventsIndexSet = "Kubernetes events index set" GraylogStreamsIndexTitles = map[string]string{ GraylogAuditStream: GraylogAuditIndexSet, GraylogSystemStream: GraylogSystemIndexSet, GraylogAccessStream: GraylogAccessIndexSet, GraylogIntegrationStream: GraylogIntegrationIndexSet, GraylogBillCycleStream: GraylogBillCycleIndexSet, GraylogNginxStream: GraylogNginxIndexSet, GraylogKubernetesEventsStream: GraylogKubernetesEventsIndexSet, } GraylogIndexConfigs = map[string]string{ GraylogAuditIndexSet: path.Join(GraylogConfig, "indexes/audit_index.json"), GraylogSystemIndexSet: path.Join(GraylogConfig, "indexes/default_index.json"), GraylogAccessIndexSet: path.Join(GraylogConfig, "indexes/access_index.json"), GraylogIntegrationIndexSet: path.Join(GraylogConfig, "indexes/integration_index.json"), GraylogBillCycleIndexSet: path.Join(GraylogConfig, "indexes/bill_cycle_index.json"), GraylogNginxIndexSet: path.Join(GraylogConfig, "indexes/nginx_index.json"), GraylogDefaultIndexSet: path.Join(GraylogConfig, "indexes/default_index.json"), GraylogKubernetesEventsIndexSet: path.Join(GraylogConfig, "indexes/k8s_event_index.json"), } GraylogStreamsDescriptions = map[string]string{ GraylogAuditStream: "Audit log messages from OC nodes sent through fluent bit", GraylogSystemStream: "System log messages from OC nodes sent through fluent bit", GraylogAccessStream: "Access log messages from OC nodes sent through fluent bit", GraylogIntegrationStream: "Integration log messages from OC nodes sent through fluent bit", GraylogBillCycleStream: "Bill Cycle log messages from OC nodes sent through fluent bit", GraylogNginxStream: "Nginx log messages from OC nodes sent through fluent bit", GraylogKubernetesEventsStream: "Kubernetes events as logs sent through fluent bit", } GraylogInput = path.Join(GraylogConfig, "input.json") GraylogMessageProcessors = path.Join(GraylogConfig, "messageprocessors.json") GraylogAuthHeader = path.Join(GraylogConfig, "auth_header.json") GraylogArchivesDirectory = path.Join(GraylogConfig, "archives.json") GraylogReplaceTimestampExtractorName = "replace_timestamp" GraylogKubernetesExtractorName = "kuber_extractor" GraylogKubernetesLabelsExtractorName = "kuber_labels_extractor" GraylogDockerExtractorName = "docker_extractor" GraylogMicroserviceFrameworkExtractorName = "Microservice Framework Backend" GraylogReplaceTimestampExtractorAsset = "replace_timestamp_extractor.json" GraylogKubernetesExtractorAsset = "kubernetes_extractor.json" GraylogKubernetesLabelsExtractorAsset = "kubernetes_labels_extractor.json" GraylogDockerExtractorAsset = "docker_extractor.json" GraylogMicroserviceFrameworkExtractorAsset = "microservice_framework_extractor.json" Graylog4ExtractorsBasePath = path.Join(GraylogConfig, "extractors/graylog_4/") Graylog5ExtractorsBasePath = path.Join(GraylogConfig, "extractors/graylog_5/") Graylog4Extractors = map[string]string{ GraylogReplaceTimestampExtractorName: path.Join(Graylog4ExtractorsBasePath, GraylogReplaceTimestampExtractorAsset), GraylogKubernetesExtractorName: path.Join(Graylog4ExtractorsBasePath, GraylogKubernetesExtractorAsset), GraylogKubernetesLabelsExtractorName: path.Join(Graylog4ExtractorsBasePath, GraylogKubernetesLabelsExtractorAsset), GraylogDockerExtractorName: path.Join(Graylog4ExtractorsBasePath, GraylogDockerExtractorAsset), GraylogMicroserviceFrameworkExtractorName: path.Join(Graylog4ExtractorsBasePath, GraylogMicroserviceFrameworkExtractorAsset), } Graylog5Extractors = map[string]string{ GraylogReplaceTimestampExtractorName: path.Join(Graylog5ExtractorsBasePath, GraylogReplaceTimestampExtractorAsset), GraylogKubernetesExtractorName: path.Join(Graylog5ExtractorsBasePath, GraylogKubernetesExtractorAsset), GraylogKubernetesLabelsExtractorName: path.Join(Graylog5ExtractorsBasePath, GraylogKubernetesLabelsExtractorAsset), GraylogDockerExtractorName: path.Join(Graylog5ExtractorsBasePath, GraylogDockerExtractorAsset), GraylogMicroserviceFrameworkExtractorName: path.Join(Graylog5ExtractorsBasePath, GraylogMicroserviceFrameworkExtractorAsset), } GraylogAuditProcessingRule = "Route Audit logs" GraylogSystemLogsProcessingRule = "Route System logs" GraylogRemoveKubernetesRule = "Remove kubernetes field" GraylogRemoveKubernetesLabelsRule = "Remove kubernetes_labels field" GraylogUnsupportedSymbolsRule = "Processing unsupported symbols" GraylogKubernetesEventsRule = "Route Kubernetes events" GraylogRemoveKubernetesRuleStream = GraylogDefaultStream GraylogRemoveKubernetesLabelsRuleStream = GraylogDefaultStream GraylogUnsupportedSymbolsRuleStream = GraylogDefaultStream GraylogAccessProcessingRule = "Route Access logs" GraylogIntegrationProcessingRule = "Route Integration logs" GraylogBillCycleProcessingRule = "Route Bill Cycle logs" GraylogNginxProcessingRule = "Route Nginx logs" GraylogStreamsRules = map[string]string{ GraylogAuditStream: GraylogAuditProcessingRule, GraylogSystemStream: GraylogSystemLogsProcessingRule, GraylogAccessStream: GraylogAccessProcessingRule, GraylogIntegrationStream: GraylogIntegrationProcessingRule, GraylogBillCycleStream: GraylogBillCycleProcessingRule, GraylogNginxStream: GraylogNginxProcessingRule, GraylogRemoveKubernetesRuleStream: GraylogRemoveKubernetesRule, GraylogRemoveKubernetesLabelsRuleStream: GraylogRemoveKubernetesLabelsRule, GraylogUnsupportedSymbolsRuleStream: GraylogUnsupportedSymbolsRule, GraylogKubernetesEventsStream: GraylogKubernetesEventsRule, } GraylogRuleConfigs = map[string]string{ GraylogAuditProcessingRule: path.Join(GraylogConfig, "processing_rules/audit_logs.rule"), GraylogSystemLogsProcessingRule: path.Join(GraylogConfig, "processing_rules/system_logs.rule"), GraylogAccessProcessingRule: path.Join(GraylogConfig, "processing_rules/access_logs.rule"), GraylogIntegrationProcessingRule: path.Join(GraylogConfig, "processing_rules/int_logs.rule"), GraylogBillCycleProcessingRule: path.Join(GraylogConfig, "processing_rules/bill_cycle_logs.rule"), GraylogNginxProcessingRule: path.Join(GraylogConfig, "processing_rules/nginx_logs.rule"), GraylogRemoveKubernetesRule: path.Join(GraylogConfig, "processing_rules/remove_kubernetes.rule"), GraylogRemoveKubernetesLabelsRule: path.Join(GraylogConfig, "processing_rules/remove_kubernetes_labels.rule"), GraylogUnsupportedSymbolsRule: path.Join(GraylogConfig, "processing_rules/unsupported_symbols.rule"), GraylogKubernetesEventsRule: path.Join(GraylogConfig, "processing_rules/k8s_event_logs.rule"), } GraylogRuleDescriptions = map[string]string{ GraylogAuditProcessingRule: "Route Audit logs to the appropriate stream", GraylogSystemLogsProcessingRule: "Route System logs to the appropriate stream", GraylogAccessProcessingRule: "Route Access logs to the appropriate stream", GraylogIntegrationProcessingRule: "Route Integration logs to the appropriate stream", GraylogBillCycleProcessingRule: "Route Bill Cycle logs to the appropriate stream", GraylogNginxProcessingRule: "Route Nginx logs to the appropriate stream", GraylogRemoveKubernetesRule: "Remove kubernetes field", GraylogRemoveKubernetesLabelsRule: "Remove kubernetes labels field", GraylogUnsupportedSymbolsRule: "Processing unsupported symbols (Replace '/' to '_')", GraylogKubernetesEventsRule: "Route Kubernetes events to the appropriate stream", } GraylogDashboard = path.Join(GraylogConfig, "dashboard.json") GraylogDashboardInstallation = path.Join(GraylogConfig, "dashboardInstallation.json") GraylogPipeline = path.Join(GraylogConfig, "pipeline.json") GraylogCloudEventsSearch = path.Join(GraylogConfig, "saved_searches/cloud-events-search.json") GraylogUserSessionHistorySearch = path.Join(GraylogConfig, "saved_searches/user-session-history-search.json") GraylogCloudEventsView = path.Join(GraylogConfig, "saved_searches/cloud-events-view.json") GraylogUserSessionHistoryView = path.Join(GraylogConfig, "saved_searches/user-session-history-view.json") GraylogOperatorRole = path.Join(GraylogConfig, "roles/operator.json") GraylogAuditViewerRole = path.Join(GraylogConfig, "roles/auditViewer.json") GraylogOperatorUser = path.Join(GraylogConfig, "user_accounts/operator.json") GraylogAuditViewerUser = path.Join(GraylogConfig, "user_accounts/auditViewer.json") GraylogAdminWithTrustedHeader = path.Join(GraylogConfig, "user_accounts/admin_with_trusted_header.json") GraylogStartupTimeout = time.Minute * 10 GraylogMongoUpgradeJobTimeout = time.Minute * 2 GraylogLabels = map[string]string{"name": "graylog"} GraylogSecretSelector = "graylog=secret" GraylogConfigFileName = "graylog.conf" GraylogPasswordField = "root_password_sha2" GraylogUserField = "root_username" GraylogMongoUpgradeOrderedJobs = []string{ "mongo-upgrade-job-40", "mongo-upgrade-job-42", "mongo-upgrade-job-44", "mongo-upgrade-job-50", } GraylogMongoUpgradeAssets = map[string]string{ "mongo-upgrade-job-40": path.Join(BasePath, "mongo-upgrade-job-40.yaml"), "mongo-upgrade-job-42": path.Join(BasePath, "mongo-upgrade-job-42.yaml"), "mongo-upgrade-job-44": path.Join(BasePath, "mongo-upgrade-job-44.yaml"), "mongo-upgrade-job-50": path.Join(BasePath, "mongo-upgrade-job-50.yaml"), } GraylogMongoUpgradeLabels = map[string]string{"name": "mongo-upgrade-job"} ComponentPendingStatus = "ComponentPendingStatus" ComponentPendingTimeout = time.Minute * 5 FluentbitAggregatorPendingTimeout = time.Minute * 8 ConnectionTimeout = 10 InitialDelay = time.Second * 5 )
View Source
var (
ResourceKey = "res"
)
Functions ¶
func CreatePodMonitors ¶
func CreatePodMonitors(config *rest.Config, ns string, services []*v1.Service, sInterval string, sTimeout string) error
CreatePodMonitors creates PodMonitors objects based on an array of Pod objects. If CR PodMonitor is not registered in the Cluster it will not attempt at creating resources.
func DataFromDirectory ¶
func DownloadFile ¶
func DownloadFileTLS ¶
func DownloadFileTLS(ctx context.Context, contentPackPath *v11.ContentPackPathHTTPConfig, fileName string, clientSet kubernetes.Interface, namespace string) error
func GeneratePodMonitor ¶
GeneratePodMonitor generates a prometheus-operator PodMonitor object based on the passed Service object.
func GetAggregatorIds ¶
func GetFromResourceMap ¶
func GetFromResourceMap(resourceList core.ResourceList, key string) string
func GetInstanceLabel ¶
func GetLogLevel ¶
func GetTagFromImage ¶
func GetTimeNow ¶
func GetTimeNow() string
func IsStatusEqual ¶
func IsStatusEqual(source loggingService.LoggingServiceCondition, target *loggingService.LoggingServiceCondition) bool
func MustAssetReader ¶
MustAssetReader loads and return the asset for the given name as bytes reader. Panics when the asset loading would return an error.
func ParseTemplate ¶
func ResourceExists ¶
func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)
ResourceExists returns true if the given resource kind exists in the given api groupversion
Types ¶
type ComponentReconciler ¶
type ComponentReconciler struct { Client client.Client Scheme *runtime.Scheme Log logr.Logger StatusUpdater StatusUpdater }
func (*ComponentReconciler) CreateResource ¶
func (r *ComponentReconciler) CreateResource(cr *loggingService.LoggingService, o K8sResource, setRefOptional ...bool) error
func (*ComponentReconciler) DeleteResource ¶
func (r *ComponentReconciler) DeleteResource(o K8sResource) error
func (*ComponentReconciler) GetResource ¶
func (r *ComponentReconciler) GetResource(o K8sResource) error
GetResource tries to get resource inside namespace or on cluster level.
func (*ComponentReconciler) UpdateResource ¶
func (r *ComponentReconciler) UpdateResource(o K8sResource) error
type ComponentsPendingReconciler ¶
type ComponentsPendingReconciler struct { *ComponentReconciler ComponentList *[]Component }
func NewComponentsPendingReconciler ¶
func NewComponentsPendingReconciler(client client.Client, scheme *runtime.Scheme, updater StatusUpdater, pendingComponents *[]Component) ComponentsPendingReconciler
func (*ComponentsPendingReconciler) Run ¶
func (r *ComponentsPendingReconciler) Run(cr *loggingService.LoggingService) (bool, error)
func (*ComponentsPendingReconciler) ToComponentNameList ¶
func (r *ComponentsPendingReconciler) ToComponentNameList(componentList *[]Component) []string
type DynamicParameters ¶
type DynamicParameters struct {
ContainerRuntimeType string
}
type K8sResource ¶
K8sResource abstract k8s resource which can be reconciled
type PodManager ¶
type PodManager struct {
// contains filtered or unexported fields
}
func NewPodManager ¶
func (*PodManager) DeletePods ¶
func (manager *PodManager) DeletePods(labelSelectors map[string]string) (bool, error)
func (*PodManager) IsDaemonSetAvailable ¶
func (manager *PodManager) IsDaemonSetAvailable(serviceName string) (bool, error)
func (*PodManager) IsDaemonSetExists ¶
func (manager *PodManager) IsDaemonSetExists(serviceName string) (bool, error)
func (*PodManager) IsDeploymentExists ¶
func (manager *PodManager) IsDeploymentExists(serviceName string) (bool, error)
func (*PodManager) IsDeploymentReplicasSynchronised ¶
func (manager *PodManager) IsDeploymentReplicasSynchronised(serviceName string) (bool, error)
func (*PodManager) IsJobSucceeded ¶
func (manager *PodManager) IsJobSucceeded(jobName string) (bool, error)
func (*PodManager) IsStatefulsetReplicasSynchronised ¶
func (manager *PodManager) IsStatefulsetReplicasSynchronised(serviceName string) (bool, error)
func (*PodManager) ToPodNameList ¶
func (manager *PodManager) ToPodNameList(podList *core.PodList) []string
func (*PodManager) WaitForJobSucceeded ¶
func (*PodManager) WaitForStatefulsetUpdated ¶
func (*PodManager) WaitForTerminatingPods ¶
type RestClient ¶
func (*RestClient) SetAuthHeader ¶
func (restClient *RestClient) SetAuthHeader(request *http.Request)
type SkipStatusUpdatePredicate ¶
type SkipStatusUpdatePredicate struct {
// contains filtered or unexported fields
}
func NewPredicate ¶
func NewPredicate(logger logr.Logger) SkipStatusUpdatePredicate
func (*SkipStatusUpdatePredicate) Create ¶
func (predicate *SkipStatusUpdatePredicate) Create(event event.CreateEvent) bool
func (*SkipStatusUpdatePredicate) Delete ¶
func (predicate *SkipStatusUpdatePredicate) Delete(event event.DeleteEvent) bool
func (*SkipStatusUpdatePredicate) Generic ¶
func (predicate *SkipStatusUpdatePredicate) Generic(event event.GenericEvent) bool
func (*SkipStatusUpdatePredicate) IsStatusUpdated ¶
func (*SkipStatusUpdatePredicate) Update ¶
func (predicate *SkipStatusUpdatePredicate) Update(event event.UpdateEvent) bool
type StatusUpdater ¶
type StatusUpdater struct {
// contains filtered or unexported fields
}
func NewStatusUpdater ¶
func NewStatusUpdater(client client.Client, resource *loggingService.LoggingService) StatusUpdater
func (*StatusUpdater) GetCondition ¶
func (updater *StatusUpdater) GetCondition(newConditionReason string) (int, *loggingService.LoggingServiceCondition)
func (*StatusUpdater) IsStatusFailed ¶
func (updater *StatusUpdater) IsStatusFailed(conditionReason string) bool
func (*StatusUpdater) RemoveStatus ¶
func (updater *StatusUpdater) RemoveStatus(reason string) bool
func (*StatusUpdater) RemoveTemporaryStatuses ¶
func (updater *StatusUpdater) RemoveTemporaryStatuses()
func (*StatusUpdater) UpdateStatus ¶
func (updater *StatusUpdater) UpdateStatus(reason string, statusType string, status bool, message string)
Click to show internal directories.
Click to hide internal directories.