From c4a237848ed1e73868072d284d9105ba6120a513 Mon Sep 17 00:00:00 2001 From: Prakarsh Date: Fri, 14 May 2021 00:21:31 +0530 Subject: [PATCH] Updated ssm agent installer to work on all linux distributions --- charts/aws-ssm-agent-installer/Chart.yaml | 2 +- charts/aws-ssm-agent-installer/templates/daemonset.yaml | 4 ++-- charts/aws-ssm-agent-installer/values.yaml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/charts/aws-ssm-agent-installer/Chart.yaml b/charts/aws-ssm-agent-installer/Chart.yaml index 8c52a611..8d4a6e94 100644 --- a/charts/aws-ssm-agent-installer/Chart.yaml +++ b/charts/aws-ssm-agent-installer/Chart.yaml @@ -2,7 +2,7 @@ name: aws-ssm-agent-installer appVersion: 0.1.0 description: Chart to enable AWS SSM Agent on EKS nodes engine: gotpl -version: 0.10.1 +version: 0.10.2 maintainers: - email: prakarsh@devtron.ai name: Prakarsh diff --git a/charts/aws-ssm-agent-installer/templates/daemonset.yaml b/charts/aws-ssm-agent-installer/templates/daemonset.yaml index c564846f..f5a84858 100644 --- a/charts/aws-ssm-agent-installer/templates/daemonset.yaml +++ b/charts/aws-ssm-agent-installer/templates/daemonset.yaml @@ -19,8 +19,8 @@ spec: containers: - args: - -c - - echo '* * * * * root yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm - & rm -rf /etc/cron.d/ssmstart' > /etc/cron.d/ssmstart & tail -f > /dev/null + - echo '* * * * * {{ .Values.installUser }} {{ .Values.installCommand }} {{ .Values.installUrl }} + && rm -rf {{ .Values.installCronPath }}/ssmstart' > {{ .Values.installCronPath }}/ssmstart & tail -f > /dev/null command: - /bin/bash image: quay.io/devtron/k8s-utils:amazonlinux-latest diff --git a/charts/aws-ssm-agent-installer/values.yaml b/charts/aws-ssm-agent-installer/values.yaml index 0ded83de..9c62bcfe 100644 --- a/charts/aws-ssm-agent-installer/values.yaml +++ b/charts/aws-ssm-agent-installer/values.yaml @@ -1,4 +1,7 @@ +installUser: "root" +installCommand: "yum install -y" installUrl: "https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm" +installCronPath: "/etc/cron.d" daemonsetapiversion: apps/v1 #For Clusters running on k8s < 1.16 use extensions/v1beta1 tolerations: - key: CriticalAddonsOnly