kops 1.25: AWS InstanceGroupSpec.InstanceMetadataOptions.HttpTokens is NOT required by default
/kind bug
1. What kops version are you running? The command kops version, will display
this information.
$ kops version
Client version: 1.25.4 (git-v1.25.4)
2. What Kubernetes version are you running? kubectl version will print the
version if a cluster is running or provide the Kubernetes version specified as
a kops flag.
$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.13", GitCommit:"5244794d27b4cc68290bc496b00e248857ac8b47", GitTreeState:"clean", BuildDate:"2023-08-24T00:01:27Z", GoVersion:"go1.20.7", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.13", GitCommit:"5244794d27b4cc68290bc496b00e248857ac8b47", GitTreeState:"clean", BuildDate:"2023-08-23T23:54:36Z", GoVersion:"go1.20.7", Compiler:"gc", Platform:"linux/amd64"}
3. What cloud provider are you using? AWS
4. What commands did you run? What is the simplest way to reproduce this issue?
$ cat test.yaml
apiVersion: kops.k8s.io/v1alpha2
kind: InstanceGroup
metadata:
labels:
kops.k8s.io/cluster: xyz
name: mytest-IG
spec:
associatePublicIp: false
cloudLabels:
K8sClusterType: Kops
k8s.io/cluster-autoscaler: enabled
image: ami-0384f963b10435324
machineType: m5.large
maxSize: 5
minSize: 1
nodeLabels:
node-role: my-misc
role: Node
rootVolumeOptimization: true
rootVolumeSize: 30
subnets:
- us-east-1a
- us-east-1b
- us-east-1c
taints:
- dedicated=my-misc:NoSchedule
kops create -f test.yaml
5. What happened after the commands executed?
mytest-IG created an AWS instance **without** setting instanceMetadata.httpTokens as required.
6. What did you expect to happen?
https://github.com/kubernetes/kops/blob/dc41ea691ae6a1798d4ee4954b2dd327762fd588/upup/pkg/fi/cloudup/new_cluster.go#L980
mytest-IG will create an AWS instance **with** setting instanceMetadata.httpTokens as required.
7. Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml to display your cluster manifest.
You may want to remove your cluster name and other sensitive information.
any k8s cluster
8. Please run the commands with most verbose logging by adding the -v 10 flag.
Paste the logs into this report, or in a gist and provide the gist link here.
maybe not need now, mainly a question to confirm.
9. Anything else do we need to know?
maybe not need now, mainly a question to confirm.
@xqzhang2015 Could you try using the latest kOps release?
@hakman Yes, I could. Here I'm just curious about how the mechanism/code works here(in 1.25), which maybe I don't know about it thoroughly.
@hakman Yes, I could. Here I'm just curious about how the mechanism/code works here(in 1.25), which maybe I don't know about it thoroughly.
Based on what I see in 1.25 code, should be part of the IG spec. In later kOps versions, it is implicit.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.