Documentation ¶
Index ¶
- Constants
- Variables
- func CRDsExist(apiresource string) bool
- func CreateNamespace(name string, labels ...string) error
- func Dashboards(testName string) error
- func DeleteNamespaces(selector string, testNames ...string) error
- func ErrContainerNotReady(out []byte) bool
- func ErrNotFound(out []byte) bool
- func ForceDelete(testName string) error
- func GetChaosResources(testName string) error
- func GetFrisbeeResources(testName string, watch bool) error
- func GetK8sEvents(testName string) error
- func GetK8sResources(testName string) error
- func GetPodLogs(testName string, tail bool, lines int, pods ...string) error
- func GetTemplateResources(testName string) error
- func Helm(testName string, arguments ...string) ([]byte, error)
- func HelmIgnoreNotFound(err error) error
- func InstallFrisbeeOnK8s(command []string, options *FrisbeeInstallOptions)
- func Kubectl(testName string, arguments ...string) ([]byte, error)
- func LabelNamespace(name string, labels ...string) error
- func ListHelm(testName string) error
- func LoggedHelm(testName string, arguments ...string) ([]byte, error)
- func LoggedKubectl(testName string, arguments ...string) ([]byte, error)
- func OpenShell(testName string, podName string, shellArgs ...string) error
- func PopulateInstallFlags(cmd *cobra.Command, options *FrisbeeInstallOptions)
- func RenderGoTemplate(item interface{}, w io.Writer, tpl string) error
- func RenderGoTemplateList(list []interface{}, w io.Writer, tpl string) error
- func RenderJSON(obj interface{}, w io.Writer) error
- func RenderList(obj interface{}, w io.Writer) error
- func RenderPrettyList(obj ui.TableData, w io.Writer) error
- func RenderYaml(obj interface{}, w io.Writer) error
- func RunTest(testName string, testFile string, mode ValidationMode) error
- func WaitForCondition(testName string, condition v1alpha1.ConditionType, timeout string) error
- type CliObjRenderer
- type FrisbeeInstallOptions
- type OutputType
- type ValidationMode
Constants ¶
View Source
const ( NotReadyRegex = `.* container "(\w+)" in pod "(.*)" is waiting to start: (\w+)` NoPodsFoundReg = `.* pods "\w+" not found` NotResourcesFoundReg = `No resources found*` NotFound = `Error from server (NotFound)` )
View Source
const ( Scenarios = "scenarios.frisbee.dev" Clusters = "clusters.frisbee.dev" Services = "services.frisbee.dev" Chaos = "chaos.frisbee.dev" Cascades = "cascades.frisbee.dev" Calls = "calls.frisbee.dev" VirtualObjects = "virtualobjects.frisbee.dev" Templates = "templates.frisbee.dev" )
View Source
const ( NetworkChaos = "networkchaos.chaos-mesh.org" PodChaos = "podchaos.chaos-mesh.org" IOChaos = "iochaos.chaos-mesh.org" KernelChaos = "kernelchaos.chaos-mesh.org" TimeChaos = "timechaos.chaos-mesh.org" )
View Source
const ( K8PODs = "pods" K8PVCs = "persistentvolumeclaims" K8PVs = "persistentvolumes" K8SStorageClasses = "storageclasses.storage.k8s.io" )
View Source
const ( FilterSYS = string(v1alpha1.LabelComponent + "=" + v1alpha1.ComponentSys) FilterSUT = string(v1alpha1.LabelComponent + "=" + v1alpha1.ComponentSUT) )
View Source
const EmptyChaosResourceInspectionFields = "Kind Job InjectionTime Phase Target"
View Source
const EmptyK8SResourceInspectionFields = "API Kind Name Action Component Phase* Reason* Message*"
View Source
const EmptyResourceInspectionFields = "Name Kind Job Component Phase Reason Message"
View Source
const EmptyTemplateResources = "API Kind Name HelmRelease"
View Source
const (
FrisbeeRepo = "https://carv-ics-forth.github.io/frisbee/charts"
)
View Source
const (
JetstackRepo = "https://charts.jetstack.io"
)
View Source
const (
ManagedNamespace = "app.kubernetes.io/managed-by=Frisbee"
)
Variables ¶
View Source
var ChaosResourceInspectionFields = strings.Join([]string{
"custom-columns=Kind:.kind",
"Job:.metadata.name",
"InjectionTime:.metadata.creationTimestamp",
"Phase:.status.experiment.desiredPhase",
"Target:.status.experiment.containerRecords[*].id",
}, ",")
View Source
var FrisbeeResourceInspectionFields = strings.Join([]string{
"custom-columns=Name:.metadata.namespace",
"Kind:.kind",
"Job:.metadata.name",
"Component:.metadata.labels.scenario\\.frisbee\\.dev\\/component",
"Phase:.status.phase",
"Reason:.status.reason",
"Message:.status.message",
}, ",")
View Source
var K8SRemoveFinalizer = []string{
"--patch=\\'[", "{",
"op:", "remove,",
"path:", "/metadata/finalizers",
"}", "]\\'",
}
View Source
var K8SResourceInspectionFields = strings.Join([]string{
"custom-columns=API:.apiVersion",
"Kind:.kind",
"Name:.metadata.name",
"Action:.metadata.labels.scenario\\.frisbee\\.dev\\/action",
"Component:.metadata.labels.scenario\\.frisbee\\.dev\\/component",
"Phase*:.status.phase",
"Reason*:.status.reason",
"Message*:.status.message",
}, ",")
View Source
var TemplateInspectionFields = strings.Join([]string{
"custom-columns=API:.apiVersion",
"Kind:.kind",
"Name:.metadata.name",
"HelmRelease:.metadata.annotations.meta\\.helm\\.sh\\/release-name",
}, ",")
Functions ¶
func CreateNamespace ¶
func Dashboards ¶
func DeleteNamespaces ¶
func ErrContainerNotReady ¶ added in v1.0.26
func ErrNotFound ¶ added in v1.0.26
func ForceDelete ¶
ForceDelete iterates the Frisbee CRDs and remove its finalizers.
func GetChaosResources ¶
func GetFrisbeeResources ¶
func GetK8sEvents ¶ added in v1.0.28
func GetK8sResources ¶
func GetPodLogs ¶
GetPodLogs provides convenience on printing the logs from prods. // Filter query: // - Run with '--all' // - Run with '--logs all pod1 ...' // - Run with '--logs all' // - Run with '--logs SYS' // - Run with '--logs SUT' // - Run with '--logs pod1 pod2 ...'
func GetTemplateResources ¶
func HelmIgnoreNotFound ¶ added in v1.0.28
func InstallFrisbeeOnK8s ¶ added in v1.0.28
func InstallFrisbeeOnK8s(command []string, options *FrisbeeInstallOptions)
func LabelNamespace ¶ added in v1.0.25
func LoggedHelm ¶ added in v1.0.28
func LoggedKubectl ¶ added in v1.0.28
func PopulateInstallFlags ¶ added in v1.0.28
func PopulateInstallFlags(cmd *cobra.Command, options *FrisbeeInstallOptions)
func RenderGoTemplateList ¶
func RenderJSON ¶
func RenderList ¶
func RenderYaml ¶
func WaitForCondition ¶ added in v1.0.27
func WaitForCondition(testName string, condition v1alpha1.ConditionType, timeout string) error
Types ¶
type CliObjRenderer ¶
type FrisbeeInstallOptions ¶ added in v1.0.28
type OutputType ¶
type OutputType string
const ( OutputGoTemplate OutputType = "go" OutputJSON OutputType = "json" OutputYAML OutputType = "yaml" OutputPretty OutputType = "pretty" )
type ValidationMode ¶ added in v1.0.30
type ValidationMode uint8
const ( ValidationNone ValidationMode = iota ValidationClient ValidationServer )
Click to show internal directories.
Click to hide internal directories.