From c8bff05881b216287860245de0af9ae7093a8349 Mon Sep 17 00:00:00 2001 From: David Lechevalier Date: Tue, 24 Sep 2024 12:52:06 +0200 Subject: [PATCH] Adjust CLI help menu for new environment variable behavior with secret --- docs/reference.md | 12 ++++++++---- pkg/koyeb/services.go | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/reference.md b/docs/reference.md index b27b4feb..add55838 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -290,7 +290,8 @@ See examples of koyeb service create --help --docker-entrypoint strings Docker entrypoint. To provide multiple arguments, use the --docker-entrypoint flag multiple times. --docker-private-registry-secret string Docker private registry secret --env strings Update service environment variables using the format KEY=VALUE, for example --env FOO=bar - To use the value of a secret as an environment variable, specify the secret name preceded by @, for example --env FOO=@bar + To use the value of a secret as an environment variable, use the following syntax: + --env FOO={{secret.bar}} To delete an environment variable, prefix its name with '!', for example --env '!FOO' --git string Git repository @@ -577,7 +578,8 @@ koyeb deploy / [flags] --deployment-strategy STRATEGY Deployment strategy, either "rolling" (default), "canary", "blue-green" or "immediate". --env strings Update service environment variables using the format KEY=VALUE, for example --env FOO=bar - To use the value of a secret as an environment variable, specify the secret name preceded by @, for example --env FOO=@bar + To use the value of a secret as an environment variable, use the following syntax: + --env FOO={{secret.bar}} To delete an environment variable, prefix its name with '!', for example --env '!FOO' -h, --help help for deploy @@ -1382,7 +1384,8 @@ $> koyeb service create myservice --app myapp --docker nginx --port 80:tcp --docker-entrypoint strings Docker entrypoint. To provide multiple arguments, use the --docker-entrypoint flag multiple times. --docker-private-registry-secret string Docker private registry secret --env strings Update service environment variables using the format KEY=VALUE, for example --env FOO=bar - To use the value of a secret as an environment variable, specify the secret name preceded by @, for example --env FOO=@bar + To use the value of a secret as an environment variable, use the following syntax: + --env FOO={{secret.bar}} To delete an environment variable, prefix its name with '!', for example --env '!FOO' --git string Git repository @@ -1802,7 +1805,8 @@ $> koyeb service update myapp/myservice --port 80:tcp --route '!/' --docker-entrypoint strings Docker entrypoint. To provide multiple arguments, use the --docker-entrypoint flag multiple times. --docker-private-registry-secret string Docker private registry secret --env strings Update service environment variables using the format KEY=VALUE, for example --env FOO=bar - To use the value of a secret as an environment variable, specify the secret name preceded by @, for example --env FOO=@bar + To use the value of a secret as an environment variable, use the following syntax: + --env FOO={{secret.bar}} To delete an environment variable, prefix its name with '!', for example --env '!FOO' --git string Git repository diff --git a/pkg/koyeb/services.go b/pkg/koyeb/services.go index 9ca71d3b..af3e1ac6 100644 --- a/pkg/koyeb/services.go +++ b/pkg/koyeb/services.go @@ -314,7 +314,7 @@ func (h *ServiceHandler) addServiceDefinitionFlagsForAllSources(flags *pflag.Fla "env", []string{}, "Update service environment variables using the format KEY=VALUE, for example --env FOO=bar\n"+ - "To use the value of a secret as an environment variable, specify the secret name preceded by @, for example --env FOO=@bar\n"+ + "To use the value of a secret as an environment variable, use the following syntax: --env FOO={{secret.bar}}\n"+ "To delete an environment variable, prefix its name with '!', for example --env '!FOO'\n", ) flags.String("instance-type", "nano", "Instance type")