Skip to content

Commit 9e35d48

Browse files
authored
feat(apigw-manager/definition.yaml): support env vars (TencentBlueKing#224)
1 parent 84d8791 commit 9e35d48

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

sdks/apigw-manager/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "apigw-manager"
3-
version = "4.0.3"
3+
version = "4.0.4"
44
description = "The SDK for managing blueking gateway resource."
55
readme = "README.md"
66
authors = ["blueking <blueking@tencent.com>"]

sdks/apigw-manager/src/apigw_manager/drf/management/commands/data/definition.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,21 @@ stages:
2727
{% if settings.BK_APIGW_STAGE_BACKEND_SUBPATH %}
2828
vars:
2929
api_sub_path: {{ settings.BK_APIGW_STAGE_BACKEND_SUBPATH }}
30+
{% if settings.BK_APIGW_STAGE_ENV_VARS %}
31+
{% for key, value in settings.BK_APIGW_STAGE_ENV_VARS.items %}
32+
{{ key }}: "{{ value }}"
33+
{% endfor %}
34+
{% endif %}
35+
{% else %}
36+
{% if settings.BK_APIGW_STAGE_ENV_VARS %}
37+
vars:
38+
{% for key, value in settings.BK_APIGW_STAGE_ENV_VARS.items %}
39+
{{ key }}: "{{ value }}"
40+
{% endfor %}
3041
{% else %}
3142
vars: {}
3243
{% endif %}
44+
{% endif %}
3345
backends:
3446
- name: "default"
3547
config:

0 commit comments

Comments
 (0)