Uprev kubernetes from 1.10 to 1.12.1
This requires golang upversioned to 1.10.2 or later The older kubernetes was a src rpm. This is a src tarball so the files and patches from the old src rpm are included here. Some of the files from the 1.10 src rpm failed lint checks, so they have been updated. ppc patch from 1.10 was removed. golang debug patch for ELF removed. The kubeadm.conf originates from: kubernetes/build/rpms/10-kubeadm.conf Story: 2002843 Task: 26751 Change-Id: Ib5602a4a57c0e8998430b0774375853cdd2bca01 Depends-On: I1ea17cc89d839e0ffa90459965c521e504695294 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
8054afd299
commit
d29f540813
4
kubernetes/kubernetes/centos/Readme.rst
Normal file
4
kubernetes/kubernetes/centos/Readme.rst
Normal file
@ -0,0 +1,4 @@
|
||||
The spec file used here was from the kubernetes 1.10 src rpm.
|
||||
The spec_diff shows the modifications made to that spec file.
|
||||
to help understand which changes were needed, to assist with
|
||||
future upversioning.
|
@ -1 +1,8 @@
|
||||
VERSION=1.12.1
|
||||
TAR_NAME=kubernetes
|
||||
TAR="$TAR_NAME-v$VERSION.tar.gz"
|
||||
CONTRIB="$TAR_NAME-contrib-v$VERSION.tar.gz"
|
||||
|
||||
COPY_LIST="${CGCS_BASE}/downloads/$TAR ${CGCS_BASE}/downloads/$CONTRIB $FILES_BASE/*"
|
||||
|
||||
TIS_PATCH_VER=1
|
||||
|
84
kubernetes/kubernetes/centos/files/genmanpages.sh
Normal file
84
kubernetes/kubernetes/centos/files/genmanpages.sh
Normal file
@ -0,0 +1,84 @@
|
||||
MDSFORMANPAGES="kube-apiserver.md kube-controller-manager.md kube-proxy.md kube-scheduler.md kubelet.md"
|
||||
|
||||
# remove comments from man pages
|
||||
for manpage in ${MDSFORMANPAGES}; do
|
||||
pos=$(grep -n "<\!-- END MUNGE: UNVERSIONED_WARNING -->" ${manpage} | cut -d':' -f1)
|
||||
if [ -n ${pos} ]; then
|
||||
sed -i "1,${pos}{/.*/d}" ${manpage}
|
||||
fi
|
||||
done
|
||||
|
||||
# for each man page add NAME and SYNOPSIS section
|
||||
# kube-apiserver
|
||||
sed -i -s "s/## kube-apiserver/# NAME\nkube-apiserver \- Provides the API for kubernetes orchestration.\n\n# SYNOPSIS\n**kube-apiserver** [OPTIONS]\n/" kube-apiserver.md
|
||||
|
||||
cat << 'EOF' >> kube-apiserver.md
|
||||
# EXAMPLES
|
||||
```
|
||||
/usr/bin/kube-apiserver --logtostderr=true --v=0 --etcd_servers=http://127.0.0.1:4001 --insecure_bind_address=127.0.0.1 --insecure_port=8080 --kubelet_port=10250 --service-cluster-ip-range=10.1.1.0/24 --allow_privileged=false
|
||||
```
|
||||
EOF
|
||||
# kube-controller-manager
|
||||
sed -i -s "s/## kube-controller-manager/# NAME\nkube-controller-manager \- Enforces kubernetes services.\n\n# SYNOPSIS\n**kube-controller-manager** [OPTIONS]\n/" kube-controller-manager.md
|
||||
|
||||
cat << 'EOF' >> kube-controller-manager.md
|
||||
# EXAMPLES
|
||||
```
|
||||
/usr/bin/kube-controller-manager --logtostderr=true --v=0 --master=127.0.0.1:8080
|
||||
```
|
||||
EOF
|
||||
# kube-proxy
|
||||
sed -i -s "s/## kube-proxy/# NAME\nkube-proxy \- Provides network proxy services.\n\n# SYNOPSIS\n**kube-proxy** [OPTIONS]\n/" kube-proxy.md
|
||||
|
||||
cat << 'EOF' >> kube-proxy.md
|
||||
# EXAMPLES
|
||||
```
|
||||
/usr/bin/kube-proxy --logtostderr=true --v=0 --master=http://127.0.0.1:8080
|
||||
```
|
||||
EOF
|
||||
# kube-scheduler
|
||||
sed -i -s "s/## kube-scheduler/# NAME\nkube-scheduler \- Schedules containers on hosts.\n\n# SYNOPSIS\n**kube-scheduler** [OPTIONS]\n/" kube-scheduler.md
|
||||
|
||||
cat << 'EOF' >> kube-scheduler.md
|
||||
# EXAMPLES
|
||||
```
|
||||
/usr/bin/kube-scheduler --logtostderr=true --v=0 --master=127.0.0.1:8080
|
||||
```
|
||||
EOF
|
||||
# kubelet
|
||||
sed -i -s "s/## kubelet/# NAME\nkubelet \- Processes a container manifest so the containers are launched according to how they are described.\n\n# SYNOPSIS\n**kubelet** [OPTIONS]\n/" kubelet.md
|
||||
|
||||
cat << 'EOF' >> kubelet.md
|
||||
# EXAMPLES
|
||||
```
|
||||
/usr/bin/kubelet --logtostderr=true --v=0 --api_servers=http://127.0.0.1:8080 --address=127.0.0.1 --port=10250 --hostname_override=127.0.0.1 --allow-privileged=false
|
||||
```
|
||||
EOF
|
||||
|
||||
# for all man-pages
|
||||
for md in $MDSFORMANPAGES; do
|
||||
# correct section names
|
||||
sed -i -s "s/### Synopsis/# DESCRIPTION/" $md
|
||||
sed -i -s "s/### Options/# OPTIONS/" $md
|
||||
# add header
|
||||
sed -i "s/# NAME/% KUBERNETES(1) kubernetes User Manuals\n# NAME/" $md
|
||||
# modify list of options
|
||||
# options with no value in ""
|
||||
sed -i -r 's/(^ )(-[^":][^":]*)(:)(.*)/\*\*\2\*\*\n\t\4\n/' $md
|
||||
# option with value in ""
|
||||
sed -i -r 's/(^ )(-[^":][^":]*)("[^"]*")(:)(.*)/\*\*\2\3\*\*\n\t\5\n/' $md
|
||||
# options in -s, --long
|
||||
sed -i -r 's/(^ )(-[a-z], -[^":][^":]*)(:)(.*)/\*\*\2\*\*\n\t\4\n/' $md
|
||||
sed -i -r 's/(^ )(-[a-z], -[^":][^":]*)("[^"]*")(:)(.*)/\*\*\2\3\*\*\n\t\5\n/' $md
|
||||
# remove ```
|
||||
sed -i 's/```//' $md
|
||||
# remove all lines starting with ######
|
||||
sed -i 's/^######.*//' $md
|
||||
# modify footer
|
||||
sed -i -r "s/^\[!\[Analytics\].*//" $md
|
||||
# md does not contain section => taking 1
|
||||
name="${md%.md}"
|
||||
go-md2man -in $md -out man/man1/$name.1
|
||||
done
|
||||
|
||||
|
14
kubernetes/kubernetes/centos/files/kubeadm.conf
Normal file
14
kubernetes/kubernetes/centos/files/kubeadm.conf
Normal file
@ -0,0 +1,14 @@
|
||||
# Note: This dropin only works with kubeadm and kubelet v1.11+
|
||||
[Service]
|
||||
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
|
||||
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
|
||||
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
|
||||
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
|
||||
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
|
||||
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
|
||||
EnvironmentFile=-/etc/sysconfig/kubelet
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
|
||||
Restart=always
|
||||
StartLimitInterval=0
|
||||
RestartSec=10
|
@ -0,0 +1,4 @@
|
||||
[Manager]
|
||||
DefaultCPUAccounting=yes
|
||||
DefaultMemoryAccounting=yes
|
||||
|
2259
kubernetes/kubernetes/centos/kubernetes.spec
Normal file
2259
kubernetes/kubernetes/centos/kubernetes.spec
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,47 +0,0 @@
|
||||
commit 7f052d7778c72d41a5a559f9f81617e39ef3016c
|
||||
Author: Shoaib Nasir <shoaib.nasir@windriver.com>
|
||||
Date: Mon May 14 16:18:45 2018 -0400
|
||||
|
||||
WRS: 0001-Update-package-versioning-for-TIS-format.patch
|
||||
|
||||
diff --git a/SPECS/kubernetes.spec b/SPECS/kubernetes.spec
|
||||
index fd43ef4..ab48da4 100644
|
||||
--- a/SPECS/kubernetes.spec
|
||||
+++ b/SPECS/kubernetes.spec
|
||||
@@ -45,7 +45,7 @@
|
||||
##############################################
|
||||
Name: kubernetes
|
||||
Version: %{kube_version}
|
||||
-Release: 1%{?dist}
|
||||
+Release: 1%{?_tis_dist}.%{tis_patch_ver}
|
||||
Summary: Container cluster management
|
||||
License: ASL 2.0
|
||||
URL: https://%{import_path}
|
||||
@@ -807,9 +807,9 @@ Summary: Kubernetes services for node host
|
||||
|
||||
%if 0%{?fedora} >= 27
|
||||
Requires: (docker or docker-ce)
|
||||
-Suggests: docker
|
||||
+Suggests: docker-ce
|
||||
%else
|
||||
-Requires: docker
|
||||
+Requires: docker-ce
|
||||
%endif
|
||||
Requires: conntrack-tools
|
||||
|
||||
@@ -891,6 +891,7 @@ mv $(ls | grep -v "^src$") src/k8s.io/kubernetes/.
|
||||
###############
|
||||
|
||||
%build
|
||||
+export PBR_VERSION=%{version}
|
||||
pushd src/k8s.io/kubernetes/
|
||||
export KUBE_GIT_TREE_STATE="clean"
|
||||
export KUBE_GIT_COMMIT=%{commit}
|
||||
@@ -915,6 +916,7 @@ popd
|
||||
popd
|
||||
|
||||
%install
|
||||
+export PBR_VERSION=%{version}
|
||||
pushd src/k8s.io/kubernetes/
|
||||
. hack/lib/init.sh
|
||||
kube::golang::setup_env
|
@ -1 +0,0 @@
|
||||
0001-Update-package-versioning-for-TIS-format.patch
|
77
kubernetes/kubernetes/centos/spec_diff
Normal file
77
kubernetes/kubernetes/centos/spec_diff
Normal file
@ -0,0 +1,77 @@
|
||||
26,27c26
|
||||
< %global commit fc32d2f3698e36b93322a3465f63a14e9f0eaead
|
||||
< %global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
---
|
||||
> %global commit 1.12.1
|
||||
32c31
|
||||
< %global con_repo contrib
|
||||
---
|
||||
> %global con_repo kubernetes-contrib
|
||||
34,36c33
|
||||
< %global con_provider_prefix %{con_provider}.%{con_provider_tld}/%{con_project}/%{con_repo}
|
||||
< %global con_commit 5b445f1c53aa8d6457523526340077935f62e691
|
||||
< %global con_shortcommit %(c=%{con_commit}; echo ${c:0:7})
|
||||
---
|
||||
> %global con_commit 1.12.1
|
||||
38c35
|
||||
< %global kube_version 1.10.0
|
||||
---
|
||||
> %global kube_version 1.12.1
|
||||
48c45
|
||||
< Release: 1%{?dist}
|
||||
---
|
||||
> Release: 1%{?_tis_dist}.%{tis_patch_ver}
|
||||
53,54c50,51
|
||||
< Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
|
||||
< Source1: https://%{con_provider_prefix}/archive/%{con_commit}/%{con_repo}-%{con_shortcommit}.tar.gz
|
||||
---
|
||||
> Source0: %{project}-v%{kube_version}.tar.gz
|
||||
> Source1: %{con_repo}-v%{con_commit}.tar.gz
|
||||
60,68d56
|
||||
< Patch3: build-with-debug-info.patch
|
||||
< #Patch4: make-test-cmd-run-over-hyperkube-based-kubectl.patch
|
||||
< #Patch5: make-e2e_node-run-over-distro-bins.patch
|
||||
<
|
||||
< # ppc64le
|
||||
< Patch16: fix-support-for-ppc64le.patch
|
||||
<
|
||||
< Patch20: use_go_build-is-not-fully-propagated-so-make-it-fixe.patch
|
||||
<
|
||||
810c798
|
||||
< Suggests: docker
|
||||
---
|
||||
> Suggests: docker-ce
|
||||
812c800
|
||||
< Requires: docker
|
||||
---
|
||||
> Requires: docker-ce
|
||||
816c804
|
||||
< BuildRequires: golang >= 1.2-7
|
||||
---
|
||||
> BuildRequires: golang >= 1.10.2
|
||||
858,863d845
|
||||
< %if 0%{?with_debug}
|
||||
< %patch3 -p1
|
||||
< %endif
|
||||
<
|
||||
< %patch20 -p1
|
||||
<
|
||||
883,890d864
|
||||
< # Patch tests to be run over distro bins
|
||||
< #patch4 -p1
|
||||
< #patch5 -p1
|
||||
<
|
||||
< %ifarch ppc64le
|
||||
< %patch16 -p1
|
||||
< %endif
|
||||
<
|
||||
893a868
|
||||
> export PBR_VERSION=%{version}
|
||||
904c879
|
||||
< make WHAT="--use_go_build cmd/hyperkube cmd/kube-apiserver cmd/kubeadm"
|
||||
---
|
||||
> make WHAT="cmd/hyperkube cmd/kube-apiserver cmd/kubeadm"
|
||||
917a893
|
||||
> export PBR_VERSION=%{version}
|
||||
1072a1049
|
||||
> %config(noreplace) %{_sysconfdir}/%{name}/kubelet.kubeconfig
|
@ -1 +0,0 @@
|
||||
mirror:Source/kubernetes-1.10.0-1.el7.src.rpm
|
Loading…
Reference in New Issue
Block a user