Documentation ¶
Index ¶
Constants ¶
View Source
const (
ServiceNameAnnotation = "intents.otterize.com/service-name"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func NewResolver ¶
func (*Resolver) GetOwnerObject ¶
GetOwnerObject recursively iterates over the pod's owner reference hierarchy until reaching a root owner reference and returns it.
func (*Resolver) ResolvePodToServiceIdentity ¶
func (r *Resolver) ResolvePodToServiceIdentity(ctx context.Context, pod *corev1.Pod) (string, error)
ResolvePodToServiceIdentity resolves a pod object to its otterize service ID, referenced in intents objects. It calls GetOwnerObject to recursively iterates over the pod's owner reference hierarchy until reaching a root owner reference. In case the pod is annotated with an "intents.otterize.com/service-name" annotation, that annotation's value will override any owner reference name as the service name.
Click to show internal directories.
Click to hide internal directories.