Skip to content

Commit 6bf15f5

Browse files
authored
Merge pull request #40692 from sftim/20230414_automatically_use_latest_patch_for_minor_version
Use release data to calculate latest patch version
2 parents d659949 + 50d7e85 commit 6bf15f5

File tree

14 files changed

+67
-37
lines changed

14 files changed

+67
-37
lines changed

content/en/docs/concepts/containers/container-environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ FOO_SERVICE_PORT=<the port the service is running on>
5151
```
5252

5353
Services have dedicated IP addresses and are available to the Container via DNS,
54-
if [DNS addon](https://releases.k8s.io/{{< param "fullversion" >}}/cluster/addons/dns/) is enabled. 
54+
if [DNS addon](https://releases.k8s.io/v{{< skew currentPatchVersion >}}/cluster/addons/dns/) is enabled. 
5555

5656

5757

content/en/docs/reference/access-authn-authz/abac.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ up the verbosity:
126126
{"apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": {"group": "system:unauthenticated", "readonly": true, "nonResourcePath": "*"}}
127127
```
128128

129-
[Complete file example](https://releases.k8s.io/{{< param "fullversion" >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
129+
[Complete file example](https://releases.k8s.io/v{{< skew currentPatchVersion >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
130130

131131
## A quick note on service accounts
132132

content/en/docs/tasks/administer-cluster/kubeadm/upgrading-windows-nodes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ upgrade the control plane nodes before upgrading your Windows nodes.
2727
1. From the Windows node, upgrade kubeadm:
2828

2929
```powershell
30-
# replace {{< param "fullversion" >}} with your desired version
31-
curl.exe -Lo <path-to-kubeadm.exe> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubeadm.exe"
30+
# replace {{< skew currentPatchVersion >}} with your desired version
31+
curl.exe -Lo <path-to-kubeadm.exe> "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubeadm.exe"
3232
```
3333
3434
### Drain the node
@@ -62,15 +62,15 @@ upgrade the control plane nodes before upgrading your Windows nodes.
6262
6363
```powershell
6464
stop-service kubelet
65-
curl.exe -Lo <path-to-kubelet.exe> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubelet.exe"
65+
curl.exe -Lo <path-to-kubelet.exe> "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubelet.exe"
6666
restart-service kubelet
6767
```
6868
6969
2. From the Windows node, upgrade and restart the kube-proxy.
7070
7171
```powershell
7272
stop-service kube-proxy
73-
curl.exe -Lo <path-to-kube-proxy.exe> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kube-proxy.exe"
73+
curl.exe -Lo <path-to-kube-proxy.exe> "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kube-proxy.exe"
7474
restart-service kube-proxy
7575
```
7676

content/en/docs/tasks/administer-cluster/verify-signed-artifacts.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ standalone binaries) by using cosign's keyless signing. To verify a particular
2727
binary, retrieve it together with its signature and certificate:
2828

2929
```bash
30-
URL=https://dl.k8s.io/release/v{{< skew currentVersion >}}.0/bin/linux/amd64
30+
URL=https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/linux/amd64
3131
BINARY=kubectl
3232

3333
FILES=(
@@ -64,7 +64,7 @@ Let's pick one image from this list and verify its signature using
6464
the `cosign verify` command:
6565

6666
```shell
67-
COSIGN_EXPERIMENTAL=1 cosign verify registry.k8s.io/kube-apiserver-amd64:v{{< skew currentVersion >}}.0
67+
COSIGN_EXPERIMENTAL=1 cosign verify registry.k8s.io/kube-apiserver-amd64:v{{< skew currentPatchVersion >}}
6868
```
6969

7070
{{< note >}}

content/en/docs/tasks/tools/install-kubectl-linux.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ The following methods exist for installing kubectl on Linux:
4343
To download a specific version, replace the `$(curl -L -s https://dl.k8s.io/release/stable.txt)`
4444
portion of the command with the specific version.
4545

46-
For example, to download version {{< param "fullversion" >}} on Linux x86-64, type:
46+
For example, to download version {{< skew currentPatchVersion >}} on Linux x86-64, type:
4747

4848
```bash
49-
curl -LO https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/linux/amd64/kubectl
49+
curl -LO https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/linux/amd64/kubectl
5050
```
5151

5252
And for Linux ARM64, type:

content/en/docs/tasks/tools/install-kubectl-macos.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ The following methods exist for installing kubectl on macOS:
4848
To download a specific version, replace the `$(curl -L -s https://dl.k8s.io/release/stable.txt)`
4949
portion of the command with the specific version.
5050

51-
For example, to download version {{< param "fullversion" >}} on Intel macOS, type:
51+
For example, to download version {{< skew currentPatchVersion >}} on Intel macOS, type:
5252

5353
```bash
54-
curl -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/darwin/amd64/kubectl"
54+
curl -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/darwin/amd64/kubectl"
5555
```
5656

5757
And for macOS on Apple Silicon, type:
5858

5959
```bash
60-
curl -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/darwin/arm64/kubectl"
60+
curl -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/darwin/arm64/kubectl"
6161
```
6262

6363
{{< /note >}}

content/en/docs/tasks/tools/install-kubectl-windows.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ The following methods exist for installing kubectl on Windows:
2727

2828
### Install kubectl binary with curl on Windows
2929

30-
1. Download the [latest release {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe).
30+
1. Download the latest {{< skew currentVersion >}} patch release:
31+
[kubectl {{< skew currentPatchVersion >}}](https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe).
3132

3233
Or if you have `curl` installed, use this command:
3334

3435
```powershell
35-
curl.exe -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe"
36+
curl.exe -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe"
3637
```
3738

3839
{{< note >}}
@@ -45,7 +46,7 @@ The following methods exist for installing kubectl on Windows:
4546
Download the `kubectl` checksum file:
4647

4748
```powershell
48-
curl.exe -LO "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe.sha256"
49+
curl.exe -LO "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe.sha256"
4950
```
5051

5152
Validate the `kubectl` binary against the checksum file:
@@ -179,15 +180,15 @@ Below are the procedures to set up autocompletion for PowerShell.
179180
1. Download the latest release with the command:
180181

181182
```powershell
182-
curl.exe -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl-convert.exe"
183+
curl.exe -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl-convert.exe"
183184
```
184185

185186
1. Validate the binary (optional).
186187

187188
Download the `kubectl-convert` checksum file:
188189

189190
```powershell
190-
curl.exe -LO "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubectl-convert.exe.sha256"
191+
curl.exe -LO "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl-convert.exe.sha256"
191192
```
192193

193194
Validate the `kubectl-convert` binary against the checksum file:

content/en/docs/tutorials/security/cluster-level-pss.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ that are most appropriate for your configuration, do the following:
5252
The output is similar to:
5353
```
5454
Creating cluster "psa-wo-cluster-pss" ...
55-
✓ Ensuring node image (kindest/node:v{{< skew currentVersion >}}.0) 🖼
55+
✓ Ensuring node image (kindest/node:v{{< skew currentPatchVersion >}}) 🖼
5656
✓ Preparing nodes 📦
5757
✓ Writing configuration 📜
5858
✓ Starting control-plane 🕹️
@@ -268,7 +268,7 @@ following:
268268
The output is similar to this:
269269
```
270270
Creating cluster "psa-with-cluster-pss" ...
271-
✓ Ensuring node image (kindest/node:v{{< skew currentVersion >}}.0) 🖼
271+
✓ Ensuring node image (kindest/node:v{{< skew currentPatchVersion >}}) 🖼
272272
✓ Preparing nodes 📦
273273
✓ Writing configuration 📜
274274
✓ Starting control-plane 🕹️

content/en/docs/tutorials/security/ns-level-pss.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Install the following on your workstation:
3838

3939
```
4040
Creating cluster "psa-ns-level" ...
41-
✓ Ensuring node image (kindest/node:v{{< skew currentVersion >}}.0) 🖼
41+
✓ Ensuring node image (kindest/node:v{{< skew currentPatchVersion >}}) 🖼
4242
✓ Preparing nodes 📦
4343
✓ Writing configuration 📜
4444
✓ Starting control-plane 🕹️

content/en/docs/tutorials/services/connect-applications-service.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ about the [service proxy](/docs/concepts/services-networking/service/#virtual-ip
160160
161161
Kubernetes supports 2 primary modes of finding a Service - environment variables
162162
and DNS. The former works out of the box while the latter requires the
163-
[CoreDNS cluster addon](https://releases.k8s.io/{{< param "fullversion" >}}/cluster/addons/dns/coredns).
163+
[CoreDNS cluster addon](https://releases.k8s.io/v{{< skew currentPatchVersion >}}/cluster/addons/dns/coredns).
164164
165165
{{< note >}}
166166
If the service environment variables are not desired (because possible clashing
167167
with expected program ones, too many variables to process, only using DNS, etc)
168168
you can disable this mode by setting the `enableServiceLinks` flag to `false` on
169-
the [pod spec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#pod-v1-core).
169+
the [pod spec](/docs/reference/generated/kubernetes-api/v{{< skew latestVersion >}}/#pod-v1-core).
170170
{{< /note >}}
171171
172172

0 commit comments

Comments
 (0)