Skip to content

Commit

Permalink
[OBS-270] Use Postman LCA image locations (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
liujed committed Sep 13, 2023
1 parent a54d498 commit bf2fd01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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 akitasoftware/cli:latest` to pull an Akita agent "+
"`docker pull --platform $YOUR_ARCHITECTURE docker.postman.com/postman-lc-agent:latest` to pull an Akita agent "+
"built for your architecture.",
arch,
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/internal/ecs/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ const (
// Akita agent image locations
akitaECRImage = "public.ecr.aws/akitasoftware/akita-cli"
akitaDockerImage = "akitasoftware/cli"
postmanECRImage = "docker.postman.com/postman-lc-agent"
)

// Run the "add to ECS" workflow until we complete or get an error.
Expand Down Expand Up @@ -531,7 +532,7 @@ func getTaskState(wf *AddWorkflow) (nextState optionals.Optional[AddWorkflowStat
// Check that the Akita CLI is not already present
for _, container := range output.ContainerDefinitions {
image := aws.ToString(container.Image)
if matchesImage(image, akitaECRImage) || matchesImage(image, akitaDockerImage) {
if matchesImage(image, postmanECRImage) || matchesImage(image, akitaECRImage) || matchesImage(image, akitaDockerImage) {
printer.Errorf("The selected task definition already has the image %q; Akita is already installed.\n", image)
printer.Infof("Please select a different task definition, or hit Ctrl+C to exit.\n")
return awf_next(getTaskState)
Expand Down Expand Up @@ -855,7 +856,7 @@ func modifyTaskState(wf *AddWorkflow) (nextState optionals.Optional[AddWorkflowS
{Name: aws.String("AKITA_ECS_TASK"), Value: &wf.ecsTaskDefinitionFamily},
},
Essential: aws.Bool(false),
Image: aws.String(akitaECRImage),
Image: aws.String(postmanECRImage),
})

output, err := wf.ecsClient.RegisterTaskDefinition(wf.ctx, input)
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/kube/inject.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ type secretGenerationOptions struct {
}

// The image to use for the Akita sidecar
const akitaImage = "public.ecr.aws/akitasoftware/akita-cli:latest"
const akitaImage = "docker.postman.com/postman-lc-agent:latest"

func createAkitaSidecar(projectName string) v1.Container {
args := []string{"apidump", "--project", projectName}
Expand Down

0 comments on commit bf2fd01

Please sign in to comment.