Skip to content

Commit c484fdf

Browse files
committed
Update kubeadm CertificateValidity time to ten years
1 parent ab69524 commit c484fdf

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/workflows/kubeadm.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Build kubeadm binary
3+
4+
on:
5+
push:
6+
tag:
7+
- 'v*'
8+
jobs:
9+
build:
10+
runs-on: ubuntu-20.04
11+
if: startsWith(github.ref, 'refs/tags/')
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Build kubeadm binary
17+
shell: bash
18+
run: |
19+
build/run.sh make kubeadm KUBE_BUILD_PLATFORMS=linux/amd64
20+
build/run.sh make kubeadm KUBE_BUILD_PLATFORMS=linux/arm64
21+
22+
- name: Prepare for upload
23+
shell: bash
24+
run: |
25+
mv _output/dockerized/bin/linux/amd64/kubeadm kubeadm-linux-amd64
26+
mv _output/dockerized/bin/linux/arm64/kubeadm kubeadm-linux-arm64
27+
sha256sum kubeadm-linux-{amd64,arm64} > sha256sum.txt
28+
29+
- name: Release and upload packages
30+
uses: softprops/action-gh-release@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
with:
34+
files: |
35+
sha256sum.txt
36+
kubeadm-linux-amd64
37+
kubeadm-linux-arm64

cmd/kubeadm/app/constants/constants.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const (
4747
TempDirForKubeadm = "tmp"
4848

4949
// CertificateValidity defines the validity for all the signed certificates generated by kubeadm
50-
CertificateValidity = time.Hour * 24 * 365
50+
CertificateValidity = time.Hour * 24 * 3650
5151

5252
// DefaultCertificateDir defines default certificate directory
5353
DefaultCertificateDir = "pki"

0 commit comments

Comments
 (0)