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

Commit

Permalink
Skip ASG using LaunchTemplate (#80)
Browse files Browse the repository at this point in the history
* Update kubectl to 1.18
* Skip asg using LaunchTemplate

Signed-off-by: Venkata Gunapati <Venkata_Gunapati@intuit.com>
  • Loading branch information
vgunapati committed Mar 18, 2021
1 parent e8fbc0c commit 62836b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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

0 comments on commit 62836b4

Please sign in to comment.