Skip to content

Commit

Permalink
feat: config.in_cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
knechtionscoding committed Apr 5, 2023
1 parent a42c1aa commit 35bb4f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ def delete_image(client: boto3.client, image: dict): # pragma: no cover
def main(): # pragma: no cover
deletable_images = []
keepable_images = []
config.load_kube_config()
try:
config.load_kube_config()
except config.config_exception.ConfigException:
config.load_incluster_config()

client = boto3.client("ecr")
if os.getenv("AWS_REGISTRY_ID"):
Expand Down

0 comments on commit 35bb4f8

Please sign in to comment.