Skip to content

Commit

Permalink
fix: Update to 0.3.0 and adjust image verification logging (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeacom authored Feb 8, 2023
1 parent c200b80 commit 9e94a28
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 23 deletions.
2 changes: 1 addition & 1 deletion eksupgrade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"""

__version__: str = "0.2.0"
__version__: str = "0.3.0"
22 changes: 2 additions & 20 deletions eksupgrade/src/k8s_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,10 +462,7 @@ def _container_spec(image_name: str, image_uri: str, image_tag: str) -> Dict[str
apps_v1_api.patch_namespaced_daemon_set(
name="kube-proxy", namespace="kube-system", body=body, pretty=True
)
_update_response_proxy = update_eks_addon(
cluster_name, "kube-proxy", region_name, kubeproxy_new
)
logger.info("Update kube-proxy Call: %s", _update_response_proxy)
update_eks_addon(cluster_name, "kube-proxy", region_name, kubeproxy_new)
flag_proxy = False
time.sleep(20)
new_pod_name = sort_pods(
Expand Down Expand Up @@ -512,8 +509,7 @@ def _container_spec(image_name: str, image_uri: str, image_tag: str) -> Dict[str
apps_v1_api.patch_namespaced_daemon_set(
namespace="kube-system", name="aws-node", body=body, pretty=True
)
_update_response_cni = update_eks_addon(cluster_name, "vpc-cni", region_name, cni_new)
logger.info("Update CNI Call: %s", _update_response_cni)
update_eks_addon(cluster_name, "vpc-cni", region_name, cni_new)
flag_vpc = False
time.sleep(20)
new_pod_name = sort_pods(
Expand All @@ -532,20 +528,6 @@ def _container_spec(image_name: str, image_uri: str, image_tag: str) -> Dict[str
raise error


def delete_pd_policy(pd_name: str, namespace: str = "default") -> None:
"""Attempt to delete a Pod Disruption policy."""
try:
api_cli = client.PolicyV1beta1Api()
except AttributeError:
api_cli = client.PolicyV1Api()

try:
api_response = api_cli.delete_namespaced_pod_disruption_budget(name=pd_name, namespace=namespace)
logger.debug(api_response)
except ApiException as error:
logger.error("Exception when calling PolicyV1beta1Api->delete_namespaced_pod_disruption_budget: %s", error)


def is_cluster_auto_scaler_present(cluster_name: str, region: str) -> List[Union[int, str]]:
"""Determine whether or not cluster autoscaler is present."""
loading_config(cluster_name=cluster_name, regionName=region)
Expand Down
2 changes: 1 addition & 1 deletion eksupgrade/src/preflight_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def check_addons_params(
if image_part_1 and image_part_2:
report["addon_params"][name] = {"image": config["image"]}
customer_report["addons"][name]["image"] = "Image Verified"
logger.error("Image verified")
logger.info("Image verified")
else:
customer_report["addons"][name]["image"] = "Image Verification Failed"
logger.error("Image verification failed")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "eksupgrade"
version = "0.2.0"
version = "0.3.0"
description = "The Amazon EKS cluster upgrade utility"
authors = ["EKS Upgrade Maintainers <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 9e94a28

Please sign in to comment.