fluent_bit

package module
v0.0.0-...-6d46272 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 24 Imported by: 1

README

Goals

  • Provide the ability to test functionality of different software types.
  • Provide impodence on create/delete in case failures occur (Can re-run apply twice without getting multiple resources or errors)

Requirements

  1. Log file
    touch fluent-bit.log
    
  2. Kubectl Path
    which kubectl
    
  3. Kubeconfig Path
    • Usually this is ~/.kube/config

Usage instructions

  • namespace: This is the "testing" namespace items will be created in your cluster
Test
go run cmd/k8s-tester-fluent-bit/main.go apply \
    --namespace loggingsuite \
    --kubectl-path="/usr/local/bin/kubectl" \
    --kubeconfig-path="/Users/jonahjo/.kube/config" \
    --log-outputs="/Users/jonahjo/go/src/code.amazon.com/aws-k8s-tester/k8s-tester/fluent-bit/fluent-bit.log"
Delete
go run cmd/k8s-tester-fluent-bit/main.go delete \
    --namespace loggingsuite \
    --kubectl-path="/usr/local/bin/kubectl" \
    --kubeconfig-path="/Users/jonahjo/.kube/config" \
    --log-outputs="/Users/jonahjo/go/src/code.amazon.com/aws-k8s-tester/k8s-tester/fluent-bit/fluent-bit.log"

Documentation

Overview

Package logger_tests installs a simple "Hello World" application with a logger and tests the logger function.

Index

Constants

View Source
const DefaultMinimumNodes int = 1
View Source
const FluentBitConf = `` /* 208-byte string literal not displayed */
View Source
const InputConf = `
[INPUT]
	Name              tail
	Path              /var/log/suite/*
	Refresh_Interval  5

`
View Source
const OutputConf = `
[OUTPUT]
    Name stdout
    Match *
`
View Source
const ParsersConf = `` /* 489-byte string literal not displayed */

Variables

This section is empty.

Functions

func Env

func Env() string

func New

func New(cfg *Config) k8s_tester.Tester

Types

type Config

type Config struct {
	Enable bool `json:"enable"`
	Prompt bool `json:"-"`

	Stopc     chan struct{} `json:"-"`
	Logger    *zap.Logger   `json:"-"`
	LogWriter io.Writer     `json:"-"`
	Client    client.Client `json:"-"`

	// MinimumNodes is the minimum number of Kubernetes nodes required for installing this addon.
	MinimumNodes int `json:"minimum_nodes"`
	// Namespace to create test resources.
	Namespace string `json:"namespace"`
}

func NewDefault

func NewDefault() *Config

func (*Config) ValidateAndSetDefaults

func (cfg *Config) ValidateAndSetDefaults() error

Directories

Path Synopsis
cmd
k8s-tester-fluent-bit
k8s-tester-fluent-bit installs Kubernetes logger, and tests logger can read logs, and output in the correct order.
k8s-tester-fluent-bit installs Kubernetes logger, and tests logger can read logs, and output in the correct order.

Jump to

Keyboard shortcuts

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