From e09ff74ed56aff8bcf6fe33dcc550c15f8c8d53a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 21 Feb 2018 13:50:48 +0100 Subject: [PATCH] Adjust minimum API version for templated configs/secrets Also adds a note to the API version history Signed-off-by: Sebastiaan van Stijn Upstream-commit: a3efeaad529b945ce5af78c4b08a6ed47399f8d5 Component: engine --- components/engine/api/server/router/swarm/cluster_routes.go | 4 ++-- components/engine/docs/api/version-history.md | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/engine/api/server/router/swarm/cluster_routes.go b/components/engine/api/server/router/swarm/cluster_routes.go index 865ed6add6..6b13bf331d 100644 --- a/components/engine/api/server/router/swarm/cluster_routes.go +++ b/components/engine/api/server/router/swarm/cluster_routes.go @@ -373,7 +373,7 @@ func (sr *swarmRouter) createSecret(ctx context.Context, w http.ResponseWriter, return err } version := httputils.VersionFromContext(ctx) - if secret.Templating != nil && versions.LessThan(version, "1.36") { + if secret.Templating != nil && versions.LessThan(version, "1.37") { return errdefs.InvalidParameter(errors.Errorf("secret templating is not supported on the specified API version: %s", version)) } @@ -445,7 +445,7 @@ func (sr *swarmRouter) createConfig(ctx context.Context, w http.ResponseWriter, } version := httputils.VersionFromContext(ctx) - if config.Templating != nil && versions.LessThan(version, "1.36") { + if config.Templating != nil && versions.LessThan(version, "1.37") { return errdefs.InvalidParameter(errors.Errorf("config templating is not supported on the specified API version: %s", version)) } diff --git a/components/engine/docs/api/version-history.md b/components/engine/docs/api/version-history.md index 3405083776..51111bf061 100644 --- a/components/engine/docs/api/version-history.md +++ b/components/engine/docs/api/version-history.md @@ -18,6 +18,10 @@ keywords: "API, Docker, rcli, REST, documentation" [Docker Engine API v1.37](https://docs.docker.com/engine/api/v1.36/) documentation * `POST /containers/create` and `POST /services/create` now supports exposing SCTP ports. +* `POST /configs/create` and `POST /configs/{id}/create` now accept a `Templating` driver. +* `GET /configs` and `GET /configs/{id}` now return the `Templating` driver of the config. +* `POST /secrets/create` and `POST /secrets/{id}/create` now accept a `Templating` driver. +* `GET /secrets` and `GET /secrets/{id}` now return the `Templating` driver of the secret. ## v1.36 API changes