Back to / cni / pkg / repair

Package repair

v0.0.0 (cbb26e7)
Latest Go to latest
Published: 1 hour ago | License: Apache-2.0 | Module:


Package Files


const ValidationContainerName = "istio-validation"

type BrokenPodReconciler

type BrokenPodReconciler struct {
	Filters *Filters
	Options *Options
	// contains filtered or unexported fields

The pod reconciler struct. Contains state used to reconcile broken pods.

func NewBrokenPodReconciler

func NewBrokenPodReconciler(client client.Interface, filters *Filters, options *Options) BrokenPodReconciler

Constructs a new BrokenPodReconciler struct.

func (BrokenPodReconciler) DeleteBrokenPods

func (bpr BrokenPodReconciler) DeleteBrokenPods() error

Delete all pods detected as broken by ListPods

func (BrokenPodReconciler) LabelBrokenPods

func (bpr BrokenPodReconciler) LabelBrokenPods() (err error)

Label all pods detected as broken by ListPods with a customizable label

func (BrokenPodReconciler) ListBrokenPods

func (bpr BrokenPodReconciler) ListBrokenPods() (list v1.PodList, err error)

Lists all pods identified as broken by our Filter criteria

func (BrokenPodReconciler) ReconcilePod

func (bpr BrokenPodReconciler) ReconcilePod(pod v1.Pod) (err error)

type Controller

type Controller struct {
	// contains filtered or unexported fields

func NewRepairController

func NewRepairController(reconciler BrokenPodReconciler) (*Controller, error)

func (*Controller) Run

func (rc *Controller) Run(stopCh <-chan struct{})

type Filters

type Filters struct {
	NodeName                        string `json:"node_name"`
	SidecarAnnotation               string `json:"sidecar_annotation"`
	InitContainerName               string `json:"init_container_name"`
	InitContainerTerminationMessage string `json:"init_container_termination_message"`
	InitContainerExitCode           int    `json:"init_container_exit_code"`
	FieldSelectors                  string `json:"field_selectors"`
	LabelSelectors                  string `json:"label_selectors"`

type Options

type Options struct {
	PodLabelKey   string `json:"pod_label_key"`
	PodLabelValue string `json:"pod_label_value"`
	LabelPods     bool   `json:"label_pods"`
	DeletePods    bool   `json:"delete_broken_pods"`
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier