Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Skip ASG using LaunchTemplate #80

Merged
merged 2 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ RUN pip install pipenv==2018.10.13
WORKDIR /src
COPY Pipfile /src/
COPY Pipfile.lock /src/
COPY binaries/kubectl-v1.12.3-linux-amd64 /usr/local/bin/kubectl
RUN wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.18.16/bin/linux/amd64/kubectl
RUN chmod +x /usr/local/bin/kubectl

# This will be used as Main Image
FROM Base AS Main
Expand All @@ -18,5 +19,4 @@ RUN chmod u+x minion_manager.py
FROM Base AS Dev

RUN apk add --no-cache build-base openssl-dev libffi-dev
RUN pipenv install --system --deploy --dev
#COPY . /src
RUN pipenv install --system --deploy --dev
4 changes: 4 additions & 0 deletions cloud_provider/aws/aws_minion_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ def get_asgs_with_tags(cluster_name, ac_client):
resp = ac_client.describe_auto_scaling_groups(MaxRecords=100)
for r in resp["AutoScalingGroups"]:
is_candidate = False
# skipping if ASG is using LaunchTemplate as it is not supported
if not r.get("LaunchConfigurationName"):
logger.warn("Skipping: asg %s is using LaunchTemplate", r.get("AutoScalingGroupName"))
continue
# Scan for KubernetesCluster name. If the value matches the cluster_name
# provided in the input, set 'is_candidate'.
for tag in r['Tags']:
Expand Down