Skip to content

Commit 93842a2

Browse files
chore(deploy): upgrade default function to 1c2g (#154)
* chore(deploy): upgrade default function to 1c2g * add auth option
1 parent 96e8a5c commit 93842a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

veadk/integrations/ve_faas/ve_faas.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import json
16+
import os
1617
import time
1718

1819
import requests
@@ -118,6 +119,7 @@ def _create_function(self, function_name: str, path: str):
118119
runtime="native-python3.10/v1",
119120
request_timeout=1800,
120121
envs=envs,
122+
memory_mb=2048,
121123
)
122124
)
123125

@@ -141,6 +143,8 @@ def _create_application(
141143
upstream_name: str,
142144
service_name: str,
143145
):
146+
enable_key_auth = os.getenv("VEFAAS_ENABLE_KEY_AUTH", "true").lower() == "true"
147+
144148
response = ve_request(
145149
request_body={
146150
"Name": application_name,
@@ -152,7 +156,7 @@ def _create_application(
152156
"GatewayName": gateway_name,
153157
"ServiceName": service_name,
154158
"UpstreamName": upstream_name,
155-
"EnableKeyAuth": True,
159+
"EnableKeyAuth": enable_key_auth,
156160
"EnableMcpSession": True,
157161
},
158162
"TemplateId": self.template_id,

0 commit comments

Comments
 (0)