From 2373d79cb1bdb96158551dffeb3b0a10a82f3754 Mon Sep 17 00:00:00 2001 From: Ed Beaty Date: Thu, 12 Dec 2024 01:37:49 -0800 Subject: [PATCH] linted --- modules/aws/node/data.tf | 2 +- modules/aws/node/main.tf | 14 +++++++------- tests/ut/test_node.py | 5 ++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/aws/node/data.tf b/modules/aws/node/data.tf index 9f656b3..268b75e 100644 --- a/modules/aws/node/data.tf +++ b/modules/aws/node/data.tf @@ -11,4 +11,4 @@ data "aws_ec2_instance_type" "this" { data "aws_eks_cluster" "this" { name = var.cluster_name -} \ No newline at end of file +} diff --git a/modules/aws/node/main.tf b/modules/aws/node/main.tf index 3229db5..158578e 100644 --- a/modules/aws/node/main.tf +++ b/modules/aws/node/main.tf @@ -156,19 +156,19 @@ resource "aws_instance" "this" { user_data = templatefile( "${path.module}/templates/user-data.tftpl", { - name = data.aws_eks_cluster.this.name - api_endpoint = data.aws_eks_cluster.this.endpoint + name = data.aws_eks_cluster.this.name + api_endpoint = data.aws_eks_cluster.this.endpoint certificate_authority = data.aws_eks_cluster.this.certificate_authority[0].data - cidr = data.aws_eks_cluster.this.kubernetes_network_config[0].service_ipv4_cidr + cidr = data.aws_eks_cluster.this.kubernetes_network_config[0].service_ipv4_cidr kubelet_flags = concat( ["--node-labels=${local.kubelet_node_labels_arg}"], var.kubelet_extra_args ) - hugepages_gb = local.hugepages_gb - isolated_cores = local.isolated_cores + hugepages_gb = local.hugepages_gb + isolated_cores = local.isolated_cores additional_user_data = var.user_data - xrd_bootstrap = local.is_xrd_ami - private_ip = var.private_ip_address + xrd_bootstrap = local.is_xrd_ami + private_ip = var.private_ip_address } ) diff --git a/tests/ut/test_node.py b/tests/ut/test_node.py index 36ffe79..904df50 100644 --- a/tests/ut/test_node.py +++ b/tests/ut/test_node.py @@ -1,9 +1,9 @@ import base64 import json import subprocess +import textwrap import uuid from pathlib import Path -import textwrap from typing import Any import pytest @@ -318,8 +318,7 @@ def test_kubelet_extra_args(ec2, tf: Terraform, base_vars: dict[str, Any]): " flags:\n" f" - --node-labels=ios-xr.cisco.com/name={vars['name']}\n" " - foo\n" - " - bar\n" - in user_data + " - bar\n" in user_data )