Skip to content

Commit 3cc3b53

Browse files
authored
Rename nameentity to identity (#447)
nameentity seems to be a typo when renaming `id` to `name`
1 parent 6dc80c0 commit 3cc3b53

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

cmd/atelet/main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,15 +647,15 @@ func (s *AteomHerder) prepareOCIBundles(
647647
spec *ateletpb.WorkloadSpec,
648648
targetAteomUid string,
649649
) error {
650-
// Populate the per-actor nameentity directory that gets bind-mounted into
650+
// Populate the per-actor identity directory that gets bind-mounted into
651651
// the application containers. Regenerated on every resume, so it carries
652652
// the correct per-actor name even when restoring from the golden snapshot.
653653
identityDir := ateompath.ActorIdentityDirPath(atespace, actorName)
654654
if err := os.MkdirAll(identityDir, 0o755); err != nil {
655-
return fmt.Errorf("while creating actor nameentity dir: %w", err)
655+
return fmt.Errorf("while creating actor identity dir: %w", err)
656656
}
657657
if err := writeFileAtomic(filepath.Join(identityDir, ActorIDFileName), []byte(actorName), 0o644); err != nil {
658-
return fmt.Errorf("while writing actor nameentity file: %w", err)
658+
return fmt.Errorf("while writing actor identity file: %w", err)
659659
}
660660

661661
ddVolumes := make(map[string]bool)
@@ -698,7 +698,7 @@ func (s *AteomHerder) prepareOCIBundles(
698698
nil,
699699
annotations,
700700
ateompath.AteomNetNSPath(targetAteomUid),
701-
"", // pause is sandbox infra; it gets no actor nameentity mount.
701+
"", // pause is sandbox infra; it gets no actor identity mount.
702702
nil,
703703
); err != nil {
704704
return wrapFileSystemErr("while creating pause OCI bundle", err)
@@ -1047,10 +1047,10 @@ func resetActorDirs(atespace, actorName string) error {
10471047
// reads it through the gofer.
10481048
identityDir := ateompath.ActorIdentityDirPath(atespace, actorName)
10491049
if err := os.RemoveAll(identityDir); err != nil {
1050-
return wrapFileSystemErr("while deleting actor nameentity dir: %w", err)
1050+
return wrapFileSystemErr("while deleting actor identity dir: %w", err)
10511051
}
10521052
if err := os.MkdirAll(identityDir, 0o755); err != nil {
1053-
return wrapFileSystemErr("while creating actor nameentity dir: %w", err)
1053+
return wrapFileSystemErr("while creating actor identity dir: %w", err)
10541054
}
10551055

10561056
durableDirVolumesMountDir := ateompath.DurableDirVolumeMountsDir(atespace, actorName)

cmd/atelet/oci.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func prepareOCIDirectory(ctx context.Context, pullCache *memorypullcache.MemoryP
8484
return fmt.Errorf("in untar: %w", err)
8585
}
8686

87-
// Bind-mount the per-actor nameentity directory so the workload can read its
87+
// Bind-mount the per-actor identity directory so the workload can read its
8888
// own ID at IdentityMountPath/ActorIDFileName. The bind target must exist
8989
// in the rootfs for the mount to attach.
9090
if identityDir != "" {

cmd/atelet/oci_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func TestBuildActorOCISpec_IdentityMount(t *testing.T) {
103103
}
104104
found = true
105105
if m.Source != "/host/actors/atespace:id/identity" {
106-
t.Errorf("identity mount source = %q, want the per-actor nameentity dir", m.Source)
106+
t.Errorf("identity mount source = %q, want the per-actor identity dir", m.Source)
107107
}
108108
if m.Type != "bind" {
109109
t.Errorf("identity mount type = %q, want bind", m.Type)

docs/api-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ Because a snapshot is not restorable across sandbox runtimes, `sandboxClass` is
101101
Container environment variables support literal `value` entries and `valueFrom.secretKeyRef`. Secret references are resolved by `ate-api-server` from the `ActorTemplate` namespace when a workload spec is materialized. For the golden actor, the resolved values are captured in the golden snapshot and future actors inherit those values until the golden snapshot is recreated. For an actor that bypasses the golden snapshot and boots from the current template spec, the resolved values are sent to atelet but are not serialized into the public Actor API. Other Kubernetes `valueFrom` sources are not supported yet. Secret changes do not automatically restart actors or invalidate snapshots; rotating a Secret requires an explicit actor or template lifecycle action.
102102

103103
### Workload Connectivity (Uniform DNS)
104-
Substrate uses a **Uniform DNS Mesh**: every actor created from a template is automatically reachable through the **Substrate Router** via its atespace and ID:
104+
Substrate uses a **Uniform DNS Mesh**: every actor created from a template is automatically reachable through the **Substrate Router** via its atespace and name:
105105

106-
**Format:** `<actor-id>.<atespace>.actors.resources.substrate.ate.dev`
106+
**Format:** `<actor-name>.<atespace>.actors.resources.substrate.ate.dev`
107107

108108
### Actor Identity
109109
Substrate bind-mounts a read-only, per-actor identity directory at **`/run/ate`** into each of the actor's containers. An actor can learn its own ID without parsing the `Host` header by reading the file **`/run/ate/actor-id`** inside it, which contains the raw actor ID with no trailing newline. Further identity and configuration data may appear in this directory over time.

0 commit comments

Comments
 (0)