mirror of
https://github.com/docker/cli.git
synced 2026-09-24 15:30:10 -05:00
Adjust minimum API version for templated configs/secrets
Also adds a note to the API version history Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: a3efeaad529b945ce5af78c4b08a6ed47399f8d5 Component: engine
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user