From cc4475d360b7871ca70ab540e7a9fe6ff21ed33a Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Tue, 8 Feb 2022 17:40:42 +0100 Subject: [PATCH] feat(container): add support for SecretEnvironmentVariables (#1056) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémy Léone --- api/container/v1beta1/container_sdk.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/api/container/v1beta1/container_sdk.go b/api/container/v1beta1/container_sdk.go index 55cff532..76a59852 100644 --- a/api/container/v1beta1/container_sdk.go +++ b/api/container/v1beta1/container_sdk.go @@ -533,6 +533,8 @@ type Container struct { Port uint32 `json:"port"` + SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"` + Region scw.Region `json:"region"` } @@ -636,9 +638,17 @@ type Namespace struct { Description *string `json:"description"` + SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"` + Region scw.Region `json:"region"` } +type Secret struct { + Key string `json:"key"` + + Value *string `json:"value"` +} + type Token struct { Token string `json:"token"` @@ -757,6 +767,8 @@ type CreateNamespaceRequest struct { ProjectID string `json:"project_id"` Description *string `json:"description"` + + SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"` } // CreateNamespace: create a new namespace @@ -809,6 +821,8 @@ type UpdateNamespaceRequest struct { EnvironmentVariables *map[string]string `json:"environment_variables"` Description *string `json:"description"` + + SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"` } // UpdateNamespace: update an existing namespace @@ -1027,6 +1041,8 @@ type CreateContainerRequest struct { Protocol ContainerProtocol `json:"protocol"` Port *uint32 `json:"port"` + + SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"` } // CreateContainer: create a new container @@ -1100,6 +1116,8 @@ type UpdateContainerRequest struct { Protocol ContainerProtocol `json:"protocol"` Port *uint32 `json:"port"` + + SecretEnvironmentVariables []*Secret `json:"secret_environment_variables"` } // UpdateContainer: update an existing container