services

package
v0.0.0-...-4c43a3e Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseEvaluationResponseIntoAdmissionReview

func ParseEvaluationResponseIntoAdmissionReview(requestUID k8sTypes.UID, allowed bool, msg string, warningMessages []string) *admission.AdmissionReview

func ShouldResourceBeSkippedByConfigMapScanningFilters

func ShouldResourceBeSkippedByConfigMapScanningFilters(admissionReviewReq *admission.AdmissionReview, rootObject RootObject) bool

Types

type ManagedFields

type ManagedFields struct {
	Manager string `json:"manager"`
}

type Metadata

type Metadata struct {
	Name              string                     `json:"name"`
	DeletionTimestamp string                     `json:"deletionTimestamp"`
	ManagedFields     []ManagedFields            `json:"managedFields"`
	Labels            map[string]string          `json:"labels"`
	OwnerReferences   []cliClient.OwnerReference `json:"ownerReferences"`
	Annotations       map[string]string          `json:"annotations"`
}

type OwnerReference

type OwnerReference struct {
	ApiVersion         string `json:"apiVersion"`
	Kind               string `json:"kind"`
	Name               string `json:"name"`
	Uid                string `json:"uid"`
	Controller         bool   `json:"controller"`
	BlockOwnerDeletion bool   `json:"blockOwnerDeletion"`
}

type RootObject

type RootObject struct {
	Metadata Metadata `json:"metadata"`
}

type ShouldValidatedResourceData

type ShouldValidatedResourceData struct {
	ShouldValidate     bool
	OpenShiftRequester string
}

func ShouldResourceBeValidated

func ShouldResourceBeValidated(admissionReviewReq *admission.AdmissionReview, rootObject RootObject) ShouldValidatedResourceData

type ValidationService

type ValidationService struct {
	CliServiceClient *cliClient.CliClient
	K8sMetadataUtil  *k8sMetadataUtil.K8sMetadataUtil
	ErrorReporter    *errorReporter.ErrorReporter
	State            *servicestate.ServiceState
	OpenshiftService *openshiftService.OpenshiftService
	Logger           *logger.Logger
}

func (*ValidationService) SendMetadataInBatch

func (vs *ValidationService) SendMetadataInBatch()

func (*ValidationService) Validate

func (vs *ValidationService) Validate(admissionReviewReq *admission.AdmissionReview, warningMessages *[]string) (admissionReview *admission.AdmissionReview, isSkipped bool)

Jump to

Keyboard shortcuts

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