docker / docker/docker-py

How to perform `docker service update --secret-rm... --secret-add...`

Open
#2,908 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

The service.update() method doesn't allow secret_add and secret_rm as params. When updating secrets with docker-py, how do I run the equivalent of the following update?

docker service update --secret-rm {old_secret} --secret-add source={new_secret_source},target={new_secret_target} {service_name}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to the service.update() entry point; start by tracing its accepted parameters and the Docker Engine API request it builds. Compare the handling of secret removal and addition with the shown CLI operation. Done means docker-py can express that combined update, with coverage for the resulting request behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
backend-api-design, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.