providers

package
v0.0.0-...-2e32a30 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type K8sVersionProvider

type K8sVersionProvider struct {
	// contains filtered or unexported fields
}

Emits the used Kubernetes Version

func NewApiVersionProvider

func NewApiVersionProvider(client *kubernetes.Clientset) *K8sVersionProvider

func (*K8sVersionProvider) GetData

func (prov *K8sVersionProvider) GetData() map[string]interface{}

func (*K8sVersionProvider) GetName

func (prov *K8sVersionProvider) GetName() string

type KyvernoPoliciesProvider

type KyvernoPoliciesProvider struct {
	// contains filtered or unexported fields
}

func NewKyvernoPoliciesProvider

func NewKyvernoPoliciesProvider(dynamicClient *dynamic.DynamicClient, kubeConfig *restclient.Config, config config.Config) *KyvernoPoliciesProvider

func (*KyvernoPoliciesProvider) CheckPolicies

type ResourceProvider

type ResourceProvider[T resources.Resource] struct {
	Version       int32
	Resource      *schema.GroupVersionResource
	ResourcesList *ResourcesList
}

Emits a resource list with a list of elements T

func GetDeploymentResourceProvider

func GetDeploymentResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[resources.Deployment]

func GetIngressResourceProvider

func GetIngressResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[resources.Ingress]

func GetKyvernoResourceProvider

func GetKyvernoResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[kyvernov1.ClusterPolicy]

func GetNamespaceResourceProvider

func GetNamespaceResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[resources.Namespace]

func GetNodeResourceProvider

func GetNodeResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[resources.Node]

func GetPodResourceProvider

func GetPodResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[resources.Pod]

func GetServiceResourceProvider

func GetServiceResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[resources.Service]

func GetStatefulsetResourceProvider

func GetStatefulsetResourceProvider(dynamicClient *dynamic.DynamicClient, ignoredNamespaces []string) *ResourceProvider[resources.Statefulset]

func (*ResourceProvider[T]) GetParsedItems

func (rp *ResourceProvider[T]) GetParsedItems() []interface{}

func (*ResourceProvider[T]) GetResource

func (rp *ResourceProvider[T]) GetResource() *schema.GroupVersionResource

func (*ResourceProvider[T]) GetVersion

func (rp *ResourceProvider[T]) GetVersion() int32

type ResourcesList

type ResourcesList struct {
	Resources []*map[string]interface{}
	// contains filtered or unexported fields
}

A generic list or K8s resources which is updated continously through watching that resource type on the K8s Api.

func GetResourcesListInstance

func GetResourcesListInstance(
	dynamicClient *dynamic.DynamicClient,
	resource *schema.GroupVersionResource,
	ignoredNamespaces []string,
) *ResourcesList

Only one instance per resource type should exist. The per-resource singleton is returned here.

Jump to

Keyboard shortcuts

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