Commit Graph

65 Commits

Author SHA1 Message Date
Sascha Grunert
aad711f399
Run pause image as non-root user and group
We now build the pause image to use a pseudo user and group 65535:65535.
This increases the security aspect of the container image, if a
vulnerability would directly affect the pause container.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2021-03-11 09:29:45 +01:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Kubernetes Prow Robot
f4801a7c85
Merge pull request #98799 from claudiubelu/images/cleanup-run
images: Removes containers after they've run
2021-02-22 22:24:11 -08:00
Claudiu Belu
41cdd40a2e images: Removes containers after they've run
Not all instances of docker run has the --rm argument, which means that they'll
persist after they've finished. This can cause storage to remain occupied needlessly.
2021-02-05 10:07:26 +00:00
pacoxu
f4d843682d update pause image changelogs for 3.3-3.4.1
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2021-02-01 15:09:31 +08:00
Kubernetes Prow Robot
8abe3714d2
Merge pull request #97853 from claudiubelu/patch-1
pause image: Fixes clean make action
2021-01-12 20:20:35 -08:00
Ernest Wong
747eec42fe
pause: encode Windows OS version in image tag instead of repository
Signed-off-by: Ernest Wong <chuwon@microsoft.com>
2021-01-08 18:02:28 -05:00
Claudiu Belu
b428c7ff33
pause image: Fixes clean make action
The ``.container-$OS-$ARCH`` make subaction is creating files with the same name, and ``clean`` is meant to delete them. However, the ``clean``'s rm regex is not quite correct.
2021-01-08 18:31:04 +02:00
Claudiu Belu
ad97a5b7a5 pause image: Adds 20H2 Windows OS Version base image
A new Windows image has been released in the second half of 2020 with the tag 20H2.
We are going to need a pause image for it as well.

The image tag can be found here: https://hub.docker.com/_/microsoft-windows-nanoserver
2020-12-14 04:24:07 -08:00
Claudiu Belu
3f7c09e601 pause image: Disable DiagTrack service on Windows image
It has been observed that the DiagTrack service in the pause
image is consuming a non-trivial amount of CPU. We don't need
this service in the pause image, so we should disable it.

We can disable the service by running chntpw in a docker buildx Linux stage
and then copy the SYSTEM file back to the final Windows image.

Co-Authored-By: Mark Rossetti <marosset@microsoft.com>
Co-Authored-By: Davanum Srinivas <davanum@gmail.com>
2020-11-04 10:24:25 +00:00
Claudiu Belu
f8b70860d5 pause image: Stricter registry prefix regex 2020-10-26 07:42:49 -07:00
Claudiu Belu
fd1e1138d6 pause image: moves wincat binary location
Co-authored-by: Ben Moss <moss.127@gmail.com>
2020-09-26 07:37:02 -07:00
Ben Moss
82ac28cc52 Adds support for building Windows pause image
We can use docker buildx in order to build and push Windows images from the same Linux
node, as long as the Dockerfile does not have any RUN commands in the Windows step.

We also need to create a non-default builder instance in order to be able to
build and push Windows images.

The Windows images have to be built and pushed directly to the registry. Because of
this, the make target "push" has been removed (the target "all" will build and push
the images).

We need wincat for a few kubectl proxy scenarios.

For Windows containers without Hyper-V isolation, the host OS Version and the
Container OS Version need to match, which is why we added multiple Windows OS Versions
to the building process.

Adds support for Windows OS Versions: 1809, 1903, 1909, 2004.

Bumps pause image version to 3.4.

Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>
Co-Authored-By: Ben Moss <bmoss@pivotal.io>

Signed-off-by: Leah Hanson <lhanson@pivotal.io>
2020-09-26 06:26:24 -07:00
Stephen Augustus
90c223fa5c [VDF] Remove references to us.gcr.io/k8s-artifacts-prod
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-22 16:08:30 -04:00
Stephen Augustus
03a1489623 build: Build pause:3.3 image
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-05-01 20:35:48 -04:00
Stephen Augustus
8b47cbba4f build: Add build-image OWNERS to debian-{base,iptables} and pause dirs
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-05-01 03:20:46 -04:00
Stephen Augustus
2431de4255 build: Split out building for debian-{base,iptables} and pause images
- Eliminates a failure in one image build from prevent the others
- Allows subdir approvers ownership over individual builds
- Makes cleanup a little easier if one or more of these images go away

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-05-01 03:20:46 -04:00
Davanum Srinivas
a7b9ba784b
Add cloudbuild.yaml for debian-base/debian-iptables and pause
Tested this locally using:
```
gcloud builds submit --config build/cloudbuild.yaml .
```

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-28 12:01:39 -04:00
Stephen Augustus
e64169d6b5 build: Enable kube-cross push/pull from K8s Infra GCR
- Search/replace Google Infra kube-cross locations for K8s Infra
- Update kube-cross make targets
  - Don't attempt to pre-pull image (docker build --pull)
    This prevents CI failures when the image under test doesn't exist
    yet in the registry.
  - 'make all' now builds and pushes the kube-cross image
  - Allow 'TAG' to be specified via env var
  - Use 'KUBE_CROSS_VERSION' to represent the kube-cross version
  - Tag kube-cross images with both a kubernetes version
    ('git describe') and a kube-cross version
- Add a GCB (Google Cloud Build) config file (cloudbuild.yaml)

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-02-26 16:51:01 -05:00
Kubernetes Prow Robot
1e84adb6af
Merge pull request #88139 from BenTheElder/pause-manifest
switch pause to docker manifest instead of manifest-tool
2020-02-13 22:44:30 -08:00
Benjamin Elder
20b1597302 switch pause to docker manifest instead of manifest-tool 2020-02-13 14:53:19 -08:00
Benjamin Elder
719b328663 add a changelog note for pause 3.2 2020-02-13 14:22:03 -08:00
Benjamin Elder
3072f9080e update pause to 3.2 since we changed the build
see: 86ed97f
2020-02-12 15:51:04 -08:00
Benjamin Elder
d1ec762a91 cross build pause with buildx 2020-02-08 12:08:12 -08:00
Mike Danese
c0b7364563 remove gcloud docker -- since it's deprecated 2018-02-28 00:24:27 -08:00
Tim Hockin
3586986416 Switch to k8s.gcr.io vanity domain
This is the 2nd attempt.  The previous was reverted while we figured out
the regional mirrors (oops).

New plan: k8s.gcr.io is a read-only facade that auto-detects your source
region (us, eu, or asia for now) and pulls from the closest.  To publish
an image, push k8s-staging.gcr.io and it will be synced to the regionals
automatically (similar to today).  For now the staging is an alias to
gcr.io/google_containers (the legacy URL).

When we move off of google-owned projects (working on it), then we just
do a one-time sync, and change the google-internal config, and nobody
outside should notice.

We can, in parallel, change the auto-sync into a manual sync - send a PR
to "promote" something from staging, and a bot activates it.  Nice and
visible, easy to keep track of.
2018-02-07 21:14:19 -08:00
Kubernetes Submit Queue
b98c515819
Merge pull request #57723 from mkumatag/image_manifest
Automatic merge from submit-queue (batch tested with PRs 57322, 57723, 58706, 59004, 58857). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Make the pause image a manifest list

**What this PR does / why we need it**:
Build and push manifest for kubernetes images

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes https://github.com/kubernetes/kubernetes/issues/57869

**Special notes for your reviewer**:

**Release note**:

```
NONE
```
2018-01-29 20:11:35 -08:00
Manjunath A Kumatagi
17a1ec10cf Make the pause image a manifest list 2018-01-24 02:10:45 -05:00
Lee Verberne
1ea697044a Update pause container version to 3.1
This updates the version of the pause container used by the kubelet and
various test utilities to 3.1.

This also adds a CHANGELOG.md for build/pause
2018-01-04 11:35:29 +01:00
Tim Hockin
e9dd8a68f6 Revert k8s.gcr.io vanity domain
This reverts commit eba5b6092a.

Fixes https://github.com/kubernetes/kubernetes/issues/57526
2017-12-22 14:36:16 -08:00
Lee Verberne
4665303c92 Add a version string to pause.c
The version string is based on the TAG and revision. Also:

* Bump the TAG to 3.1
* Update the arm compiler binary used in kube-cross
2017-12-19 09:35:28 +01:00
Tim Hockin
f7be352a67 gcloud docker now auths k8s.gcr.io by default 2017-12-18 09:18:34 -08:00
Tim Hockin
eba5b6092a Use k8s.gcr.io vanity domain for container images 2017-12-18 09:18:34 -08:00
Kubernetes Submit Queue
e7b1814863 Merge pull request #43578 from vsiddharth/pause-container
Automatic merge from submit-queue

Improve pause-container warning message

Signed-off-by: Vinothkumar Siddharth <sidvin@amazon.com>



**What this PR does / why we need it**:
This just improves the warning message currently emitted by pause

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
```
2017-05-17 22:56:20 -07:00
Vinothkumar Siddharth
9fa5e857e5 Fix file semantics
Signed-off-by: Vinothkumar Siddharth <sidvin@amazon.com>
2017-05-17 10:34:20 -07:00
Vinothkumar Siddharth
ec45a47f93 Improve pause-container warning message
Signed-off-by: Vinothkumar Siddharth <sidvin@amazon.com>
2017-03-23 10:17:42 -07:00
Jeff Grafton
836b59962a Silence error messages from docker rmi calls we expect to fail 2017-03-07 12:49:57 -08:00
Kubernetes Submit Queue
4f8f6006cf Merge pull request #36853 from verb/init
Automatic merge from submit-queue (batch tested with PRs 39446, 40023, 36853)

Add SIGCHLD handler to pause container

**What this PR does / why we need it**: This allows pause to reap orphaned zombies in a shared PID namespace. (#1615)

**Special notes for your reviewer**: I plan to discuss this with SIG Node to ensure compatibility with future runtimes.

**Release note**: This will have no effect until shared PID namespace is enabled, so recommend release-note-none.

This allows pause to reap zombies in the upcoming Shared PID namespace
(#1615). Uses the better defined sigaction() instead of signal() for all
signals both for consistency (SIGCHLD handler avoids SA_RESTART) and to
avoid the implicit signal()->sigaction() translation of various libc
versions.

Also makes warnings errors and includes a tool to make orphaned zombies
for manual testing.
2017-01-19 18:53:49 -08:00
Lee Verberne
68262ad5f4 Remove SIGKILL handler from pause.c 2017-01-19 22:50:21 +00:00
Jeff Grafton
19aafd291c Always --pull in docker build to ensure recent base images 2017-01-10 16:21:05 -08:00
Łukasz Oleś
1ef56828f8 Remove build containers
5 containers are created during the build and not used anymore. Removing them.
2016-12-29 18:22:00 +01:00
Lee Verberne
c706a052ef pause.c: Document intended PID 1 behavior 2016-12-22 21:51:10 +00:00
Lee Verberne
7910a3f315 Move orphan.c to catch up to build-tools rename 2016-12-16 02:36:32 +00:00
Lee Verberne
c1520e15ff Address style comments for pause.c
Run clang-format on the C files and capitalize error messages.
2016-12-16 02:30:58 +00:00
Lee Verberne
81d27aa239 Add SIGCHLD handler to pause container
This allows pause to reap zombies in the upcoming Shared PID namespace
(#1615). Uses the better defined sigaction() instead of signal() for all
signals both for consistency (SIGCHLD handler avoids SA_RESTART) and to
avoid the implicit signal()->sigaction() translation of various libc
versions.

Also makes warnings errors and includes a tool to make orphaned zombies
for manual testing.
2016-12-16 02:30:58 +00:00
Jeff Grafton
27d096d27d Rename build-tools/ back to build/ 2016-12-14 13:42:15 -08:00
Mike Danese
27116c6818 rename build/ to build-tools/ 2016-10-24 14:41:56 -07:00
Jess Frazelle
40e71deb25
remove all instances of docker tag -f
Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-13 21:26:20 -07:00
Jess Frazelle
cde5559d09
Update gcloud docker commands to use gcloud docker -- ARGS
We can then avoid the following warning:
```
WARNING: The '--' argument must be specified between gcloud specific args on the left and DOCKER_ARGS on the right. IMPORTANT: previously, commands allowed the omission of the --, and unparsed arguments were treated as implementation args. This usage is being deprecated and will be removed in March 2017.
This will be strictly enforced in March 2017. Use 'gcloud beta docker' to see new behavior.
```

Signed-off-by: Jess Frazelle <acidburn@google.com>
2016-10-10 13:42:34 -07:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00