Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

How to remove all secrets from a service #1000

Open
marcomsousa opened this issue Mar 26, 2018 · 3 comments
Open

How to remove all secrets from a service #1000

marcomsousa opened this issue Mar 26, 2018 · 3 comments
Labels
help wanted pinned exempt from being marked as stale question

Comments

@marcomsousa
Copy link
Contributor

marcomsousa commented Mar 26, 2018

Not a bug!

¿How to remove all secrets from a service? Without losing labels, networks, anything.

In docker tools it's easy:
docker service update --secret-rm SECRETS_NAME SERVICE_NAME

Docker-client I not know how to do it

ServiceSpec spec = ServiceSpec.builder()
		        .name(service.spec().name())
		        .taskTemplate(service.spec().taskTemplate())
		        .mode(service.spec().mode())
		        .endpointSpec(service.spec().endpointSpec())
		        .updateConfig(service.spec().updateConfig())
		        .build();

docker.updateService(service.id(), service.version().index(), spec);

¿ Secrets is an ImmutableList ?

@stale
Copy link

stale bot commented Sep 24, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 24, 2018
@marcomsousa
Copy link
Contributor Author

+1

@stale stale bot removed the stale label Sep 24, 2018
@davidxia davidxia added help wanted question pinned exempt from being marked as stale labels Sep 25, 2018
@dmandalidis
Copy link
Contributor

Hi @marcomsousa

Since this project went on mature status, please re-open this issue (if it still stands) to https://github.com/dmandalidis/docker-client. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted pinned exempt from being marked as stale question
Projects
None yet
Development

No branches or pull requests

3 participants