aws / amazon-vpc-cni-k8s

Networking plugin repository for pod networking in Kubernetes using Elastic Network Interfaces on AWS
Apache License 2.0
2.28k stars 743 forks source link

Use the correct git tag version when building from master branch. #3078

Closed orsenthil closed 1 month ago

orsenthil commented 1 month ago

What type of PR is this?

Which issue does this PR fix?:

The master branch pointed to a old tag, so all the latest commits were pushed to these tags v1.12.0-418-g612e8177 with prefix v1.12.0-

commit 612e81771c5641b0a58b37d9727526721f01e21a (HEAD -> master, origin/master, origin/HEAD, ref)
Author: Senthil Kumaran <senthilx@amazon.com>
Date:   Fri Oct 18 12:06:51 2024 -0700

    Update Limits and Add New Instance Types. (#3077)
[ec2-user@ip-172-32-32-162 amazon-vpc-cni-k8s]$ git describe --tags --always --dirty
v1.12.0-418-g612e8177

It will be better to use the master as prefix, with this change the tag will now look like

amazon/amazon-k8s-cni:master-612e8177

Testing

[ec2-user@ip-172-32-32-162 amazon-vpc-cni-k8s]$ make docker
docker build --build-arg golang_image="public.ecr.aws/eks-distro-build-tooling/golang:1.22.5-gcc-al2" --build-arg base_image="public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-iptables:latest.2" --network=host  \
        -f scripts/dockerfiles/Dockerfile.release \
        -t "amazon/amazon-k8s-cni:master-612e8177" \