mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #99670 from jsturtevant/windows-gmsa
Include nltest in the windows busybox image
This commit is contained in:
commit
b458d97feb
@ -398,7 +398,12 @@ func createPodWithGmsa(f *framework.Framework, serviceAccountName string) string
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: podName,
|
||||
Image: imageutils.GetPauseImageName(),
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
Command: []string{
|
||||
"powershell.exe",
|
||||
"-Command",
|
||||
"sleep -Seconds 600",
|
||||
},
|
||||
},
|
||||
},
|
||||
SecurityContext: &v1.PodSecurityContext{
|
||||
|
@ -59,11 +59,21 @@ var _ = SIGDescribe("[Feature:Windows] GMSA Kubelet [Slow]", func() {
|
||||
Containers: []v1.Container{
|
||||
{
|
||||
Name: container1Name,
|
||||
Image: imageutils.GetPauseImageName(),
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
Command: []string{
|
||||
"powershell.exe",
|
||||
"-Command",
|
||||
"sleep -Seconds 600",
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: container2Name,
|
||||
Image: imageutils.GetPauseImageName(),
|
||||
Image: imageutils.GetE2EImage(imageutils.BusyBox),
|
||||
Command: []string{
|
||||
"powershell.exe",
|
||||
"-Command",
|
||||
"sleep -Seconds 600",
|
||||
},
|
||||
SecurityContext: &v1.SecurityContext{
|
||||
WindowsOptions: &v1.WindowsSecurityContextOptions{
|
||||
GMSACredentialSpec: generateDummyCredSpecs(container2Domain),
|
||||
|
@ -104,7 +104,7 @@ limitations when it comes to the Windows images:
|
||||
which won't work properly on Windows. See https://github.com/moby/buildkit/issues/1560
|
||||
- The base image for all the Windows images is nanoserver, which is ~10 times smaller than Windows Servercore.
|
||||
Most binaries added to the image will work out of the box, but some will not due to missing dependencies
|
||||
(**atention**: the image will still build successfully, even if the added binaries will not work).
|
||||
(**attention**: the image will still build successfully, even if the added binaries will not work).
|
||||
For example, `coredns.exe` requires `netapi32.dll`, which cannot be found on a nanoserver image, but
|
||||
we can copy it from a servercore image (see the agnhost image's `Dockerfile_windows` file as an example).
|
||||
A good rule of thumb is to use 64-bit applications instead of 32-bit as they have fewer dependencies.
|
||||
|
@ -16,4 +16,4 @@
|
||||
ARG BASEIMAGE
|
||||
FROM $BASEIMAGE
|
||||
|
||||
LABEL image_version="1.29"
|
||||
LABEL image_version="1.29-1"
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
ARG BASEIMAGE
|
||||
ARG REGISTRY
|
||||
ARG OS_VERSION
|
||||
|
||||
# We're using a Linux image to unpack the archive, then we're copying it over to Windows.
|
||||
FROM --platform=linux/amd64 alpine:3.6 as prep
|
||||
@ -55,7 +56,7 @@ RUN mkdir /curl-full /curl-dir && \
|
||||
|
||||
|
||||
# Windows Stage
|
||||
|
||||
FROM --platform=linux/amd64 $REGISTRY/windows-servercore-cache:1.0-linux-amd64-$OS_VERSION as servercore-helper
|
||||
FROM e2eteam/powershell-helper:6.2.7 as ps-helper
|
||||
FROM $BASEIMAGE
|
||||
|
||||
@ -66,6 +67,11 @@ COPY --from=prep /netcat-dir/nc64.exe /bin/nc.exe
|
||||
COPY --from=prep /dig-dir /dig
|
||||
COPY --from=prep /vcruntime140.dll /Windows/System32/
|
||||
|
||||
# include nltest
|
||||
COPY --from=servercore-helper /Windows/System32/nltest.exe /Windows/System32/nltest.exe
|
||||
COPY --from=servercore-helper /Windows/System32/en-US/nltest.exe.mui /Windows/System32/en-US/nltest.exe.mui
|
||||
COPY --from=servercore-helper /Windows/System32/ntdsapi.dll /Windows/System32/ntdsapi.dll
|
||||
|
||||
# include powershell and its Module analysis cache.
|
||||
COPY --from=ps-helper ["/PowerShell", "/Program Files/PowerShell"]
|
||||
|
||||
@ -86,5 +92,5 @@ ENV PATH="C:\dig\;C:\bin;C:\curl;C:\Windows\System32;C:\Windows;C:\Program Files
|
||||
# Persist %PSCORE% ENV variable for user convenience
|
||||
PSCORE="C:\Program Files\PowerShell\pwsh.exe"
|
||||
|
||||
LABEL image_version="1.29"
|
||||
LABEL image_version="1.29-1"
|
||||
ENTRYPOINT ["cmd.exe", "/s", "/c"]
|
||||
|
@ -1 +1 @@
|
||||
1.29
|
||||
1.29-1
|
||||
|
Loading…
Reference in New Issue
Block a user