Skip to content

Commit 009a6cc

Browse files
committed
fix: Ansible 배포 블로커 3건 수정
- Helm 설치 추가 (gateway-fabric role에서 필요) - kubeadm join에 --node-name 추가 (label 시 노드 이름 불일치 방지) - Calico YAML cidr 값 Jinja2 인용 수정 - SSM Agent snap → deb 패키지로 변경 (ARM64 안정성)
1 parent e0750b4 commit 009a6cc

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

IaC/3-v3/ansible/roles/calico/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
spec:
2424
calicoNetwork:
2525
ipPools:
26-
- cidr: {{ pod_cidr }}
26+
- cidr: "{{ pod_cidr }}"
2727
encapsulation: VXLAN
2828
natOutgoing: Enabled
2929
mtu: {{ calico_vxlan_mtu }}

IaC/3-v3/ansible/roles/kubeadm-init/tasks/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
set_fact:
4545
kubeadm_join_command: "{{ join_command.stdout }}"
4646

47+
- name: Install Helm
48+
shell: |
49+
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
50+
args:
51+
creates: /usr/local/bin/helm
52+
4753
- name: Label CP node
4854
command: >
4955
kubectl label node {{ inventory_hostname }}

IaC/3-v3/ansible/roles/kubeadm-join/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
register: kubelet_conf
1010

1111
- name: Join cluster
12-
command: "{{ hostvars[groups['role_control_plane'][0]].kubeadm_join_command }}"
12+
command: "{{ hostvars[groups['role_control_plane'][0]].kubeadm_join_command }} --node-name={{ inventory_hostname }}"
1313
when: not kubelet_conf.stat.exists
1414

1515
- name: Label worker node (from CP)

IaC/3-v3/aws/modules/k8s-nodes/main.tf

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ resource "aws_instance" "control_plane" {
6666
locals {
6767
ssm_user_data = <<-EOF
6868
#!/bin/bash
69-
snap install amazon-ssm-agent --classic
70-
systemctl enable snap.amazon-ssm-agent.amazon-ssm-agent.service
71-
systemctl start snap.amazon-ssm-agent.amazon-ssm-agent.service
69+
mkdir -p /tmp/ssm && cd /tmp/ssm
70+
curl -fsSL "https://s3.amazonaws.com/ec2-downloads-ssm/latest/debian_arm64/amazon-ssm-agent.deb" -o amazon-ssm-agent.deb
71+
dpkg -i amazon-ssm-agent.deb
72+
systemctl enable amazon-ssm-agent
73+
systemctl start amazon-ssm-agent
7274
EOF
7375

7476
# workers_per_az × 3 AZ → 플랫 맵 생성

0 commit comments

Comments
 (0)