handler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: EPL-2.0 Imports: 20 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:

Red Hat, Inc. - initial API and implementation

Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:

Red Hat, Inc. - initial API and implementation

Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:

Red Hat, Inc. - initial API and implementation

Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:

Red Hat, Inc. - initial API and implementation

Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:

Red Hat, Inc. - initial API and implementation

Copyright (c) 2019-2021 Red Hat, Inc. This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Contributors:

Red Hat, Inc. - initial API and implementation

Index

Constants

This section is empty.

Variables

View Source
var (
	V1alpha1DevWorkspaceKind        = metav1.GroupVersionKind{Kind: "DevWorkspace", Group: "workspace.devfile.io", Version: "v1alpha1"}
	V1alpha2DevWorkspaceKind        = metav1.GroupVersionKind{Kind: "DevWorkspace", Group: "workspace.devfile.io", Version: "v1alpha2"}
	V1alpha1DevWorkspaceRoutingKind = metav1.GroupVersionKind{Kind: "DevWorkspaceRouting", Group: "controller.devfile.io", Version: "v1alpha1"}
	V1alpha1ComponentKind           = metav1.GroupVersionKind{Kind: "Component", Group: "controller.devfile.io", Version: "v1alpha1"}

	AppsV1DeploymentKind = metav1.GroupVersionKind{Kind: "Deployment", Group: "apps", Version: "v1"}
	V1PodKind            = metav1.GroupVersionKind{Kind: "Pod", Group: "", Version: "v1"}
	V1ServiceKind        = metav1.GroupVersionKind{Kind: "Service", Group: "", Version: "v1"}
	V1beta1IngressKind   = metav1.GroupVersionKind{Kind: "Ingress", Group: "extensions", Version: "v1beta1"}
	V1JobKind            = metav1.GroupVersionKind{Kind: "Job", Group: "batch", Version: "v1"}
	V1RouteKind          = metav1.GroupVersionKind{Kind: "Route", Group: "route.openshift.io", Version: "v1"}
)
View Source
var RestrictedAccessDiffOptions = []cmp.Option{

	cmpopts.IgnoreFields(metav1.ObjectMeta{}, "ManagedFields", "Finalizers", "DeletionTimestamp"),
	cmpopts.IgnoreFields(devworkspacev1alpha1.DevWorkspaceSpec{}, "Started"),
	cmpopts.IgnoreFields(devworkspacev1alpha2.DevWorkspaceSpec{}, "Started"),
	cmpopts.IgnoreMapEntries(func(key string, value string) bool { return key == constants.WorkspaceStopReasonAnnotation }),
}

RestrictedAccessDiffOptions is comparing options that should be used to check if there is no other changes except changing started

View Source
var V1PodExecOptionKind = metav1.GroupVersionKind{Kind: "PodExecOptions", Group: "", Version: "v1"}

Functions

This section is empty.

Types

type WebhookHandler

type WebhookHandler struct {
	ControllerUID    string
	ControllerSAName string
	Client           client.Client
	Decoder          *admission.Decoder
}

func (*WebhookHandler) HandleRestrictedAccessCreate

func (h *WebhookHandler) HandleRestrictedAccessCreate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) HandleRestrictedAccessUpdate

func (h *WebhookHandler) HandleRestrictedAccessUpdate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutateDeploymentOnCreate

func (h *WebhookHandler) MutateDeploymentOnCreate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutateDeploymentOnUpdate

func (h *WebhookHandler) MutateDeploymentOnUpdate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutatePodOnCreate

func (h *WebhookHandler) MutatePodOnCreate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutatePodOnUpdate

func (h *WebhookHandler) MutatePodOnUpdate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutateWorkspaceV1alpha1OnCreate

func (h *WebhookHandler) MutateWorkspaceV1alpha1OnCreate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutateWorkspaceV1alpha1OnUpdate

func (h *WebhookHandler) MutateWorkspaceV1alpha1OnUpdate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutateWorkspaceV1alpha2OnCreate

func (h *WebhookHandler) MutateWorkspaceV1alpha2OnCreate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) MutateWorkspaceV1alpha2OnUpdate

func (h *WebhookHandler) MutateWorkspaceV1alpha2OnUpdate(_ context.Context, req admission.Request) admission.Response

func (*WebhookHandler) ValidateExecOnConnect

func (h *WebhookHandler) ValidateExecOnConnect(ctx context.Context, req admission.Request) admission.Response

Jump to

Keyboard shortcuts

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