kas

package
v0.1.48 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdmissionPolicyNameConfig = "config"
	AdmissionPolicyNameMirror = "mirror"
	AdmissionPolicyNameICSP   = "icsp"
)

Variables

View Source
var (
	HCCOUserValidation = k8sadmissionv1beta1.Validation{
		Expression: fmt.Sprintf("request.userInfo.username == 'system:%s' || (has(object.spec) && has(oldObject.spec) && object.spec == oldObject.spec)", config.HCCOUser),
		Message:    "This resource cannot be created, updated, or deleted. Please ask your administrator to modify the resource in the HostedCluster object.",
		Reason:     ptr.To(metav1.StatusReasonInvalid),
	}
)

Functions

func ReconcileKASEndpointSlice

func ReconcileKASEndpointSlice(endpointSlice *discoveryv1.EndpointSlice, address string, port int32)

func ReconcileKASEndpoints

func ReconcileKASEndpoints(endpoints *corev1.Endpoints, address string, port int32)

func ReconcileKASValidatingAdmissionPolicies added in v0.1.44

func ReconcileKASValidatingAdmissionPolicies(ctx context.Context, hcp *hyperv1.HostedControlPlane, client client.Client, createOrUpdate upsert.CreateOrUpdateFN) error

ReconcileKASValidatingAdmissionPolicies will create ValidatingAdmissionPolicies which block certain resources from being updated/deleted from the DataPlane side.

Types

type AdmissionPolicy added in v0.1.44

type AdmissionPolicy struct {
	Name             string
	MatchConstraints *k8sadmissionv1beta1.MatchResources
	Validations      []k8sadmissionv1beta1.Validation
}

Jump to

Keyboard shortcuts

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