handler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LabelTenantType             = "sme.sap.com/tenant-type"
	ProviderTenantType          = "provider"
	SideCarEnv                  = "WEBHOOK_SIDE_CAR"
	AdmissionError              = "admission error:"
	InvalidResource             = "invalid resource"
	InvalidationMessage         = "invalidated from webhook"
	ValidationMessage           = "validated from webhook"
	RequestPath                 = "/request"
	DeploymentWorkloadCountErr  = "%s %s there should always be one workload deployment definition of type %s. Currently, there are %d workloads of type %s"
	JobWorkloadCountErr         = "%s %s there should always be one workload job definition of type %s. Currently, there are %d workloads of type %s"
	TenantOpJobWorkloadCountErr = "%s %s there should not be more than one workload job definition of type %s. Currently, there are %d workloads of type %s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Name      string            `json:"name"`
	Namespace string            `json:"namespace"`
	Labels    map[string]string `json:"labels"`
}

Metadata struct for parsing

type ResponseCa

type ResponseCa struct {
	Metadata `json:"metadata"`
	Spec     *v1alpha1.CAPApplicationSpec `json:"spec"`
	Kind     string                       `json:"kind"`
}

type ResponseCat

type ResponseCat struct {
	Metadata `json:"metadata"`
	Spec     *v1alpha1.CAPTenantSpec   `json:"spec"`
	Status   *v1alpha1.CAPTenantStatus `json:"status"`
	Kind     string                    `json:"kind"`
}

type ResponseCav

type ResponseCav struct {
	Metadata `json:"metadata"`
	Spec     *v1alpha1.CAPApplicationVersionSpec `json:"spec"`
	Kind     string                              `json:"kind"`
}

type WebhookHandler

type WebhookHandler struct {
	CrdClient versioned.Interface
}

func (*WebhookHandler) Validate

func (wh *WebhookHandler) Validate(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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