Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

added app labels to container metadata #683

Merged
merged 1 commit into from Oct 15, 2019

Conversation

zappy-shu
Copy link
Contributor

- What I did

Added 2 labels to the containers when they are deployed by docker app:

  • com.docker.app.namespace: same as the com.docker.stack.namespace
  • com.docker.app.version: version of docker app used for the deploy

These have been added so that Docker Desktop can differentiate between docker app deployments vs docker stack services.

- How I did it

Added the labels to the services in the invocation image install command (both install and upgrade in docker app) before calling RunDeploy on the orchestrator.

- How to verify it

Assertions for the labels have been added to the e2e tests. To verify manually:

  • Run a docker app install and then inspect the running containers. They should have the labels as described above.
  • Run a docker app upgrade on the installed app and then inspect the running containers. They should have the labels as described above.

- Description for the changelog

Added com.docker.app.namespace and com.docker.app.version labels to containers created by docker app.

- A picture of a cute animal (not mandatory but encouraged)

_108799047_harry-walker_oh-my_00000657

cmd/cnab-run/install.go Outdated Show resolved Hide resolved
internal/names.go Outdated Show resolved Hide resolved
@zappy-shu zappy-shu force-pushed the add-app-metadata-labels branch 4 times, most recently from f027f17 to df1bde7 Compare October 15, 2019 08:58
Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Oct 15, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@a4645a5). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #683   +/-   ##
=========================================
  Coverage          ?   71.78%           
=========================================
  Files             ?       56           
  Lines             ?     2889           
  Branches          ?        0           
=========================================
  Hits              ?     2074           
  Misses            ?      551           
  Partials          ?      264
Impacted Files Coverage Δ
internal/names.go 100% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4645a5...68e3811. Read the comment docs.

internal/names.go Outdated Show resolved Hide resolved
Added 2 labels to the containers when they are deployed by docker app:
- com.docker.app.namespace: same as the com.docker.stack.namespace
- com.docker.app.version: version of docker app used for the deploy

These have been added so that Docker Desktop can differentiate between
docker app deployments vs docker stack services.

Signed-off-by: Nick Adcock <nick.adcock@docker.com>
@silvin-lubecki silvin-lubecki merged commit 64e685e into docker:master Oct 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants