fleet/infrastructure/sandbox/JITProvisioner/ingress_destroyer
Benjamin Edwards 14629202ed
add ingress destroyer (#10674)
this PR adds a step in the AWS state function that introduces a new ECS
fargate task that is responsible for destroying the ingress for the
particular instance.

I have tested the Go code locally, but not yet fully deployed into ECS.
What is does is run:

`aws eks update-kubeconfig` which is described as:
```
       This command constructs a configuration with  prepopulated  server  and
       certificate  authority  data  values  for a specified cluster.  You can
       specify an IAM role ARN with the --role-arn option to use for authenti-
       cation  when  you issue kubectl commands.  Otherwise, the IAM entity in
       your default AWS CLI or SDK credential chain is  used.
```

I then write the output of this command to the tmp directory, then load
the Go SDK for Kubernetes telling it to read this kubeconfig file to
bootstrap which cluster we'll operate on.

relates to https://github.com/fleetdm/fleet/issues/8569

Then its a simple Ingress destroy command.

---------

Co-authored-by: zwinnerman-fleetdm <zwinnerman@fleetdm.com>
Co-authored-by: Zachary Winnerman <98712682+zwinnerman-fleetdm@users.noreply.github.com>
2023-04-05 17:15:33 -04:00
..
Dockerfile add ingress destroyer (#10674) 2023-04-05 17:15:33 -04:00
go.mod add ingress destroyer (#10674) 2023-04-05 17:15:33 -04:00
go.sum add ingress destroyer (#10674) 2023-04-05 17:15:33 -04:00
main.go add ingress destroyer (#10674) 2023-04-05 17:15:33 -04:00