MCPcopy Index your code
hub / github.com/docker/cli / updateSwarmSpec

Function updateSwarmSpec

cli/command/swarm/ca.go:100–111  ·  view source on GitHub ↗
(spec *swarm.Spec, flags *pflag.FlagSet, opts caOptions)

Source from the content-addressed store, hash-verified

98}
99
100func updateSwarmSpec(spec *swarm.Spec, flags *pflag.FlagSet, opts caOptions) {
101 caCert := opts.rootCACert.Contents()
102 caKey := opts.rootCAKey.Contents()
103 opts.mergeSwarmSpecCAFlags(spec, flags, &caCert)
104
105 spec.CAConfig.SigningCACert = caCert
106 spec.CAConfig.SigningCAKey = caKey
107
108 if caKey == "" && caCert == "" {
109 spec.CAConfig.ForceRotate++
110 }
111}
112
113func attach(ctx context.Context, dockerCLI command.Cli, opts caOptions) error {
114 apiClient := dockerCLI.Client()

Callers 1

runCAFunction · 0.85

Calls 2

ContentsMethod · 0.80
mergeSwarmSpecCAFlagsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…