http

package
v1.0.1-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateObjectPatch

func CreateObjectPatch(source, target interface{}) ([]byte, error)

CreateObjectPatch is creating a JSON patch from two objects

func CreatePatchReviewResponse

func CreatePatchReviewResponse(request *admissionv1.AdmissionRequest, patch []byte) *admissionv1.AdmissionReview

CreatePatchReviewResponse builds an admission review with given json patch

func CreateReviewResponse

func CreateReviewResponse(request *admissionv1.AdmissionRequest, allowed bool, httpCode int32, reason string) *admissionv1.AdmissionReview

CreateReviewResponse is creating Admission Review responses without mutating the input object - this method is used only for validation requests

func ParseAdmissionRequest

func ParseAdmissionRequest(r *http.Request) (*admissionv1.AdmissionReview, error)

ParseAdmissionRequest extracts an AdmissionReview from an http.Request if possible

Types

type EndpointServingService

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

func NewEndpointServingService

func NewEndpointServingService(image string, r versioned.Interface, k kubernetes.Interface, cache *cache.Cache) *EndpointServingService

func (*EndpointServingService) ServeHealth

ServeHealth returns 200 when things are good

func (*EndpointServingService) ServeInformer

func (c *EndpointServingService) ServeInformer(w http2.ResponseWriter, r *http2.Request)

ServeInformer acts as an endpoint to inform Volume Syncing Operator about new CRDs (PodFilesystemSync) and as validation endpoint

Invalid PodFilesystemSync requests should be blocked before stored by API server

func (*EndpointServingService) ServeMutatePods

func (c *EndpointServingService) ServeMutatePods(w http2.ResponseWriter, r *http2.Request)

ServeMutatePods is mutating Pods by attaching containers to them depending on the configuration stored in PodFilesystemSync

A Pod could be rejected if its annotation-based configuration is invalid, or the Pod has label that Volume Syncing Operator should be used
but no any definition was matched

Jump to

Keyboard shortcuts

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