Skip to content

Commit

Permalink
Update action file to add depenencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Mar 9, 2022
1 parent 67bdfce commit ba08675
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/k8s-configuration/azext_k8s_configuration/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from .vendored_sdks.v2022_01_01_preview.models import (
KustomizationDefinition,
KustomizationPatchDefinition,
DependsOnDefinition,
)
from .validators import validate_kustomization
from . import consts
Expand Down Expand Up @@ -37,7 +36,7 @@ def to_KustomizationPatchDefinition(self):
class KustomizationAddAction(argparse._AppendAction):
def __call__(self, parser, namespace, values, option_string=None):
validate_kustomization(values)
model_dependency = []
dependencies = None
sync_interval = None
retry_interval = None
timeout = None
Expand All @@ -47,10 +46,6 @@ def __call__(self, parser, namespace, values, option_string=None):
key, value = item.split("=", 1)
if key in consts.DEPENDENCY_KEYS:
dependencies = parse_dependencies(value)
for dep in dependencies:
model_dependency.append(
DependsOnDefinition(kustomization_name=dep)
)
elif key in consts.SYNC_INTERVAL_KEYS:
sync_interval = value
elif key in consts.RETRY_INTERVAL_KEYS:
Expand All @@ -67,7 +62,7 @@ def __call__(self, parser, namespace, values, option_string=None):
parser,
namespace,
InternalKustomizationDefinition(
depends_on=model_dependency,
depends_on=dependencies,
sync_interval_in_seconds=parse_duration(sync_interval),
retry_interval_in_seconds=parse_duration(retry_interval),
timeout_in_seconds=parse_duration(timeout),
Expand Down

0 comments on commit ba08675

Please sign in to comment.