apihelpers

package
Version: v0.0.0-...-d88c8b5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL