admission

package
v0.0.0-...-9b0c9ef Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const PROFILE_ANNOTATION = "nodepolicy.softonic.io/profile"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionReviewer

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

func NewNodePolicyAdmissionReviewer

func NewNodePolicyAdmissionReviewer(fetcher FetcherInterface, patcher PatcherInterface) *AdmissionReviewer

func (*AdmissionReviewer) PerformAdmissionReview

func (r *AdmissionReviewer) PerformAdmissionReview(admissionReview *v1beta1.AdmissionReview)

PerformAdmissionReview : It generates the Adminission Review Response

type FetcherInterface

type FetcherInterface interface {
	Get(profileName string) (*v1alpha1.NodePolicyProfile, error)
}

func NewNodePolicyProfileFetcher

func NewNodePolicyProfileFetcher(client dynamic.Interface) FetcherInterface

type NodePolicyProfileFetcher

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

func (*NodePolicyProfileFetcher) Get

type PatchOperation

type PatchOperation struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value,omitempty"`
}

type Patcher

type Patcher struct{}

func (*Patcher) CreatePatch

func (p *Patcher) CreatePatch(pod *v1.Pod, nodePolicyProfile *v1alpha1.NodePolicyProfile) *[]PatchOperation

type PatcherInterface

type PatcherInterface interface {
	CreatePatch(pod *v1.Pod, nodePolicyProfile *v1alpha1.NodePolicyProfile) *[]PatchOperation
}

func NewPatcher

func NewPatcher() PatcherInterface

Jump to

Keyboard shortcuts

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