Skip to content

Commit

Permalink
Add tags to prevent crashes when statically linking kubernetes binaries
Browse files Browse the repository at this point in the history
This fixes MOST things, we still have a few runtime links to address but
this should at least prevent kubelet from segfaulting on startup.

Also update k3s to master, as the last update apparently didn't get us
to the rev we needed to be at to make the agent tunnel controller work
with the RBAC changes.

Signed-off-by: Brad Davidson <[email protected]>
  • Loading branch information
brandond committed Sep 18, 2020
1 parent f8d861f commit f06b971
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG KUBERNETES_VERSION=dev
# Build environment
FROM rancher/hardened-build-base:v1.14.2-amd64 AS build
FROM rancher/hardened-build-base:v1.13.15-amd64 AS build
RUN set -x \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y update \
Expand Down Expand Up @@ -51,7 +51,7 @@ ARG TAG
WORKDIR /
RUN git clone -b ${KUBERNETES_VERSION} --depth=1 https://github.com/kubernetes/kubernetes.git
WORKDIR /kubernetes
RUN make KUBE_GIT_VERSION=${TAG} GOLDFLAGS='-extldflags "-static"' WHAT='cmd/kube-apiserver cmd/kube-controller-manager cmd/kube-proxy cmd/kube-scheduler cmd/kubeadm cmd/kubectl cmd/kubelet vendor/k8s.io/apiextensions-apiserver'
RUN make KUBE_GIT_VERSION=${TAG} GOLDFLAGS='-extldflags "-static"' GOFLAGS='-tags=netgo,osusergo' WHAT='cmd/kube-apiserver cmd/kube-controller-manager cmd/kube-proxy cmd/kube-scheduler cmd/kubeadm cmd/kubectl cmd/kubelet vendor/k8s.io/apiextensions-apiserver'

FROM registry.access.redhat.com/ubi7/ubi-minimal:latest AS kubernetes
RUN microdnf update -y && \
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ require (
github.com/google/go-containerregistry v0.0.0-20190617215043-876b8855d23c
github.com/pkg/errors v0.9.1
github.com/rancher/helm-controller v0.7.3
github.com/rancher/k3s v1.19.1-rc2.0.20200916010251-ae5519c0472e
github.com/rancher/k3s v1.19.1-rc2.0.20200916233211-b66760fccddd
github.com/rancher/wrangler v0.6.1
github.com/sirupsen/logrus v1.6.0
github.com/urfave/cli v1.22.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373 h1:BePi97poJ
github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373/go.mod h1:Vz8oLnHgttpo/aZrTpjbcpZEDzzElqNau2zmorToY0E=
github.com/rancher/helm-controller v0.7.3 h1:WTQHcNF2vl9w6Xd1eBtXDe0JUsYMFFstqX9ghGhI5Ac=
github.com/rancher/helm-controller v0.7.3/go.mod h1:ZylsxIMGNADRPRNW+NiBWhrwwks9vnKLQiCHYWb6Bi0=
github.com/rancher/k3s v1.19.1-rc2.0.20200916010251-ae5519c0472e h1:Bngz9JRrYfVDBf+J1Ih9/iDaeiwITZCM59Ob1ldJ4kA=
github.com/rancher/k3s v1.19.1-rc2.0.20200916010251-ae5519c0472e/go.mod h1:KZ7cVGFco3Q8FfQGynHIZZ7MYVE+yPdk6TZB9s9YqWk=
github.com/rancher/k3s v1.19.1-rc2.0.20200916233211-b66760fccddd h1:BxaXJ6VOlfeKWvKsCrrbOG8TpHgvat9yxvkETfryxGY=
github.com/rancher/k3s v1.19.1-rc2.0.20200916233211-b66760fccddd/go.mod h1:KZ7cVGFco3Q8FfQGynHIZZ7MYVE+yPdk6TZB9s9YqWk=
github.com/rancher/kine v0.4.0 h1:1IhWy3TzjExG8xnj46eyUEWdzqNAD1WrgL4eEBKm6Uc=
github.com/rancher/kine v0.4.0/go.mod h1:IImtCJ68AIkE+VY/kUI0NkyJL5q5WzO8QvMsSXqbrpA=
github.com/rancher/kubernetes v1.19.0-k3s1 h1:TPFj4qlQgZ2E9xE/ScFLtBQoymxPNCXAYHJpSZYRW3o=
Expand Down
2 changes: 1 addition & 1 deletion pkg/podexecutor/staticpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (s *StaticPodConfig) Kubelet(args []string) error {
for {
cmd := exec.Command("kubelet", args...)
cmd.Stdout = os.Stdout
//cmd.Stderr = os.Stderr
cmd.Stderr = os.Stderr
addDeathSig(cmd)

err := cmd.Run()
Expand Down

0 comments on commit f06b971

Please sign in to comment.