Browse code

API: deprecate /info "ClusterStore" and "ClusterAdvertise" fields

These fields will now be omitted when empty.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2020/03/04 02:00:56
Showing 4 changed files
... ...
@@ -4186,7 +4186,7 @@ definitions:
4186 4186
 
4187 4187
           <p><br /></p>
4188 4188
 
4189
-          > **Note**: This field is only propagated when using standalone Swarm
4189
+          > **Deprecated**: This field is only propagated when using standalone Swarm
4190 4190
           > mode, and overlay networking using an external k/v store. Overlay
4191 4191
           > networks with Swarm mode enabled use the built-in raft store, and
4192 4192
           > this field will be empty.
... ...
@@ -4200,7 +4200,7 @@ definitions:
4200 4200
 
4201 4201
           <p><br /></p>
4202 4202
 
4203
-          > **Note**: This field is only propagated when using standalone Swarm
4203
+          > **Deprecated**: This field is only propagated when using standalone Swarm
4204 4204
           > mode, and overlay networking using an external k/v store. Overlay
4205 4205
           > networks with Swarm mode enabled use the built-in raft store, and
4206 4206
           > this field will be empty.
... ...
@@ -194,8 +194,8 @@ type Info struct {
194 194
 	Labels             []string
195 195
 	ExperimentalBuild  bool
196 196
 	ServerVersion      string
197
-	ClusterStore       string
198
-	ClusterAdvertise   string
197
+	ClusterStore       string `json:",omitempty"` // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated
198
+	ClusterAdvertise   string `json:",omitempty"` // Deprecated: host-discovery and overlay networks with external k/v stores are deprecated
199 199
 	Runtimes           map[string]Runtime
200 200
 	DefaultRuntime     string
201 201
 	Swarm              swarm.Info
... ...
@@ -159,15 +159,18 @@ type CommonConfig struct {
159 159
 	// ClusterStore is the storage backend used for the cluster information. It is used by both
160 160
 	// multihost networking (to store networks and endpoints information) and by the node discovery
161 161
 	// mechanism.
162
+	// Deprecated: host-discovery and overlay networks with external k/v stores are deprecated
162 163
 	ClusterStore string `json:"cluster-store,omitempty"`
163 164
 
164 165
 	// ClusterOpts is used to pass options to the discovery package for tuning libkv settings, such
165 166
 	// as TLS configuration settings.
167
+	// Deprecated: host-discovery and overlay networks with external k/v stores are deprecated
166 168
 	ClusterOpts map[string]string `json:"cluster-store-opts,omitempty"`
167 169
 
168 170
 	// ClusterAdvertise is the network endpoint that the Engine advertises for the purpose of node
169 171
 	// discovery. This should be a 'host:port' combination on which that daemon instance is
170 172
 	// reachable by other hosts.
173
+	// Deprecated: host-discovery and overlay networks with external k/v stores are deprecated
171 174
 	ClusterAdvertise string `json:"cluster-advertise,omitempty"`
172 175
 
173 176
 	// MaxConcurrentDownloads is the maximum number of downloads that
... ...
@@ -17,6 +17,9 @@ keywords: "API, Docker, rcli, REST, documentation"
17 17
 
18 18
 [Docker Engine API v1.41](https://docs.docker.com/engine/api/v1.41/) documentation
19 19
 
20
+* The `ClusterStore` and `ClusterAdvertise` fields in `GET /info` are deprecated
21
+  and are now omitted if they contain an empty value. This change is not versioned,
22
+  and affects all API versions if the daemon has this patch.
20 23
 * The `filter` (singular) query parameter, which was deprecated in favor of the
21 24
   `filters` option in Docker 1.13, has now been removed from the `GET /images/json`
22 25
   endpoint. The parameter remains available when using API version 1.40 or below.