kubeaudit

package module
v0.0.0-...-5c159d4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: 0BSD Imports: 12 Imported by: 0

README

KRM Filter - KubeAudit

Audit kubernetes manifests

The function uses the kubeadit module to validate and fix local kubernetes manifests. It runs in either lint or fix mode.

Examples

The function config is a simple configmap-like object where each data key-value pair is one annotation.

apiVersion: bluebrown.github.io/v1alpha1
kind: KubeAudit
metadata:
  name: security
# https://github.com/Shopify/kubeaudit#configuration-file
spec:
  # by default all auditors are enabled
  enabledAuditors: {}
  # specific auditor configs
  auditors:
    limits:
      cpu: "750m"
      memory: "500m"

Run the function as standalone providing the function config and resources.

kubeaudit fn-config.yaml - < resources.yaml
kubeaudit-fix fn-config.yaml - < resources.yaml

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Processor

the audit func is used to run the processor in different modes. When passing in the validate func the processor acts as a validator. When passing in the transform func, the processor acts as a transformer fixing issues, if possible. After using the transformer, it is still recommend to use the validator since the transform cannot fix all possible errors

func Transform

func Transform(audit *kubeaudit.Kubeaudit, path string, item *yaml.RNode, log util.LogFunc) error

func Validate

func Validate(audit *kubeaudit.Kubeaudit, path string, item *yaml.RNode, log util.LogFunc) error

Types

type AuditFn

type AuditFn func(audit *kubeaudit.Kubeaudit, path string, item *yaml.RNode, log util.LogFunc) error

Directories

Path Synopsis
cmd
Code generated by "mdtogo"; DO NOT EDIT.
Code generated by "mdtogo"; DO NOT EDIT.

Jump to

Keyboard shortcuts

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