Fix envInjector to correctly assign input when not a Deployment

This commit is contained in:
suyiiyii 2025-03-14 21:36:02 +08:00
parent f3e247460a
commit c62e160288
Signed by: suyiiyii
GPG Key ID: 044704CB29B8AD85

View File

@ -21,7 +21,7 @@ envInjector = lambda envs: Envs, input: appsv1.Deployment | any {
"""Inject envs to Deployment"""
_result: any = {}
if input.kind != "Deployment":
input = _result
_result = input
else:
deploy: appsv1.Deployment = input as appsv1.Deployment
secretEnv: [corev1.EnvVar] = [{