-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path13_fluentd.sh
executable file
·22 lines (12 loc) · 993 Bytes
/
13_fluentd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/bash
set -eo pipefail
source ./common.sh
cd modules/fluentd
STACK_NAME_A=$(eksctl get nodegroup --cluster "$name" --name "$nodegroupa" -o json | jq -r '.[].StackName')
ROLE_NAME_A=$(aws cloudformation describe-stacks --stack-name $STACK_NAME_A | jq -r '.Stacks[].Outputs[] | select(.OutputKey=="InstanceRoleARN") | .OutputValue' | cut -f2 -d/)
aws iam put-role-policy --role-name $ROLE_NAME_A --policy-name Logs-Policy-For-Worker --policy-document file://k8s-logs-policy.json || true
STACK_NAME_B=$(eksctl get nodegroup --cluster "$name" --name "$nodegroupb" -o json | jq -r '.[].StackName')
ROLE_NAME_B=$(aws cloudformation describe-stacks --stack-name $STACK_NAME_B | jq -r '.Stacks[].Outputs[] | select(.OutputKey=="InstanceRoleARN") | .OutputValue' | cut -f2 -d/)
aws iam put-role-policy --role-name $ROLE_NAME_B --policy-name Logs-Policy-For-Worker --policy-document file://k8s-logs-policy.json || true
eks-fluent-bit-daemonset-rbac.yaml
eks-fluent-bit-daemonset.yaml