apiextensions-apiserverk8s.io/apiextensions-apiserver/pkg/apihelpers Index | Files

package apihelpers

import "k8s.io/apiextensions-apiserver/pkg/apihelpers"

Index

Functions

func IsProtectedCommunityGroup

func IsProtectedCommunityGroup(group string) bool

IsProtectedCommunityGroup returns whether or not a group specified for a CRD is protected for the community and needs to have the v1beta1.KubeAPIApprovalAnnotation set.

Types

type APIApprovalState

type APIApprovalState int

APIApprovalState covers the various options for API approval annotation states

const (
	// APIApprovalInvalid means the annotation doesn't have an expected value
	APIApprovalInvalid APIApprovalState = iota
	// APIApproved if the annotation has a URL (this means the API is approved)
	APIApproved
	// APIApprovalBypassed if the annotation starts with "unapproved" indicating that for whatever reason the API isn't approved, but we should allow its creation
	APIApprovalBypassed
	// APIApprovalMissing means the annotation is empty
	APIApprovalMissing
)

func GetAPIApprovalState

func GetAPIApprovalState(annotations map[string]string) (state APIApprovalState, reason string)

GetAPIApprovalState returns the state of the API approval and reason for that state

Source Files

helpers.go

Version
v0.17.12
Published
Sep 16, 2020
Platform
js/wasm
Imports
4 packages
Last checked
51 minutes ago

Tools for package owners.