quack

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdmissionHook

type AdmissionHook struct {
	ValuesMapName      string   // Source of templating values
	ValuesMapNamespace string   // Namespace the configmap lives in
	RequiredAnnotation string   // Annotation required before templating
	IgnoredPaths       []string // Paths to not patch
	// contains filtered or unexported fields
}

AdmissionHook implements the OpenShift MutatingAdmissionHook interface. https://github.com/openshift/generic-admission-server/blob/v1.9.0/pkg/apiserver/apiserver.go#L45

func (*AdmissionHook) Admit

Admit is the actual business logic of the webhook. This is the method that processes the request to the admission controller.

Checks the operation is a create or update operation. Loads the template values from the configmap. Templates the values into the raw object (json) from the admission request. Calculates a JSON Patch to append to the admission response.

func (*AdmissionHook) Initialize

func (ah *AdmissionHook) Initialize(kubeClientConfig *restclient.Config, stopCh <-chan struct{}) error

Initialize configures the AdmissionHook.

Initializes connection Kubernetes Client

func (*AdmissionHook) MutatingResource

func (ah *AdmissionHook) MutatingResource() (schema.GroupVersionResource, string)

MutatingResource defines where the Webhook is hosted.

Jump to

Keyboard shortcuts

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