Project: Kuma (Orchestration & Management / Service Mesh)
File: kds-sync-name.md

CRD scope: Cluster Kuma scope: Mesh ``` nameInZone := "${truncate(nameInGlobal, 236)}-${hash(mesh, nameInGlobal)}" ``` Example: User creates a policy on Global: ```yaml type: TrafficPermission name: my-policy ``` Name in the Kuma API on Global CP: `my-policy` Name in the Kuma API on Zone CP: `my-policy-fvdw2c2wx44fv4xz` Not supported CRD scope: Namespace Kuma scope: Mesh ``` nameInGlobal = trimNsSuffix(nameInGlobal) nameInZone := "${truncate(nameInGlobal, 236)}-${hash(mesh, nameInGlobal)}.${systemNamespace}" ``` Example: User creates a CRD on Global: ```yaml kind: MeshTrafficPermission metadata: name: my-policy namespace: kuma-system-global ``` Name in the Kuma API on Global CP: `my-policy.kuma-system-global` Name of the CRD on Zone CP: `my-policy-fvdw2c2wx44fv4xz` Name in the Kuma API on Zone CP: `my-policy-fvdw2c2wx44fv4xz.kuma-system-zone` ``` nameInZone := "${truncate(nameInGlobal, 236)}-${hash(mesh, nameInGlobal)}.${systemNamespace}" ``` Example: User creates a policy on Global: ```yaml type: MeshTrafficPermission name: my-policy ``` Name in the Kuma API on Global CP: `my-policy` Name of the CRD on Zone CP: `my-policy-fvdw2c2wx44fv4xz` Name in the Kuma API on Zone CP: `my-policy-fvdw2c2wx44fv4xz.kuma-system-zone` ``` nameInGlobal = trimNsSuffix(nameInGlobal) nameInZone := "${truncate(nameInGlobal, 236)}-${hash(mesh, nameInGlobal)}" ``` Example: User creates a CRD on Global: ```yaml kind: MeshTrafficPermission metadata: name: my-policy namespace: kuma-system-global ``` Name in the Kuma API on Global CP: `my-policy.kuma-system-global` Name in the Kuma API on Zone CP: `my-policy-fvdw2c2wx44fv4xz` ``` nameInZone := "${truncate(nameInGlobal, 236)}-${hash(mesh, nameInGlobal)}" ``` Example: User creates a policy on Global: ```yaml type: MeshTrafficPermission name: my-policy ``` Name in the Kuma API on Global CP: `my-policy` Name in the Kuma API on Zone CP: `my-policy-fvdw2c2wx44fv4xz` Not supported CRD scope: Namespace Kuma scope: Mesh Not supported ``` nameInGlobal := "${zone}.${nameInZone}.${nsInZone}.${systemNamespce}" ``` Example: User starts a DPP in Zone `zone-1`: ```yaml kind: Dataplane metadata: name: my-dpp namespace: kuma-demo ``` Name in the Kuma API on Zone CP: `my-dpp.kuma-demo` Name of the CRD on Global CP: `zone-1.my-dpp.kuma-demo` Name in the Kuma API on Global CP: `zone-1.my-dpp.kuma-demo.kuma-system` Notes: in KDS v1 instead of `.kuma-system` we have `.default` DPP name collision is possible https://github.com/kumahq/kuma/issues/8249 ``` nameInGlobal := "${zone}.${nameInZone}.${systemNamespce}" ``` Example: User starts a DPP in Zone `zone-1`: ```yaml type: Dataplane name: my-dpp ``` Name in the Kuma API on Zone CP: `my-dpp` Name of the CRD on Global CP: `zone-1.my-dpp` Name in the Kuma API on Global CP: `zone-1.my-dpp.kuma-system` Notes: in KDS v1 instead of `.kuma-system` we have `.default` DPP name collision is possible https://github.com/kumahq/kuma/issues/8249 ``` nameInGlobal := "${zone}.${nameInZone}" ``` Example: User starts a DPP in Zone `zone-1`: ```yaml type: Dataplane name: my-dpp ``` Name in the Kuma API on Zone CP: `my-dpp` Name in the Kuma API on Global CP: `zone-1.my-dpp` CRD scope: Namespace Kuma scope: Global ``` nameInGlobal := "${zone}.${nameInZone}.${nsInZone}.${systemNamespace}" ``` Example: User starts a ZoneIngress in Zone `zone-1`: ```yaml kind: ZoneIngress metadata: name: my-ingress namespace: kuma-system-zone ``` Name in the Kuma API on Zone CP: `my-ingress.kuma-system-zone` Name of the CRD on Global CP: `zone-1.my-ingress.kuma-system-zone` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-zone.kuma-system-global` Notes: in KDS v1 instead of `.kuma-system-global` we have `.default` ``` nameInGlobal := "${zone}.${nameInZone}.${systemNamespace}" ``` Example: User starts a ZoneIngress in Zone `zone-1`: ```yaml type: ZoneIngress name: my-ingress ``` Name in the Kuma API on Zone CP: `my-ingress` Name of the CRD on Global CP: `zone-1.my-ingress` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-global` Notes: in KDS v1 instead of `.kuma-system-global` we have `.default` ``` nameInGlobal := "${zone}.${nameInZone}.${nsInZone}" ``` Example: User starts a ZoneIngress in Zone `zone-1`: ```yaml kind: ZoneIngress metadata: name: my-ingress namespace: kuma-system-zone ``` Name in the Kuma API on Zone CP: `my-ingress.kuma-system-zone` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-zone` ``` nameInGlobal :=

``` Example: User starts a ZoneIngress in Zone `zone-1`: ```yaml type: ZoneIngress name: my-ingress ``` Name in the Kuma API on Zone CP: `my-ingress` Name in the Kuma API on Global CP: `zone-1.my-ingress` ``` nameInZone := "${nameInGlobal}.${systemNamespace}" ``` Example 1: Zone(k8s) -> Global(k8s) -> Zone(k8s) User starts a ZoneIngress in Zone `zone-1`: ```yaml kind: ZoneIngress metadata: name: my-ingress namespace: kuma-system-zone-1 ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress.kuma-system-zone-1` Name of the CRD on Global CP: `zone-1.my-ingress.kuma-system-zone-1` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-zone-1.kuma-system-global` Name of the CRD on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-zone-1.kuma-system-global` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-zone-1.kuma-system-global.kuma-system-zone-2` Example 2: Zone(universal) -> Global(k8s) -> Zone(k8s) User starts a ZoneIngress in Zone `zone-1`: ```yaml type: ZoneIngress name: my-ingress ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress` Name of the CRD on Global CP: `zone-1.my-ingress` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-global` Name of the CRD on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-global` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-global.kuma-system-zone-2` Notes: in KDS v1 instead of `.kuma-system-global` and `.kuma-system-zone-2` we have `.default` ``` nameInZone := "${nameInGlobal}.${systemNamespace}" ``` Example 1: Zone(k8s) -> Global(universal) -> Zone(k8s) User starts a ZoneIngress in Zone `zone-1`: ```yaml kind: ZoneIngress metadata: name: my-ingress namespace: kuma-system-zone-1 ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress.kuma-system-zone-1` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-zone-1` Name of the CRD on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-zone-1` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-zone-1.kuma-system-zone-2` Example 2: Zone(universal) -> Global(universal) -> Zone(k8s) User starts a ZoneIngress in Zone `zone-1`: ```yaml type: ZoneIngress name: my-ingress ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress` Name in the Kuma API on Global CP: `zone-1.my-ingress` Name of the CRD on Zone CP of `zone-2`: `zone-1.my-ingress` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-zone-2` Notes: in KDS v1 instead of `.kuma-system-zone-2` we have `.default` ``` nameInZone := "${nameInGlobal}" ``` Example 1: Zone(k8s) -> Global(k8s) -> Zone(universal) User starts a ZoneIngress in Zone `zone-1`: ```yaml kind: ZoneIngress metadata: name: my-ingress namespace: kuma-system-zone-1 ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress.kuma-system-zone-1` Name of hte CRD on Global CP: `zone-1.my-ingress.kuma-system-zone-1` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-zone-1.kuma-system-global` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-zone-1.kuma-system-global` Example 2: Zone(universal) -> Global(k8s) -> Zone(universal) User starts a ZoneIngress in Zone `zone-1`: ```yaml type: ZoneIngress name: my-ingress ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress` Name of hte CRD on Global CP: `zone-1.my-ingress` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-global` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-global` Notes: in KDS v1 instead of `.kuma-system-zone-2` we have `.default` ``` nameInZone := "${nameInGlobal}" ``` Example 1: Zone(k8s) -> Global(universal) -> Zone(universal) User starts a ZoneIngress in Zone `zone-1`: ```yaml kind: ZoneIngress metadata: name: my-ingress namespace: kuma-system-zone-1 ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress.kuma-system-zone-1` Name in the Kuma API on Global CP: `zone-1.my-ingress.kuma-system-zone-1` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress.kuma-system-zone-1` Example 2: Zone(universal) -> Global(universal) -> Zone(universal) User starts a ZoneIngress in Zone `zone-1`: ```yaml type: ZoneIngress name: my-ingress ``` Name in the Kuma API on Zone CP of `zone-1`: `my-ingress` Name in the Kuma API on Global CP: `zone-1.my-ingress` Name in the Kuma API on Zone CP of `zone-2`: `zone-1.my-ingress`