Skip to content

Commit

Permalink
Update on dots in service name
Browse files Browse the repository at this point in the history
  • Loading branch information
NetanelBollag committed Jun 25, 2023
1 parent 25fe453 commit 7be5236
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/reference/service-identities/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ Otterize uses universal service identities to refer to services, regardless of w
How do Otterize operators decide what is the name of the service that runs within the pod? The algorithm is as follows:

1. If the pod has an `intents.otterize.com/service-name` label, its value is used as the service name. This allows developers and
automations to explicitly name services, if needed.
2. If there is no `intents.otterize.com/service-name` label, a recursive look up is performed for the Kubernetes resource owner of
automations to explicitly name services, if needed. The value should not contain dots `.` as they are used to
differentiate between service name and namespace.
2. If there is no `intents.otterize.com/service-name` label, a recursive look-up is performed for the Kubernetes resource owner of
the pod, until the root resource is reached, and its name is used as the service name. For example, if you have
a `Deployment` named `checkoutservice`, which then creates and owns a `ReplicaSet`, which then creates and owns
a `Pod`, then the service name for that pod is `checkoutservice` - same as the name of the `Deployment`. This is
intended to capture the likely-more-meaningful "human name" of the service.
intended to capture the likely-more-meaningful "human name" of the service. If the root resource name contains
dots `.` they are replaced with underscores `_` in the service name.

0 comments on commit 7be5236

Please sign in to comment.