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

Commit

Permalink
Bump k8scc to fix issues with IMDS v2. (#3738)
Browse files Browse the repository at this point in the history
* Bump k8scc to fix issues with IMDS v2.

* Bump k8scc to fix issues with IMDS v2.

* Bump k8scc to fix issues with IMDS v2.
  • Loading branch information
whites11 authored Apr 2, 2024
1 parent 0015a1d commit a9c6a86
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Bump k8scc to fix issues with IMDS v2.

## [16.1.0] - 2024-03-04

### Changed
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/giantswarm/certs/v4 v4.0.0
github.com/giantswarm/ipam v0.3.0
github.com/giantswarm/k8sclient/v7 v7.2.0
github.com/giantswarm/k8scloudconfig/v18 v18.1.0
github.com/giantswarm/k8scloudconfig/v18 v18.2.0
github.com/giantswarm/k8smetadata v0.24.0
github.com/giantswarm/kubelock/v4 v4.0.0
github.com/giantswarm/microendpoint v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ github.com/giantswarm/ipam v0.3.0 h1:QNb4k5Zu6nGsqJkAM7dLM1J6TiUP+LGjo9CPR+ewZBk
github.com/giantswarm/ipam v0.3.0/go.mod h1:xG4cMEKwHlbE0aZ7x2H5j7o81U13LIStA73XCECdk+I=
github.com/giantswarm/k8sclient/v7 v7.2.0 h1:twh4egNcuTJEH7R/hYVhs8nwEXPlr0u/o9CB1Kv9H9A=
github.com/giantswarm/k8sclient/v7 v7.2.0/go.mod h1:kZGRtOqe4vAKXtWm69tsj2Q9CpWlwzpa1uP1lfDtjlE=
github.com/giantswarm/k8scloudconfig/v18 v18.1.0 h1:tV4QAt0f948Pg5+7bUxsTKJv3LczUOLhjtTcEeVxT+k=
github.com/giantswarm/k8scloudconfig/v18 v18.1.0/go.mod h1:gc4Yb9DHzaOR5wVZdP1bAcNHGNKv1a4qIhs6nHkotuU=
github.com/giantswarm/k8scloudconfig/v18 v18.2.0 h1:X2Vrn65OyNCSO/hoviNQ9h1dxEb3hBp5dD140IVPwDQ=
github.com/giantswarm/k8scloudconfig/v18 v18.2.0/go.mod h1:bt8DfLZRry6VD4UYpV2vkL8+NojjKikg4Jxh20fFDYA=
github.com/giantswarm/k8smetadata v0.24.0 h1:mAIgH4W06qx8X5rV9QEtJhCJLn8DMXfTfNVZi5ROp4c=
github.com/giantswarm/k8smetadata v0.24.0/go.mod h1:QiQAyaZnwco1U0lENLF0Kp4bSN4dIPwIlHWEvUo3ES8=
github.com/giantswarm/kubelock/v4 v4.0.0 h1:qvFGOIlDthAD8r32WcorT8R4gp3c1dpnDbHuLsDU2ZA=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if test $(cut -d '.' -f1 /proc/uptime) -lt 900; then
fi
# AWS Metadata
export INSTANCEID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id 2> /dev/null)
export INSTANCEID=$(/opt/imds-client /latest/meta-data/instance-id)
# Additional ENVs
. /etc/network-environment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ set -o nounset
set -o pipefail
# AWS Metadata
export INSTANCEID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id 2> /dev/null)
export INSTANCEID=$(/opt/imds-client /latest/meta-data/instance-id)
# AWS Autoscaling Group Name
export AUTOSCALINGGROUP=$(docker run --rm {{ .RegistryDomain }}/giantswarm/awscli:2.7.35 autoscaling describe-auto-scaling-instances --instance-ids=$INSTANCEID --query 'AutoScalingInstances[*].AutoScalingGroupName' --output text)
Expand Down
2 changes: 1 addition & 1 deletion service/internal/cloudconfig/template/set-hostname.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Before=k8s-kubelet.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c "hostnamectl set-hostname $(curl http://169.254.169.254/latest/meta-data/local-hostname)"
ExecStart=/bin/bash -c "hostnamectl set-hostname $(/opt/imds-client /latest/meta-data/local-hostname)"
[Install]
WantedBy=multi-user.target
Expand Down

0 comments on commit a9c6a86

Please sign in to comment.