Skip to content

Commit a53707e

Browse files
committed
chore(cleanup): remove legacy sidecar artifacts and dead ports package
1 parent 62ba22b commit a53707e

12 files changed

Lines changed: 3 additions & 266 deletions

File tree

.github/workflows/sshd-image.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/okdev-implementation-plan.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ internal/cli/
115115
internal/session/
116116
internal/kube/
117117
internal/sync/
118-
internal/ports/
119118
internal/connect/
120119
internal/output/
121120
docs/

infra/sshd/Dockerfile

Lines changed: 0 additions & 13 deletions
This file was deleted.

infra/sshd/README.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

infra/sshd/entrypoint.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

infra/sshd/sshd_config

Lines changed: 0 additions & 16 deletions
This file was deleted.

infra/syncthing/Dockerfile

Lines changed: 0 additions & 29 deletions
This file was deleted.

infra/syncthing/README.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

internal/cli/syncthing.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import (
2727
)
2828

2929
const (
30-
syncthingContainerName = "okdev-sidecar"
31-
legacySyncthingContainerName = "syncthing"
30+
syncthingContainerName = "okdev-sidecar"
3231
)
3332
const (
3433
syncthingPeerAddrDynamic = "dynamic"
@@ -317,15 +316,7 @@ func readRemoteSyncthingAPIKey(ctx context.Context, k interface {
317316
func execInSyncthingContainer(ctx context.Context, k interface {
318317
ExecShInContainer(context.Context, string, string, string, string) ([]byte, error)
319318
}, namespace, pod, script string) ([]byte, error) {
320-
out, err := k.ExecShInContainer(ctx, namespace, pod, syncthingContainerName, script)
321-
if err == nil {
322-
return out, nil
323-
}
324-
msg := strings.ToLower(err.Error())
325-
if strings.Contains(msg, "container "+syncthingContainerName+" is not valid") || strings.Contains(msg, "container not found") {
326-
return k.ExecShInContainer(ctx, namespace, pod, legacySyncthingContainerName, script)
327-
}
328-
return nil, err
319+
return k.ExecShInContainer(ctx, namespace, pod, syncthingContainerName, script)
329320
}
330321

331322
func waitSyncthingAPI(ctx context.Context, base, key string, timeout time.Duration) error {

internal/kube/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ func preferredContainerFromExecErr(err error) string {
698698
}
699699
}
700700
for _, n := range names {
701-
if n != "syncthing" && n != "okdev-sidecar" {
701+
if n != "okdev-sidecar" {
702702
return n
703703
}
704704
}

0 commit comments

Comments
 (0)