functional

package
Version: v0.0.0-...-07cf381 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenshiftAuditLog  = "openshift-audit-logs"
	ApplicationLogFile = "/tmp/app-logs"
	FunctionalNodeName = "functional-test-node"
)
View Source
const (
	ElasticSearchTag   = "7.10.1"
	ElasticSearchImage = "elasticsearch:" + ElasticSearchTag
)
View Source
const ImageRemoteSyslog = "quay.io/openshift/origin-logging-rsyslog:latest"
View Source
const IncreaseRsyslogMaxMessageSize = "$MaxMessageSize 50000"

Variables

View Source
var (

	//Timestamp = 2021-07-06T08:26:58.687Z
	OVNLogTemplate            = "%s|00004|acl_log(ovn_pinctrl0)|INFO|name=verify-audit-logging_deny-all, verdict=drop"
	KubeAuditLogTemplate      = `` /* 1457-byte string literal not displayed */
	OpenShiftAuditLogTemplate = `` /* 535-byte string literal not displayed */
)
View Source
var ElasticIndex = map[string]string{
	// contains filtered or unexported fields
}
View Source
var (
	TemplateForAnyPipelineMetadata = types.PipelineMetadata{
		Collector: types.Collector{
			Ipaddr4:    "*",
			Inputname:  "*",
			Name:       "*",
			Version:    "*",
			ReceivedAt: time.Time{},
		},
	}
)

Functions

func CRIOTime

func CRIOTime(t time.Time) string

CRIOTime returns the CRIO string format of time t.

func CreateAppLogFromJson

func CreateAppLogFromJson(jsonstr string) string

func NewApplicationLogTemplate

func NewApplicationLogTemplate() types.ApplicationLog

func NewAuditHostLog

func NewAuditHostLog(eventTime time.Time) string

func NewCRIOLogMessage

func NewCRIOLogMessage(timestamp, message string, partial bool) string

func NewFullCRIOLogMessage

func NewFullCRIOLogMessage(timestamp, message string) string

func NewKubeAuditLog

func NewKubeAuditLog(eventTime time.Time) string

func NewOVNAuditLog

func NewOVNAuditLog(eventTime time.Time) string

func NewPartialCRIOLogMessage

func NewPartialCRIOLogMessage(timestamp, message string) string

Types

type ClusterLogForwarderBuilder

type ClusterLogForwarderBuilder struct {
	Forwarder *logging.ClusterLogForwarder
}

func (*ClusterLogForwarderBuilder) FromInput

func (b *ClusterLogForwarderBuilder) FromInput(inputName string) *PipelineBuilder

type FluentdFunctionalFramework

type FluentdFunctionalFramework struct {
	Name      string
	Namespace string
	Conf      string

	Forwarder *logging.ClusterLogForwarder
	Test      *client.Test
	Pod       *corev1.Pod
	// contains filtered or unexported fields
}

FluentdFunctionalFramework deploys stand alone fluentd with the fluent.conf as generated by input ClusterLogForwarder CR

func NewFluentdFunctionalFramework

func NewFluentdFunctionalFramework() *FluentdFunctionalFramework

func NewFluentdFunctionalFrameworkForTest

func NewFluentdFunctionalFrameworkForTest(t *testing.T) *FluentdFunctionalFramework

func NewFluentdFunctionalFrameworkUsing

func NewFluentdFunctionalFrameworkUsing(t *client.Test, fnClose func(), verbosity int) *FluentdFunctionalFramework

func (*FluentdFunctionalFramework) AddBenchmarkForwardOutput

func (f *FluentdFunctionalFramework) AddBenchmarkForwardOutput(b *runtime.PodBuilder, output logging.OutputSpec) error

func (*FluentdFunctionalFramework) AddForwardOutput

func (f *FluentdFunctionalFramework) AddForwardOutput(b *runtime.PodBuilder, output logging.OutputSpec) error

func (*FluentdFunctionalFramework) AddOutputContainersVisitors

func (f *FluentdFunctionalFramework) AddOutputContainersVisitors() []runtime.PodBuilderVisitor

func (*FluentdFunctionalFramework) Cleanup

func (f *FluentdFunctionalFramework) Cleanup()

func (*FluentdFunctionalFramework) Deploy

func (f *FluentdFunctionalFramework) Deploy() (err error)

Deploy the objects needed to functional Test

func (*FluentdFunctionalFramework) DeployWithVisitor

func (f *FluentdFunctionalFramework) DeployWithVisitor(visitor runtime.PodBuilderVisitor) (err error)

func (*FluentdFunctionalFramework) DeployWithVisitors

func (f *FluentdFunctionalFramework) DeployWithVisitors(visitors []runtime.PodBuilderVisitor) (err error)

Deploy the objects needed to functional Test

func (*FluentdFunctionalFramework) GetLogsFromElasticSearch

func (f *FluentdFunctionalFramework) GetLogsFromElasticSearch(outputName string, outputLogType string) (result string, err error)

func (*FluentdFunctionalFramework) GetLogsFromElasticSearchIndex

func (f *FluentdFunctionalFramework) GetLogsFromElasticSearchIndex(outputName string, index string) (result string, err error)

func (*FluentdFunctionalFramework) ReadApplicationLogsFrom

func (f *FluentdFunctionalFramework) ReadApplicationLogsFrom(outputName string) ([]string, error)

func (*FluentdFunctionalFramework) ReadAuditLogsFrom

func (f *FluentdFunctionalFramework) ReadAuditLogsFrom(outputName string) ([]string, error)

func (*FluentdFunctionalFramework) ReadLogsFrom

func (f *FluentdFunctionalFramework) ReadLogsFrom(outputName string, outputLogType string) (results []string, err error)

func (*FluentdFunctionalFramework) ReadNApplicationLogsFrom

func (f *FluentdFunctionalFramework) ReadNApplicationLogsFrom(n uint64, outputName string) ([]string, error)

func (*FluentdFunctionalFramework) ReadOvnAuditLogsFrom

func (f *FluentdFunctionalFramework) ReadOvnAuditLogsFrom(outputName string) ([]string, error)

func (*FluentdFunctionalFramework) Readk8sAuditLogsFrom

func (f *FluentdFunctionalFramework) Readk8sAuditLogsFrom(outputName string) ([]string, error)

func (*FluentdFunctionalFramework) RunCommand

func (f *FluentdFunctionalFramework) RunCommand(container string, cmd ...string) (string, error)

func (*FluentdFunctionalFramework) WaitForPodToBeReady

func (f *FluentdFunctionalFramework) WaitForPodToBeReady() error

func (*FluentdFunctionalFramework) WriteAuditHostLog

func (f *FluentdFunctionalFramework) WriteAuditHostLog(numOfLogs int) error

func (*FluentdFunctionalFramework) WriteK8sAuditLog

func (f *FluentdFunctionalFramework) WriteK8sAuditLog(numOfLogs int) error

func (*FluentdFunctionalFramework) WriteMessagesToApplicationLog

func (f *FluentdFunctionalFramework) WriteMessagesToApplicationLog(msg string, numOfLogs int) error

func (*FluentdFunctionalFramework) WriteMessagesToAuditLog

func (f *FluentdFunctionalFramework) WriteMessagesToAuditLog(msg string, numOfLogs int) error

func (*FluentdFunctionalFramework) WriteMessagesToLog

func (f *FluentdFunctionalFramework) WriteMessagesToLog(msg string, numOfLogs int, filename string) error

func (*FluentdFunctionalFramework) WriteMessagesToOVNAuditLog

func (f *FluentdFunctionalFramework) WriteMessagesToOVNAuditLog(msg string, numOfLogs int) error

func (*FluentdFunctionalFramework) WriteMessagesToOpenshiftAuditLog

func (f *FluentdFunctionalFramework) WriteMessagesToOpenshiftAuditLog(msg string, numOfLogs int) error

func (*FluentdFunctionalFramework) WriteMessagesTok8sAuditLog

func (f *FluentdFunctionalFramework) WriteMessagesTok8sAuditLog(msg string, numOfLogs int) error

func (*FluentdFunctionalFramework) WriteOVNAuditLog

func (f *FluentdFunctionalFramework) WriteOVNAuditLog(numOfLogs int) error

func (*FluentdFunctionalFramework) WriteOpenshiftAuditLog

func (f *FluentdFunctionalFramework) WriteOpenshiftAuditLog(numOfLogs int) error

func (*FluentdFunctionalFramework) WritesApplicationLogs

func (f *FluentdFunctionalFramework) WritesApplicationLogs(numOfLogs uint64) error

func (*FluentdFunctionalFramework) WritesNApplicationLogsOfSize

func (f *FluentdFunctionalFramework) WritesNApplicationLogsOfSize(numOfLogs, size uint64) error

type OutputSpecVisiter

type OutputSpecVisiter func(spec *logging.OutputSpec)

type PipelineBuilder

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

func (*PipelineBuilder) ToCloudwatchOutput

func (p *PipelineBuilder) ToCloudwatchOutput() *ClusterLogForwarderBuilder

func (*PipelineBuilder) ToElasticSearchOutput

func (p *PipelineBuilder) ToElasticSearchOutput() *ClusterLogForwarderBuilder

func (*PipelineBuilder) ToFluentForwardOutput

func (p *PipelineBuilder) ToFluentForwardOutput() *ClusterLogForwarderBuilder

func (*PipelineBuilder) ToOutputWithVisitor

func (p *PipelineBuilder) ToOutputWithVisitor(visit OutputSpecVisiter, outputName string) *ClusterLogForwarderBuilder

func (*PipelineBuilder) ToSyslogOutput

func (p *PipelineBuilder) ToSyslogOutput() *ClusterLogForwarderBuilder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL