Skip to content

Commit

Permalink
feature: PaaS 容器部署适配 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuoZhuoCrayon committed Sep 17, 2021
1 parent 61e4094 commit cb28232
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 29 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,4 @@ tests/postman/bkman


.helm
!env/
2 changes: 1 addition & 1 deletion env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
specific language governing permissions and limitations under the License.
"""

from .paas_version_diff import * # noqa
from .paas_version_diff.paas import * # noqa
28 changes: 0 additions & 28 deletions env/paas_version_diff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,3 @@
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""
from apps.utils.env import get_type_env

from .. import constants

__all__ = [
"ENVIRONMENT",
"BK_BACKEND_CONFIG",
"BKAPP_IS_PAAS_DEPLOY",
"BK_COMPONENT_API_URL",
"BK_NODEMAN_HOST",
"BK_NODEMAN_BACKEND_HOST",
"BK_IAM_APP_CODE",
"BK_IAM_SAAS_HOST",
"BK_IAM_RESOURCE_API_HOST",
]


BKPAAS_MAJOR_VERSION = get_type_env(key="BKPAAS_MAJOR_VERSION", default=constants.BkPaaSVersion.V2.value, _type=int)
BKAPP_IS_V3_CONTAINER = get_type_env(key="BKAPP_IS_V3_CONTAINER", default=False, _type=bool)


if BKPAAS_MAJOR_VERSION == constants.BkPaaSVersion.V3.value:
if BKAPP_IS_V3_CONTAINER:
from env.paas_version_diff.paas_v3_container import * # noqa
else:
from env.paas_version_diff.paas_v3 import * # noqa
else:
from env.paas_version_diff.paas_v2 import * # noqa

0 comments on commit cb28232

Please sign in to comment.