Documentation ¶
Index ¶
- func CreateObjectPatch(source, target interface{}) ([]byte, error)
- func CreatePatchReviewResponse(request *admissionv1.AdmissionRequest, patch []byte) *admissionv1.AdmissionReview
- func CreateReviewResponse(request *admissionv1.AdmissionRequest, allowed bool, httpCode int32, ...) *admissionv1.AdmissionReview
- func ParseAdmissionRequest(r *http.Request) (*admissionv1.AdmissionReview, error)
- type EndpointServingService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateObjectPatch ¶
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 ¶
func (c *EndpointServingService) ServeHealth(w http2.ResponseWriter, r *http2.Request)
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