This repository has been archived by the owner on Aug 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
PMM-8182 add kubectl 1.21.1 #269
Open
BupycHuk
wants to merge
2
commits into
main
Choose a base branch
from
PMM-8182-add-kubectl-1.21.1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,26 +3,31 @@ | |
%global commit_aws d7c0b2e9131faabb2b09dd804a35ee03822f8447 | ||
%global shortcommit_aws %(c=%{commit_aws}; echo ${c:0:7}) | ||
|
||
%global commit_k8s ec6eb119b81be488b030e849b9e64fda4caaf33c | ||
%global shortcommit_k8s %(c=%{commit_k8s}; echo ${c:0:7}) | ||
%global version_k8s v1.16.8 | ||
%global commit_k8s_116 ec6eb119b81be488b030e849b9e64fda4caaf33c | ||
%global shortcommit_k8s_116 %(c=%{commit_k8s_116}; echo ${c:0:7}) | ||
%global version_k8s_116 v1.16.8 | ||
|
||
%global commit_k8s_121 5e58841cce77d4bc13713ad2b91fa0d961e69192 | ||
%global shortcommit_k8s_121 %(c=%{commit_k8s_121}; echo ${c:0:7}) | ||
%global version_k8s_121 v1.21.1 | ||
|
||
%global install_golang 1 | ||
|
||
%define build_timestamp %(date -u +"%y%m%d%H%M") | ||
%define release 4 | ||
%define release 1 | ||
%define rpm_release %{release}.%{build_timestamp}%{?dist} | ||
|
||
Name: dbaas-tools | ||
Version: 0.5.1 | ||
Version: 0.6.0 | ||
Release: %{rpm_release} | ||
Summary: A set of tools for Percona DBaaS | ||
License: ASL 2.0 | ||
URL: https://github.com/kubernetes-sigs/aws-iam-authenticator | ||
# Git tag can be moved and pointed to different commit hash which may brake reproducibility of the build | ||
# As by using an exact commit hash, we can ensure that each time source will be identical | ||
Source0: https://github.com/kubernetes-sigs/aws-iam-authenticator/archive/%{commit_aws}/aws-iam-authenticator-%{shortcommit_aws}.tar.gz | ||
Source1: https://github.com/kubernetes/kubernetes/archive/%{commit_k8s}/kubernetes-%{shortcommit_k8s}.tar.gz | ||
Source1: https://github.com/kubernetes/kubernetes/archive/%{commit_k8s_116}/kubernetes-%{shortcommit_k8s_116}.tar.gz | ||
Source2: https://github.com/kubernetes/kubernetes/archive/%{commit_k8s_121}/kubernetes-%{shortcommit_k8s_121}.tar.gz | ||
|
||
%if %{install_golang} | ||
BuildRequires: golang >= 1.13.0 | ||
|
@@ -42,10 +47,15 @@ BuildRequires: which | |
mkdir -p src/github.com/kubernetes-sigs/ | ||
mv aws-iam-authenticator-%{commit_aws} src/github.com/kubernetes-sigs/aws-iam-authenticator-%{commit_aws} | ||
|
||
%setup -T -c -n kubernetes-%{commit_k8s} | ||
%setup -q -c -a 1 -n kubernetes-%{commit_k8s} | ||
%setup -T -c -n kubernetes-%{commit_k8s_116} | ||
%setup -q -c -a 1 -n kubernetes-%{commit_k8s_116} | ||
mkdir -p src/github.com/kubernetes/ | ||
mv kubernetes-%{commit_k8s_116} src/github.com/kubernetes/kubernetes-%{commit_k8s_116} | ||
|
||
%setup -T -c -n kubernetes-%{commit_k8s_121} | ||
%setup -q -c -a 2 -n kubernetes-%{commit_k8s_121} | ||
mkdir -p src/github.com/kubernetes/ | ||
mv kubernetes-%{commit_k8s} src/github.com/kubernetes/kubernetes-%{commit_k8s} | ||
mv kubernetes-%{commit_k8s_121} src/github.com/kubernetes/kubernetes-%{commit_k8s_121} | ||
|
||
%build | ||
cd %{_builddir}/aws-iam-authenticator-%{commit_aws} | ||
|
@@ -57,25 +67,42 @@ cd src/github.com/kubernetes-sigs/aws-iam-authenticator-%{commit_aws} | |
sed -i '/dockers:/,+35d' .goreleaser.yaml | ||
make build | ||
|
||
cd %{_builddir}/kubernetes-%{commit_k8s}/ | ||
# build kubectl 1.16.x | ||
cd %{_builddir}/kubernetes-%{commit_k8s_116}/ | ||
export GOPATH="$(pwd)" | ||
|
||
cd src/github.com/kubernetes/kubernetes-%{commit_k8s} | ||
cd src/github.com/kubernetes/kubernetes-%{commit_k8s_116} | ||
make WHAT="cmd/kubectl" | ||
|
||
# build kubectl 1.21.x | ||
cd %{_builddir}/kubernetes-%{commit_k8s_121}/ | ||
export GOPATH="$(pwd)" | ||
|
||
cd src/github.com/kubernetes/kubernetes-%{commit_k8s_121} | ||
make WHAT="cmd/kubectl" | ||
|
||
%install | ||
cd %{_builddir}/aws-iam-authenticator-%{commit_aws}/src/github.com/kubernetes-sigs/aws-iam-authenticator-%{commit_aws} | ||
install -D -p -m 0755 dist/authenticator_linux_amd64/aws-iam-authenticator %{buildroot}/opt/dbaas-tools/bin/aws-iam-authenticator | ||
|
||
cd %{_builddir}/kubernetes-%{commit_k8s}/src/github.com/kubernetes/kubernetes-%{commit_k8s} | ||
# install kubectl 1.16.x | ||
cd %{_builddir}/kubernetes-%{commit_k8s_116}/src/github.com/kubernetes/kubernetes-%{commit_k8s_116} | ||
install -D -p -m 0775 _output/local/go/bin/kubectl %{buildroot}/opt/dbaas-tools/bin/kubectl-1.16 | ||
|
||
# install kubectl 1.21.x | ||
cd %{_builddir}/kubernetes-%{commit_k8s_121}/src/github.com/kubernetes/kubernetes-%{commit_k8s_121} | ||
install -D -p -m 0775 _output/local/go/bin/kubectl %{buildroot}/opt/dbaas-tools/bin/kubectl-1.21 | ||
|
||
|
||
%files | ||
/opt/dbaas-tools/bin/aws-iam-authenticator | ||
/opt/dbaas-tools/bin/kubectl-1.16 | ||
/opt/dbaas-tools/bin/kubectl-1.21 | ||
|
||
%changelog | ||
* Sun May 30 2021 Nurlan Moldomurov <[email protected]> - 0.6.0-1 | ||
- Added kubectl 1.21.1 | ||
|
||
* Thu Aug 27 2020 Illia Pshonkin <[email protected]> - 0.5.1-1 | ||
- Initial packaging for dbaas-tools | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we bump up the version of go as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not necessary