kops icon indicating copy to clipboard operation
kops copied to clipboard

kops 1.25: AWS InstanceGroupSpec.InstanceMetadataOptions.HttpTokens is NOT required by default

Open xqzhang2015 opened this issue 1 year ago • 3 comments

/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 avatar Apr 18 '24 03:04 xqzhang2015

@xqzhang2015 Could you try using the latest kOps release?

hakman avatar Apr 18 '24 04:04 hakman

@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.

xqzhang2015 avatar Apr 18 '24 05:04 xqzhang2015

@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.

hakman avatar Apr 18 '24 05:04 hakman

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Jul 17 '24 05:07 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

k8s-triage-robot avatar Aug 16 '24 06:08 k8s-triage-robot

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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 avatar Sep 15 '24 07:09 k8s-triage-robot

@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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

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.

k8s-ci-robot avatar Sep 15 '24 07:09 k8s-ci-robot