conversion

package
v0.2.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 11 Imported by: 31

Documentation

Overview

Package conversion provides implementation for CRD conversion webhook that implements handler for version conversion requests for types that are convertible.

See pkg/conversion for interface definitions required to ensure an API Type is convertible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

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

Decoder knows how to decode the contents of a CRD version conversion request into a concrete object. TODO(droot): consider reusing decoder from admission pkg for this.

func NewDecoder

func NewDecoder(scheme *runtime.Scheme) (*Decoder, error)

NewDecoder creates a Decoder given the runtime.Scheme

func (*Decoder) Decode

func (d *Decoder) Decode(content []byte) (runtime.Object, *schema.GroupVersionKind, error)

Decode decodes the inlined object.

func (*Decoder) DecodeInto

func (d *Decoder) DecodeInto(content []byte, into runtime.Object) error

DecodeInto decodes the inlined object in the into the passed-in runtime.Object.

type Webhook

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

Webhook implements a CRD conversion webhook HTTP handler.

func (*Webhook) InjectScheme

func (wh *Webhook) InjectScheme(s *runtime.Scheme) error

InjectScheme injects a scheme into the webhook, in order to construct a Decoder.

func (*Webhook) ServeHTTP

func (wh *Webhook) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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