objectkinds

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 17 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// Any represents the ObjectKind that matches any object.
	Any = "Any"
)
View Source
const (
	// ClusterRole represents Kubernetes ClusterRole objects. Case sensitive.
	ClusterRole = "ClusterRole"
)
View Source
const (
	// ClusterRoleBinding represents Kubernetes ClusterRoleBinding objects. Case sensitive.
	ClusterRoleBinding = "ClusterRoleBinding"
)
View Source
const (
	// DeploymentLike is the name of the DeploymentLike ObjectKind.
	DeploymentLike = "DeploymentLike"
)
View Source
const (
	// HorizontalPodAutoscaler represents Kubernetes HorizontalPodAutoscaler objects. Case sensitive.
	HorizontalPodAutoscaler = "HorizontalPodAutoscaler"
)
View Source
const (
	// Ingress represents Kubernetes Ingress objects.
	Ingress = "Ingress"
)
View Source
const (
	// NetworkPolicy represents Kubernetes NetworkPolicy objects.
	NetworkPolicy = "NetworkPolicy"
)
View Source
const (
	// PodDisruptionBudget represents Kubernetes PodDisruptionBudget objects.
	PodDisruptionBudget = "PodDisruptionBudget"
)
View Source
const (
	// Role represents Kubernetes Role objects. Case sensitive.
	Role = "Role"
)
View Source
const (
	// RoleBinding represents Kubernetes RoleBinding objects. Case sensitive.
	RoleBinding = "RoleBinding"
)
View Source
const (
	// ScaledObject represents Kubernetes ScaledObject objects. Case sensitive.
	ScaledObject = "ScaledObject"
)
View Source
const (
	// Service represents Kubernetes Service objects.
	SecurityContextConstraints = "SecurityContextConstraints"
)
View Source
const (
	// Service represents Kubernetes Service objects.
	Service = "Service"
)
View Source
const (
	// ServiceAccount represents Kubernetes ServiceAccount objects.
	ServiceAccount = "ServiceAccount"
)
View Source
const (
	// ServiceMonitor represents Prometheus Service Monitor objects.
	ServiceMonitor = k8sMonitoring.ServiceMonitorsKind
)

Variables

View Source
var (
	ScaledObjectV1Alpha1 = kedaV1Alpha1.SchemeGroupVersion.WithKind(ScaledObject)
)

Functions

func AllObjectKinds

func AllObjectKinds() []string

AllObjectKinds will return all the object kind names that are registered

func GetClusterRoleAPIVersion

func GetClusterRoleAPIVersion() string

GetClusterRoleAPIVersion returns ClusterRole's APIVersion

func GetClusterRoleBindingAPIVersion

func GetClusterRoleBindingAPIVersion() string

GetClusterRoleBindingAPIVersion returns ClusterRoleBinding's APIVersion

func GetHorizontalPodAutoscalerAPIVersion

func GetHorizontalPodAutoscalerAPIVersion(version string) string

GetHorizontalPodAutoscalerAPIVersion returns HorizontalPodAutoscaler's APIVersion

func GetIngressAPIVersion added in v0.6.1

func GetIngressAPIVersion() string

GetIngressAPIVersion returns Ingress's apiversion

func GetNetworkPolicyAPIVersion

func GetNetworkPolicyAPIVersion() string

GetNetworkPolicyAPIVersion returns networkpolicy's apiversion

func GetPodDisruptionBudgetAPIVersion added in v0.6.3

func GetPodDisruptionBudgetAPIVersion() string

GetPodDisruptionBudgetAPIVersion returns pdb's apiversion

func GetRoleAPIVersion

func GetRoleAPIVersion() string

GetRoleAPIVersion returns Role's APIVersion

func GetRoleBindingAPIVersion

func GetRoleBindingAPIVersion() string

GetRoleBindingAPIVersion returns RoleBinding's APIVersion

func GetSCCAPIVersion added in v0.6.5

func GetSCCAPIVersion() string

GetSCCAPIVersion returns SCC's apiversion

func GetScaledObjectAPIVersion added in v0.6.8

func GetScaledObjectAPIVersion(version string) string

GetScaledObjectAPIVersion returns ScaledObject's APIVersion

func GetServiceMonitorAPIVersion added in v0.6.5

func GetServiceMonitorAPIVersion() string

GetServiceMonitorAPIVersion returns servicemonitor's apiversion

func IsDeploymentLike added in v0.6.3

func IsDeploymentLike(gvk schema.GroupVersionKind) bool

func RegisterObjectKind added in v0.6.1

func RegisterObjectKind(name string, objectKind Matcher)

RegisterObjectKind allows a matcher function to be registered for a given object kind

Types

type Matcher

type Matcher interface {
	Matches(gvk schema.GroupVersionKind) bool
}

A Matcher selects a certain subset of GVKs.

func ConstructMatcher

func ConstructMatcher(objectKinds ...string) (Matcher, error)

ConstructMatcher constructs a matcher that matches objects that fall into one of the given object kinds.

type MatcherFunc added in v0.6.1

type MatcherFunc func(gvk schema.GroupVersionKind) bool

MatcherFunc takes in a GVK and decides if it matches an object kind

func (MatcherFunc) Matches added in v0.6.1

func (f MatcherFunc) Matches(gvk schema.GroupVersionKind) bool

Jump to

Keyboard shortcuts

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