Documentation ¶
Overview ¶
Package util implements utility functions and types for language detection feature.
For more information about the language detection and library injection feature, refer to this document.
Index ¶
Constants ¶
const ( // KindDeployment represents the deployment resource kind KindDeployment = "Deployment" // KindReplicaset represents the replicaset resource kind KindReplicaset = "ReplicaSet" )
Variables ¶
var SupportedBaseOwners = map[string]struct{}{ KindDeployment: {}, }
SupportedBaseOwners is the set of owner resource types supported by language detection Currently only deployments are supported For KindReplicaset, we use the parent deployment
Functions ¶
func GetGVR ¶
func GetGVR(namespacedOwnerRef *NamespacedOwnerReference) (schema.GroupVersionResource, error)
GetGVR returns the GroupVersionResource of the ownerRef
Types ¶
type NamespacedOwnerReference ¶
NamespacedOwnerReference defines an owner reference bound to a namespace
func GetNamespacedBaseOwnerReference ¶
func GetNamespacedBaseOwnerReference(podDetails *pbgo.PodLanguageDetails) NamespacedOwnerReference
GetNamespacedBaseOwnerReference creates a new namespaced owner reference object representing the base owner of the pod In case the first owner's kind is replicaset, it returns an owner reference to the parent deployment of the replicaset
func NewNamespacedOwnerReference ¶
func NewNamespacedOwnerReference(apiVersion string, kind string, name string, namespace string) NamespacedOwnerReference
NewNamespacedOwnerReference returns a new namespaced owner reference