Commit Graph

150 Commits

Author SHA1 Message Date
Guillaume Tardif 3d18eda869 Do not specify successThreshold, from MSFT : defaults to 1 and cannot be changed, related to Kube healthchecks: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#probe-v1-core
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-13 14:14:42 +01:00
Nicolas De loof aa09ecb1f8
Merge pull request #905 from docker/fix_aci_potential_nil_panic
Use ACI .IsHttpStatus() rather than accessing .StatusCode directly
2020-11-12 15:12:14 +01:00
Guillaume Tardif 0d74298eed Use ACI .IsHttpStatus() rather than accessing .StatusCode directly, that might lead to nil pointer panic
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-12 15:01:18 +01:00
Guillaume Tardif 624308134f Specific error message when specifying path as a volume source. Removed volume reference validation already done at https://github.com/compose-spec/compose-go/blob/5afecaa4cb/loader/validate.go#L38
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-12 11:38:40 +01:00
Guillaume Tardif 40334d570a Avoid nil pointer when reading logs of a just terminated container.
Hit this when following logs of a container restarted with a health check: 
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x168771e]

goroutine 1 [running]:
github.com/docker/compose-cli/aci.getACIContainerLogs(0x2d85260, 0xc000526c60, 0xc0001465a0, 0x24, 0xc0004f4da0, 0xa, 0xc0004f4db0, 0x7, 0x7ffeefbffab2, 0xb, ...)
	github.com/docker/compose-cli/aci/aci.go:285 +0x1fe
github.com/docker/compose-cli/aci.streamLogs(0x2d85260, 0xc000526c60, 0xc0001465a0, 0x24, 0xc0004f4da0, 0xa, 0xc0004f4db0, 0x7, 0x7ffeefbffab2, 0xb, ...)
	github.com/docker/compose-cli/aci/aci.go:297 +0x2e5
```

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-09 18:19:31 +01:00
Guillaume Tardif 5c04e84e49
Merge pull request #882 from docker/yaml
Marshall cloudformation template as yaml
2020-11-06 13:51:12 +01:00
Guillaume Tardif 37737c3887 Do not send zero values in LivenessProbe, blocking deployments in some cases
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-06 12:21:12 +01:00
Ulysses Souza f6509ac814 Add Healthchecks to ACI
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-11-06 12:21:12 +01:00
Nicolas De Loof cb02622318
Marshall cloudformation template as yaml
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-11-05 11:01:32 +01:00
Guillaume Tardif 5bdcfe2e4a Pin version of ACI sidecar image, so that we don’t affect prod users when re-publishing :latest.
Makefile includes a target to publish new versions, ensuring we don’t override an existing image tag

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-28 17:19:12 +01:00
Guillaume Tardif 3e797f5088 Add trailing empty line in /etc/hosts that seem to be causing flakiness in name resolution for the last service mentioned
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-27 09:41:19 +01:00
Guillaume Tardif b138a3e4f6 Log something to be able to see what is happening remotely
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-26 15:21:16 +01:00
Guillaume Tardif 18e43b277c fmt.Scanln() does not wait forever… waiting for process termination signal
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-26 15:06:30 +01:00
Guillaume Tardif 3dddbcd7df We need to pass the full command and not rely on ENTRYPOINT for ACI containers, ACI overrides the ENTRYPOINT with commands.
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-26 15:03:37 +01:00
Nicolas De Loof 553865f294
minimalist container image to setup /etc/hosts on ACI
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-10-21 10:25:05 +02:00
Nicolas De loof 455c08c245
Merge pull request #804 from docker/separate_secret_code
Move ACI conversion code to specific files
2020-10-21 10:18:47 +02:00
Ulysses Souza 29ba42bbc4 Fix volume create cli bug
This passes the pointer to the concrete struct instead of a copy

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-20 19:34:06 +02:00
Guillaume Tardif 38a58855b5 Move more specific code out of convert.go: restart policy
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:54:13 +02:00
Guillaume Tardif 406eb681d2 Moving code from global convert.go to volumes.go, ports.go
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:47:31 +02:00
Guillaume Tardif 7d04038690 Separate secret convert code into its own file
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:27:59 +02:00
Guillaume Tardif 487a4e485c Fix Flaky test due to array random order
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-16 17:13:52 +02:00
guillaume.tardif 18966eb3a1 for secret target path, use path.Join etc. instead of filepath.Join, as these paths are container side, not cli side. (do not use windows paths).
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
2020-10-16 14:57:47 +02:00
Ulysses Souza 06e44a813c Support absolute paths for secrets
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-15 15:46:07 +02:00
Guillaume Tardif 50a2ae1100 Display summary of reclaimed ACI resources (CPU/mem) in `docker prune`
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-15 15:45:48 +02:00
Guillaume Tardif a5e34323e2 Add `docker prune` command and ACI implementation
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-14 17:48:11 +02:00
Guillaume Tardif 7cf7b00584 Add ResourceService definition and ACI NOOP implementation
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-14 15:40:24 +02:00
Ulysses Souza 660c7bbdcf Add command "volume inspect"
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-14 11:11:55 +02:00
Guillaume Tardif d8cd4038c2 Fix panic when invoking inspect with empty container id (ACI SDK returns status 200 but nil container group properties)
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-13 15:33:52 +02:00
Guillaume Tardif be4b9a6812
Merge pull request #760 from docker/add-quiet-flags
Add --quiet for some commands
2020-10-13 09:00:58 +02:00
Ulysses Souza 45212c6e21 Squash all secrets in a single one
Also adds an e2e test

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-12 14:17:37 +02:00
Ulysses Souza 6c1ea32dae Add --quiet for some commands
- compose ls
- compose ps
- secret ls // Not implemented on ACI so no e2e-aci tests
- volume ls

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-12 11:34:27 +02:00
Nicolas De loof a067882b6d
Merge pull request #734 from docker/add-version-in-user-agent
Add version to UserAgent on  ACI
2020-10-12 11:11:55 +02:00
Ulysses Souza 10632b008b Add version to UserAgent on ACI
This also refactors the Version insertion to make it global

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-12 09:15:32 +02:00
Ulysses Souza 4d6a0bb00d Remove inline secrets option
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-09 14:54:12 +02:00
Ulysses Souza 99186b1d04 Look for all mounts before removing a volume
This checks the volume mounts of all container groups from all
resource groups before removing a volume/fileshare

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-09 14:39:21 +02:00
Guillaume Tardif 68d0413e36 Minor cleanup
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-09 11:53:53 +02:00
Guillaume Tardif 6516632ecf Add resource reservations to container inspect
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:47:16 +02:00
Guillaume Tardif b1edfb6507 Change inspect json output to group things a bit more nicely, and more like Moby json output
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:03:30 +02:00
Guillaume Tardif 343d54dac5 Allow to set memory / CPU limits higher than requests, ACI will request that limits are not higher than the total request for the container group. Also set requests = limits when only limits are set
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:03:30 +02:00
Guillaume Tardif c09f771359 Use compose resource request to set ACI retrouve request, and single container resource requests.
Limits should be used to allow one container in a container group to use more than the container requested resources, up to the total resources requested for the container group. 

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-10-08 17:03:30 +02:00
aiordache 265dd197c3 Add detach flag to `compose up`
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-10-07 15:51:43 +02:00
Guillaume Tardif 97576db803
Merge pull request #689 from ulyssessouza/json-out
Add json output format to several commands
2020-10-05 10:30:30 +02:00
Ulysses Souza 863d8ba7a8
Merge pull request #700 from gtardif/aci_constants
Regroup azure constants that might be things to switch in order to provide access to other azure clouds
2020-10-02 17:19:52 +02:00
Ulysses Souza ef5e013aa7 Return empty list instead of nil on List
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-10-01 15:41:18 +02:00
Ulysses Souza 277702dc6b Add argument support to run command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-09-30 15:34:22 +02:00
Guillaume Tardif b514dafa91 Regroup azure constants that might be things to switch in order to provide access to other azure clouds.
See `az cloud list` to list endpoints specific to each azure cloud.

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-30 14:05:28 +02:00
Guillaume Tardif ca35ccfb0e ACI Volumes : create takes one required arg, instead of required flag `--fileshare` (we still have required flag `--storage-account` specifically for ACI)
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-24 17:10:32 +02:00
Guillaume Tardif 7eda96bea4 Fix nil pointer when creating volume with “” storage account
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-24 12:59:29 +02:00
Guillaume Tardif cf3bb18c0e User compose.service.domainname rather than custom ACI extension for ACI DNSLabelName
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-22 14:44:22 +02:00
Guillaume Tardif 334ebf5f75 Implement --domainname flag on compose up, also defining compose extension "x-aci-domain-name" to store ACI DNSLabelName.
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-09-22 14:41:31 +02:00