Code Monkey home page Code Monkey logo

downloadkubernetes's Introduction

Download Kubernetes

Build locally

  1. Run go run ./cmd/update-index/main.go
  2. Build assets with npm run build
  3. Open dist/index.html with a browser, from the command line: open dist/index.html

Architecture

The published artifacts are static HTML/CSS/JavaScript files. They are updated offline by the update-index command and then published to the web via Netlify.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

downloadkubernetes's People

Contributors

chuckha avatar cpanato avatar dependabot[bot] avatar dipesh-rawat avatar justaugustus avatar k8s-ci-robot avatar khos2ow avatar kranurag7 avatar randomvariable avatar rjsadow avatar saschagrunert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

downloadkubernetes's Issues

Update index automatically

We should find a way to run make update-index periodically and automatically either via GitHub actions or prow.

/help
/sig-release

Integrate prow

Hey again πŸ‘‹,

I think we could integrate prow for basic CI/CD testing. Beside that we could also create a periodic job to update the website without any human interaction. I think this requires #10.

Access Points-2023/08/25-05:29:29

Time Stamp|SSID|BSSID|Strength|Primary Channel|Primary Frequency|Center Channel|Center Frequency|Width (Range)|Distance|802.11mc|Security
2023/08/25-05:29:29|VODAFONE5F54|0c:73:29:73:5f:55|-91dBm|1|2412MHz|1|2412MHz|20MHz (2402 - 2422)|~350.9m|false|[WPA2-PSK-CCMP][RSN-PSK-CCMP][V][ESS][WPS]
2023/08/25-05:29:29|Basson|50:0f:f5:9b:3b:f1|-95dBm|11|2462MHz|11|2462MHz|20MHz (2452 - 2472)|~544.8m|false|[WPA2-PSK-CCMP][RSN-PSK-CCMP][ESS][WPS]
2023/08/25-05:29:29|HUAWEI-B315-5F07|5c:a8:6a:94:5f:07|-84dBm|11|2462MHz|11|2462MHz|20MHz (2452 - 2472)|~153.5m|false|[WPA2-PSK-CCMP][RSN-PSK-CCMP][K][ESS]
2023/08/25-05:29:29|VODAFONE8EF8|7c:8f:de:63:8e:f9|-70dBm|11|2462MHz|11|2462MHz|20MHz (2452 - 2472)|~30.6m|false|[WPA2-PSK-CCMP][RSN-PSK-CCMP][V][ESS][WPS]
2023/08/25-05:29:29|VODAFONE8EF8_5G|7c:8f:de:63:8e:fd|-88dBm|40|5200MHz|42|5210MHz|80MHz (5170 - 5250)|~115.2m|false|[WPA2-PSK-CCMP][RSN-PSK-CCMP][V][ESS][WPS]
2023/08/25-05:29:29|Newyork|d4:6e:0e:c2:d0:40|-87dBm|1|2412MHz|3|2422MHz|40MHz (2402 - 2442)|~221.4m|false|[WPA2-PSK-CCMP][RSN-PSK-CCMP][ESS][WPS]
2023/08/25-05:29:29|MD37_2.4GHz|d8:32:14:f2:aa:a0|-94dBm|1|2412MHz|3|2422MHz|40MHz (2402 - 2442)|~495.6m|false|[WPA-PSK-CCMP][WPA2-PSK-CCMP][RSN-PSK-CCMP][ESS]
2023/08/25-05:29:29|MD37_2.4GHz|e8:78:29:10:74:d3|-81dBm|1|2412MHz|3|2422MHz|40MHz (2402 - 2442)|~110.9m|false|[WPA-PSK-TKIP+CCMP][K][V][WPA2-PSK-TKIP+CCMP][RSN-PSK-TKIP+CCMP][K][V][ESS][WPS]

check-index.sh currently does not exit on some grep errors

When running the script detached from the repository content, the script attempts to execute grep on dist/index.html:

if [ "$result" -eq 1 ]; then
echo "$tag not found in the index.html, please update the index.html file"
(( status++ ))
fi

When this file is missing grep exits with status 2. Since this is performing an affirmative equality test (as opposed to "not equal to zero" or "greater than zero") this passes the test and proceeds without exiting. Additionally the use of

Also, on line 34 status is being initialized as an indexed array but in it's assignment operation on line 39 it's only using the zeroth element as opposed to individual indexes. This lead to unintended behavior upon execution of lines 45 - 47:

if [[ "$value" -ge 1 ]]; then
exit 1
fi

This admittedly this may be a failure case considered NOTABUG/WONTFIX by the maintainers) but was raised just in case this is not the intended behavior. As to what the intended behavior is though, I'm not entirely clear. I noticed that grep is being executed with the flags -Rq. Consulting man 1 grep on these options yields the following:

-q, --quiet, --silent
Quiet; do not write anything to standard output. Exit immediately with zero status if any match is found, even if an error was detected. Also see the -s or --no-messages option.

-R, --dereference-recursive
Read all files under each directory, recursively. Follow all symbolic links, unlike -r.

Since all output is being redirected to /dev/null i'm assuming -q is being added to make the script a bit more robust. Is this correct? In the case of -R i'm a bit more unclear. Since there is a file operand being used as a positional argument is this just to handle a use case where INDEXFILE is a symbolic link?

As an example of the current state see the following (click to expand)
$ bash -x  check-index.sh 
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+ LASTRELEASES=3
+ COUNTER=0
+ RELEASES=()
+ INDEXFILE=dist/index.html
++ curl -Ls https://dl.k8s.io/release/stable.txt
+ LATEST=v1.21.1
++ echo v1.21.1
++ cut -dv -d. -f1
+ LATESTMAJOR=v1
++ echo v1.21.1
++ cut -d. -f2
+ LATESTMINOR=21
+ RELEASES+=("$LATEST")
+ get_kubernetes_releases
+ echo 'Getting Kubernetes releases'
Getting Kubernetes releases
+ '[' 0 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.20.txt
+ TEMP=v1.20.7
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 1 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.19.txt
+ TEMP=v1.19.11
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 2 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.18.txt
+ TEMP=v1.18.19
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 3 -lt 3 ']'
+ echo 'Will validate the index.html using the following releases: ' v1.21.1 v1.20.7 v1.19.11 v1.18.19
Will validate the index.html using the following releases:  v1.21.1 v1.20.7 v1.19.11 v1.18.19
+ check_index
+ status=()
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.21.1 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.20.7 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.19.11 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.18.19 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
[~/.local/bin]$ vim /tmp/ci.sh 
[~/.local/bin]$ bash -x  /tmp/ci.sh 
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+ LASTRELEASES=3
+ COUNTER=0
+ RELEASES=()
+ INDEXFILE=dist/index.html
++ curl -Ls https://dl.k8s.io/release/stable.txt
+ LATEST=v1.21.1
++ echo v1.21.1
++ cut -dv -d. -f1
+ LATESTMAJOR=v1
++ echo v1.21.1
++ cut -d. -f2
+ LATESTMINOR=21
+ RELEASES+=("$LATEST")
+ get_kubernetes_releases
+ echo 'Getting Kubernetes releases'
Getting Kubernetes releases
+ '[' 0 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.20.txt
+ TEMP=v1.20.7
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 1 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.19.txt
+ TEMP=v1.19.11
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 2 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.18.txt
+ TEMP=v1.18.19
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 3 -lt 3 ']'
+ echo 'Will validate the index.html using the following releases: ' v1.21.1 v1.20.7 v1.19.11 v1.18.19
Will validate the index.html using the following releases:  v1.21.1 v1.20.7 v1.19.11 v1.18.19
+ check_index
+ status=()
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.21.1 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.20.7 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.19.11 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.18.19 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -eq 1 ']'
$ echo $?
0
When line 37 is changed from `-eq` to `-ge` the behavior changes as follows (click to expand)
$ bash -x  /tmp/ci.sh 
+ set -o errexit
+ set -o nounset
+ set -o pipefail
+ LASTRELEASES=3
+ COUNTER=0
+ RELEASES=()
+ INDEXFILE=dist/index.html
++ curl -Ls https://dl.k8s.io/release/stable.txt
+ LATEST=v1.21.1
++ echo v1.21.1
++ cut -dv -d. -f1
+ LATESTMAJOR=v1
++ echo v1.21.1
++ cut -d. -f2
+ LATESTMINOR=21
+ RELEASES+=("$LATEST")
+ get_kubernetes_releases
+ echo 'Getting Kubernetes releases'
Getting Kubernetes releases
+ '[' 0 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.20.txt
+ TEMP=v1.20.7
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 1 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.19.txt
+ TEMP=v1.19.11
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 2 -lt 3 ']'
+ ((  LATESTMINOR--  ))
++ curl -Ls https://dl.k8s.io/release/stable-1.18.txt
+ TEMP=v1.18.19
+ RELEASES+=("$TEMP")
+ ((  COUNTER++  ))
+ '[' 3 -lt 3 ']'
+ echo 'Will validate the index.html using the following releases: ' v1.21.1 v1.20.7 v1.19.11 v1.18.19
Will validate the index.html using the following releases:  v1.21.1 v1.20.7 v1.19.11 v1.18.19
+ check_index
+ status=()
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.21.1 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -ge 1 ']'
+ echo 'v1.21.1 not found in the index.html, please update the index.html file'
v1.21.1 not found in the index.html, please update the index.html file
+ ((  status++  ))
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.20.7 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -ge 1 ']'
+ echo 'v1.20.7 not found in the index.html, please update the index.html file'
v1.20.7 not found in the index.html, please update the index.html file
+ ((  status++  ))
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.19.11 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -ge 1 ']'
+ echo 'v1.19.11 not found in the index.html, please update the index.html file'
v1.19.11 not found in the index.html, please update the index.html file
+ ((  status++  ))
+ for tag in "${RELEASES[@]}"
++ grep -Rq v1.18.19 dist/index.html
grep: dist/index.html: No such file or directory
++ echo 2
+ result=2
+ '[' 2 -ge 1 ']'
+ echo 'v1.18.19 not found in the index.html, please update the index.html file'
v1.18.19 not found in the index.html, please update the index.html file
+ ((  status++  ))
+ for value in "${status[@]}"
+ [[ 4 -ge 1 ]]
+ exit 1

Again, referencing man 1 grep:

EXIT STATUS
Normally the exit status is 0 if a line is selected, 1 if no lines were selected, and 2 if an error occurred. However, if the -q or --quiet or --silent is used and a line is selected, the exit status is 0 even if an error occurred.

It may be useful to leave -eq 1 in place on line 37 but also add a second conditional branch checking for -eq 2. That said,
adding the conditional branch would only make sense if -q was removed from the grep execution.

Whether or not this is desirable is entirely dependent on the intention of the developers.

Update Build image

The netlify builds currently fail because of:

 The build image for this site uses Ubuntu 16.04 Xenial Xerus, which is no longer supported.

Updating the image should fix the CI.

(I’m on mobile right now so I can’t do it)

Rename branch from master to main

I think this is a quick win.
rename the branch master to main


Prerequisites

  • Create an issue in your repo to track the branch rename.
    You can paste this checklist in the issue body.

  • If you are not a root approver for the repo, assign a root
    approver for approval.

  • Once the issue has been approved, send a notice to your SIG's
    mailing list about the potential branch rename.

Changes pre-rename

Make the following changes before renaming the branch the master branch.

Note: There might be additional changes required that have not been
covered in this checklist.

Note: There might be additional information available in the umbrella issue via [kubernetes/org#2222].

Anytime

These changes are non-disruptive and can be made anytime before renaming
the branch.

  • If a presubmit or postsubmit prowjob triggers on the master branch
    (branches field of the prowjob), add the main branch to the list
    (see [kubernetes/test-infra#20665] for an example).

  • If the [milestone_applier] prow config references the master branch,
    add the main branch to the config (see [kubernetes/test-infra#20675] for an example).

  • If the [branch_protection] prow config references the master branch,
    add the main branch to the config.

Just before rename

These changes are disruptive and should be made just before renaming the
branch.

  • For periodic prowjobs, or any prowjob that mentions the master branch
    in base_ref, update them to the main branch. Ensure that these changes
    happen in lock-step with the branch rename (jobs triggered in between landing
    these changes and renaming the branch will fail).

    • For bootstrap-based jobs, ensure the branch is explicitly specified,
      e.g. kubernetes/foo=main. [kubernetes/test-infra#20667] may eventually
      allow for non-disruptive changes.
    • For pod-utils based jobs, ensure the branch is explicitly specified,
      e.g. base_ref: main. [kubernetes/test-infra#20672] may eventually allow
      for non-disruptive changes.
  • If a prowjob mentions master in its name, rename the job to not include
    the branch name, e.g. pull-repo-verify-master -> pull-repo-verify.
    [status-reconciler] should automatically migrate PR status contexts to the
    new job name, and retrigger accordingly, but we have anecdotally found it
    sometimes misses changes.

    • NOTE: our infrastructure doesn't understand the concept of job renames, so
      from the perspective of e.g. https://testgrid.k8s.io the job will appear to
      have lost history and start from scratch.
  • If a prowjob calls scripts or code in your repo that explicitly
    reference master, update all references to use main, or auto-detect the
    remote branch

    • e.g. using git to auto-detect
    # for existing clones, update their view of the remote
    git fetch origin
    git remote set-head origin -a
    # for new clones, or those updated as above, this prints "main" post-rename
    echo $(git symbolic-ref refs/remotes/origin/HEAD)
    • e.g. using github's api to auto-detect
    # gh is https://github.com/cli/cli, this will print "main" post-rename
    gh api /repos/kubernetes-sigs/slack-infra | jq -r .default_branch
  • If the repo has netlify configured for it, ask a member of the GitHub
    Management Team to rename the master branch to main in the netlify site config.
    It can't be controlled through the netlify config in the repo.

Approval

  • Once all non-disruptive tasks have been completed and disruptive tasks
    have been identified, assign the GitHub Management team ([@kubernetes/owners])
    for approval.

Rename the default branch

  • Rename the default branch from master to main using the GitHub UI
    by following the [official instructions].

Changes post-rename

After the default branch has been renamed to main, make the following
changes.

Note: There might be additional changes required that have not been
covered in this checklist.

Prowjobs

  • If a prowjob still references the master branch in the branches field,
    remove the master branch (see [kubernetes/test-infra#20669] for an example).

Prow config

  • If the [milestone_applier] prow config references the master branch,
    remove it from the config.

  • If the [branch_protection] prow config references the master branch,
    remove it from the config.

Other

  • If any docs reference the master branch, update to main
    (URLs will be automatically redirected).

  • Ensure that CI and PR tests work fine.

    • If there are any outstanding PRs you can /approve to merge, do so to verify
      that presubmits and postsubmits work as expected
  • Trial the local development experience with a pre-rename clone.

    • ensure [Github instructions to rename your local branch] work
    • consider updating your fork's default remote branch name such that if you
      have git autocompletion enabled, typing ma<tab> will autocomplete to main
  • Send a notice about the branch rename to your SIG's mailing list.
    Include the link to the [GitHub instructions to rename your local branch].

cc @saschagrunert @justaugustus @puerco @Verolop @xmudrii
/assign

Support building darwin/arm64 binaries for kubernetes control-plane components

I understand there is no darwin kubelet (yet). However, it'd be super helpful if we can support building darwin/arm64 binaries for for control-plane components: apiserver, controller-manager and scheduler.

An immediate beneficiary will be project kwok, which enables you to spin up a bare bone control plane in seconds. In its binary mode, it downloads binaries from dl.k8s.io, but no luck with darwin/arm64 :(

Ref issue: kubernetes-sigs/kwok#591

feat: Add support for signatures and certificates

For verification of binaries/executables with cosign 2.0, we need signatures and certificates but as of now on https://downloadkubernetes.com we only provide checksums that once can copy and use curl afterwards to get the checksums for authentication.

We can also add signatures and certificates apart from checksums that will help in quick verification of binaries.

A quick overview of how the page look afterwards.

Comma Separated

Screenshot from 2023-05-16 10-31-09

Bar Separated

Screenshot from 2023-05-16 10-35-12

Separate blocks for each

Screenshot from 2023-05-16 10-37-08

cc @cpanato

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.