diff --git a/build/root/BUILD.root b/build/root/BUILD.root index 66778a602bd5e..9fefdf382eb76 100644 --- a/build/root/BUILD.root +++ b/build/root/BUILD.root @@ -38,6 +38,7 @@ gcs_upload( ":_binary-artifacts-and-hashes", "//build/release-tars:release-tars-and-hashes", "//cluster/gce/gci:gcs-release-artifacts-and-hashes", + "//cluster/gce/windows:gcs-release-artifacts-and-hashes", ], tags = ["manual"], # Use for_platforms to format the upload path based on the configured @@ -53,6 +54,7 @@ gcs_upload( upload_paths = select(for_platforms(for_all = { "//build/release-tars:release-tars-and-hashes": "", "//cluster/gce/gci:gcs-release-artifacts-and-hashes": "extra/gce", + "//cluster/gce/windows:gcs-release-artifacts-and-hashes": "extra/gce/windows", "//:_binary-artifacts-and-hashes": "bin/{OS}/{ARCH}", })), ) diff --git a/cluster/gce/BUILD b/cluster/gce/BUILD index f61070528f9b4..1996bdbd19f13 100644 --- a/cluster/gce/BUILD +++ b/cluster/gce/BUILD @@ -17,6 +17,7 @@ filegroup( "//cluster/gce/addons:all-srcs", "//cluster/gce/gci:all-srcs", "//cluster/gce/manifests:all-srcs", + "//cluster/gce/windows:all-srcs", ], tags = ["automanaged"], ) diff --git a/cluster/gce/windows/BUILD b/cluster/gce/windows/BUILD new file mode 100644 index 0000000000000..158aef837d184 --- /dev/null +++ b/cluster/gce/windows/BUILD @@ -0,0 +1,35 @@ +load("@io_k8s_repo_infra//defs:build.bzl", "release_filegroup") + +# Having the Windows code from the GCE cluster deploy hosted with the release is +# useful for GKE. This list should match the list in k8s.io/release/lib/releaselib.sh. + +# IMPORTANT PLEASE NOTE: +# Any time the file structure in the `windows` directory changes, `windows/BUILD` +# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes. +# We HIGHLY recommend not changing the file structure, because consumers of +# Kubernetes releases depend on the release structure remaining stable. +release_filegroup( + name = "gcs-release-artifacts", + srcs = [ + "common.psm1", + "configure.ps1", + "k8s-node-setup.psm1", + "testonly/install-ssh.psm1", + "testonly/user-profile.psm1", + ], + visibility = ["//visibility:public"], +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], + visibility = ["//visibility:public"], +) diff --git a/cluster/gce/windows/README-GCE-Windows-kube-up.md b/cluster/gce/windows/README-GCE-Windows-kube-up.md index a32642c1e1740..819581bcd68c3 100644 --- a/cluster/gce/windows/README-GCE-Windows-kube-up.md +++ b/cluster/gce/windows/README-GCE-Windows-kube-up.md @@ -1,5 +1,11 @@ # Starting a Windows Kubernetes cluster on GCE using kube-up +## IMPORTANT PLEASE NOTE! +Any time the file structure in the `windows` directory changes, `windows/BUILD` +and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes. +We HIGHLY recommend not changing the file structure, because consumers of +Kubernetes releases depend on the release structure remaining stable. + ## Bring up the cluster Prerequisites: a Google Cloud Platform project. @@ -185,3 +191,4 @@ These steps are based on user@kubernetes-minion-windows-group-mk0p:C:\\etc\\kubernetes\\logs \ kubetest-logs/ ``` + diff --git a/cluster/gce/windows/common.psm1 b/cluster/gce/windows/common.psm1 index f345ac2d3aefc..28cef98d6306c 100644 --- a/cluster/gce/windows/common.psm1 +++ b/cluster/gce/windows/common.psm1 @@ -18,6 +18,12 @@ and scripts for configuring Windows nodes. #> +# IMPORTANT PLEASE NOTE: +# Any time the file structure in the `windows` directory changes, `windows/BUILD` +# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes. +# We HIGHLY recommend not changing the file structure, because consumers of +# Kubernetes releases depend on the release structure remaining stable. + # Disable progress bar to increase download speed. $ProgressPreference = 'SilentlyContinue' diff --git a/cluster/gce/windows/configure.ps1 b/cluster/gce/windows/configure.ps1 index e5503601743fb..53b778745e979 100644 --- a/cluster/gce/windows/configure.ps1 +++ b/cluster/gce/windows/configure.ps1 @@ -17,6 +17,12 @@ Top-level script that runs on Windows nodes to join them to the K8s cluster. #> +# IMPORTANT PLEASE NOTE: +# Any time the file structure in the `windows` directory changes, `windows/BUILD` +# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes. +# We HIGHLY recommend not changing the file structure, because consumers of +# Kubernetes releases depend on the release structure remaining stable. + $ErrorActionPreference = 'Stop' # Turn on tracing to debug diff --git a/cluster/gce/windows/k8s-node-setup.psm1 b/cluster/gce/windows/k8s-node-setup.psm1 index 01fe4d0072540..99af7fe05a5f5 100644 --- a/cluster/gce/windows/k8s-node-setup.psm1 +++ b/cluster/gce/windows/k8s-node-setup.psm1 @@ -36,6 +36,12 @@ # Execute functions manually or run configure.ps1. #> +# IMPORTANT PLEASE NOTE: +# Any time the file structure in the `windows` directory changes, `windows/BUILD` +# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes. +# We HIGHLY recommend not changing the file structure, because consumers of +# Kubernetes releases depend on the release structure remaining stable. + # TODO: update scripts for these style guidelines: # - Remove {} around variable references unless actually needed for clarity. # - Always use single-quoted strings unless actually interpolating variables diff --git a/cluster/gce/windows/testonly/install-ssh.psm1 b/cluster/gce/windows/testonly/install-ssh.psm1 index 312b0be18f75e..066bb6f0071d0 100644 --- a/cluster/gce/windows/testonly/install-ssh.psm1 +++ b/cluster/gce/windows/testonly/install-ssh.psm1 @@ -22,6 +22,12 @@ clusters. DO NOT USE THIS MODULE FOR PRODUCTION. #> +# IMPORTANT PLEASE NOTE: +# Any time the file structure in the `windows` directory changes, `windows/BUILD` +# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes. +# We HIGHLY recommend not changing the file structure, because consumers of +# Kubernetes releases depend on the release structure remaining stable. + Import-Module -Force C:\common.psm1 $OPENSSH_ROOT = 'C:\Program Files\OpenSSH' diff --git a/cluster/gce/windows/testonly/user-profile.psm1 b/cluster/gce/windows/testonly/user-profile.psm1 index 62abd578116cc..9f89f2e440f49 100644 --- a/cluster/gce/windows/testonly/user-profile.psm1 +++ b/cluster/gce/windows/testonly/user-profile.psm1 @@ -19,6 +19,12 @@ powershellposse.com #> +# IMPORTANT PLEASE NOTE: +# Any time the file structure in the `windows` directory changes, `windows/BUILD` +# and `k8s.io/release/lib/releaselib.sh` must be manually updated with the changes. +# We HIGHLY recommend not changing the file structure, because consumers of +# Kubernetes releases depend on the release structure remaining stable. + #Function to create the new local user first function New-LocalUser