Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[POA-1584] Update insights image URL to new public ECR repo #26

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apidump/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func showPermissionErrors(sampleError error) error {
return NewApidumpErrorf(
api_schema.ApidumpError_PCAPInterfaceNotImplemented,
"Unable to read network interfaces. If your host architecture is not %s, try using "+
"`docker pull --platform $YOUR_ARCHITECTURE docker.postman.com/postman-insights-agent:latest` to pull a Postman Insights Agent "+
"`docker pull --platform $YOUR_ARCHITECTURE public.ecr.aws/postman/postman-insights-agent:latest` to pull a Postman Insights Agent "+
"built for your architecture.",
arch,
)
Expand Down
13 changes: 7 additions & 6 deletions cmd/internal/ecs/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ const (
akitaDockerImage = "akitasoftware/cli"

// Postman Insights Agent image location
postmanECRImage = "docker.postman.com/postman-insights-agent"
postmanOldECRImage = "docker.postman.com/postman-insights-agent"
postmanECRImage = "public.ecr.aws/postman/postman-insights-agent"
)

// Run the "add to ECS" workflow until we complete or get an error.
Expand Down Expand Up @@ -563,11 +564,11 @@ func getTaskState(wf *AddWorkflow) (nextState optionals.Optional[AddWorkflowStat
return awf_next(getTaskState)
}

// Also detect the Akita CLI image, to avoid having two copies of the agent
// running.
if matchesImage(image, akitaECRImage) || matchesImage(image, akitaDockerImage) {
printer.Errorf("The selected task definition already has the image %q, indicating that the Akita CLI is currently installed.\n", image)
printer.Infof("The Akita CLI is no longer supported. Please uninstall it and try again.\n")
// Also detect old images, such as the Akita CLI or unsupported versions of Postman Insights Agent,
// to avoid having two copies of the agent running simultaneously.
if matchesImage(image, akitaECRImage) || matchesImage(image, akitaDockerImage) || matchesImage(image, postmanOldECRImage) {
printer.Errorf("The selected task definition already has the image %q, indicating that the agent is currently installed.\n", image)
printer.Infof("This version of agent is no longer supported. Please uninstall it and try again.\n")
printer.Infof("You can also select a different task definition, or hit Ctrl+C to exit.\n")
return awf_next(getTaskState)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/kube/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

// The image to use for the Postman Insights Agent sidecar
const akitaImage = "docker.postman.com/postman-insights-agent:latest"
const akitaImage = "public.ecr.aws/postman/postman-insights-agent:latest"

// Writes the generated secret to the given file path
func writeFile(data []byte, filePath string) error {
Expand Down