Skip to content

Commit

Permalink
Remove trailing whitespace from all markdowns (k0sproject#925)
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <[email protected]>

Add github workflow for linting markdown

Signed-off-by: Kimmo Lehto <[email protected]>

Finetuning

Signed-off-by: Kimmo Lehto <[email protected]>

More tuning

Signed-off-by: Kimmo Lehto <[email protected]>

Path?

Signed-off-by: Kimmo Lehto <[email protected]>

Huge amount of manual fixes

Signed-off-by: Kimmo Lehto <[email protected]>

Second batch

Signed-off-by: Kimmo Lehto <[email protected]>

Third batch

Signed-off-by: Kimmo Lehto <[email protected]>

Does it need four indent?

Signed-off-by: Kimmo Lehto <[email protected]>

Maybe passes now

Signed-off-by: Kimmo Lehto <[email protected]>

Markdown is serious business

Signed-off-by: Kimmo Lehto <[email protected]>

Should be the last error

Signed-off-by: Kimmo Lehto <[email protected]>

Co-authored-by: Kimmo Lehto <[email protected]>
  • Loading branch information
kke and kke authored May 25, 2021
1 parent 50e067d commit be06618
Show file tree
Hide file tree
Showing 75 changed files with 1,314 additions and 1,127 deletions.
69 changes: 16 additions & 53 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,24 @@
name: Publish docs via GitHub Pages
name: Lint docs

on:
push:
branches:
- main
release:
types:
- published
- release-*
paths:
- '**.md'
pull_request:
branches:
- main
- release-*
paths:
- '**.md'
jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
name: Deploy docs
lint:
name: Lint markdown
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v2
- uses: actions/checkout@v1
- uses: articulate/actions-markdownlint@v1
with:
python-version: '3.x'
- name: Checkout deps
uses: actions/checkout@v2
with:
repository: lensapp/mkdocs-material-insiders
token: ${{ env.GITHUB_TOKEN }}
path: mkdocs-material-insiders

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip -v --log /tmp/pip.log install ./mkdocs-material-insiders
pip install mike
- name: Checkout K0s release
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: mkdocs deploy main
if: contains(github.ref, 'refs/heads/main')
run: |
mike deploy --push main
- name: Get the release version
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease # (don't generate for pre-releases)
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: mkdocs deploy new release
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease # (don't generate for pre-releases)
run: |
mike deploy --push --update-aliases ${{ steps.get_version.outputs.VERSION }} latest
mike set-default --push ${{ steps.get_version.outputs.VERSION }}
config: .github/workflows/markdownlint-config.json
8 changes: 8 additions & 0 deletions .github/workflows/markdownlint-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"default": true,
"line_length": false,
"no-bare-urls": false,
"first-line-h1": false,
"single-trailing-newline": false,
"ol-prefix": "one_or_ordered"
}
61 changes: 61 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- main
release:
types:
- published
jobs:
build:
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
name: Deploy docs
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Checkout deps
uses: actions/checkout@v2
with:
repository: lensapp/mkdocs-material-insiders
token: ${{ env.GITHUB_TOKEN }}
path: mkdocs-material-insiders

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip -v --log /tmp/pip.log install ./mkdocs-material-insiders
pip install mike
- name: Checkout K0s release
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: mkdocs deploy main
if: contains(github.ref, 'refs/heads/main')
run: |
mike deploy --push main
- name: Get the release version
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease # (don't generate for pre-releases)
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: mkdocs deploy new release
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease # (don't generate for pre-releases)
run: |
mike deploy --push --update-aliases ${{ steps.get_version.outputs.VERSION }} latest
mike set-default --push ${{ steps.get_version.outputs.VERSION }}
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# k0s Community Code Of Conduct

Please refer to our [contributor code of conduct](contributors/CODE_OF_CONDUCT.md).
Please refer to our [contributor code of conduct](contributors/CODE_OF_CONDUCT.md).
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# K0s Contributor Guide
Our contributor's guide can be found [here](docs/contributors/overview.md).

Please refer to our [contributor's guide](docs/contributors/overview.md).
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
![k0s network conformance](https://github.com/k0sproject/k0s/workflows/k0s%20Check%20Network/badge.svg)
[![Slack](https://img.shields.io/badge/join%20slack-%23k0s-4A154B.svg)](https://join.slack.com/t/k8slens/shared_invite/enQtOTc5NjAyNjYyOTk4LWU1NDQ0ZGFkOWJkNTRhYTc2YjVmZDdkM2FkNGM5MjhiYTRhMDU2NDQ1MzIyMDA4ZGZlNmExOTc0N2JmY2M3ZGI)
[![Go Reference](https://img.shields.io/badge/code%20reference-go.dev-bc42f5.svg)](https://pkg.go.dev/github.com/k0sproject/k0s)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/k0sproject/k0s?label=latest%20stable) ![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/k0sproject/k0s?include_prereleases&label=latest-release%20%28including+pre-release%29) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/k0sproject/k0s/latest)
![GitHub release (latest by date)](https://img.shields.io/github/v/release/k0sproject/k0s?label=latest%20stable) ![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/k0sproject/k0s?include_prereleases&label=latest-release%20%28including+pre-release%29) ![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/k0sproject/k0s/latest)

![GitHub Repo stars](https://img.shields.io/github/stars/k0sproject/k0s?color=blueviolet&label=Stargazers) [![Releases](https://img.shields.io/github/downloads/k0sproject/k0s/total.svg)](https://github.com/k0sproject/k0s/tags?label=Downloads)

Expand Down Expand Up @@ -34,6 +34,7 @@ If you'd like to try k0s, please jump to our:
- For docs, tutorials, and other k0s resources, see [docs main page](https://docs.k0sproject.io).

## Join the Community

If you'd like to help build k0s, please check out our guide to [Contributing](https://docs.k0sproject.io/latest/contributors/overview/) and our [Code of Conduct](https://docs.k0sproject.io/latest/contributors/CODE_OF_CONDUCT/).

## Motivation
Expand Down Expand Up @@ -80,6 +81,7 @@ k0s is ready for production (starting from v1.21.0+k0s.0). Since the initial rel
## Scope

While some Kubernetes distros package everything and the kitchen sink, k0s tries to minimize the amount of "add-ons" to bundle in. Instead, we aim to provide a robust and versatile "base" for running Kubernetes in various setups. Of course we will provide some ways to easily control and setup various "add-ons", but we will not bundle many of those into k0s itself. There are a couple of reasons why we think this is the correct way:

- Many of the addons such as ingresses, service meshes, storage etc. are VERY opinionated. We try to build this base with less opinions. :D
- Keeping up with the upstream releases with many external addons is very maintenance heavy. Shipping with old versions does not make much sense either.

Expand All @@ -90,29 +92,34 @@ With strong enough arguments we might take in new addons, but in general those s
`k0s` can be built in 3 different ways:

Fetch official binaries (except `konnectivity-server`, which are built from source):
```

```shell
make EMBEDDED_BINS_BUILDMODE=fetch
```

Build Kubernetes components from source as static binaries (requires docker):
```

```shell
make EMBEDDED_BINS_BUILDMODE=docker
```

Build k0s without any embedded binaries (requires that Kubernetes
binaries are pre-installed on the runtime system):
```

```shell
make EMBEDDED_BINS_BUILDMODE=none
```

Builds can be done in parallel:
```

```shell
make -j$(nproc)
```

## Smoke test

To run a smoke test after build:
```

```shell
make check-basic
```
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ We try to follow the practice of releasing often. That allows us to have smaller
## Creating a release

Creating a release happens via Github Actions by creating a git tag. Tag creation triggers the release workflow which will do most of the heavy-lifting:

- Create the actual release in [releases](https://github.com/k0sproject/k0s/releases/)
- Build `k0s` binary on both AMD64 and ARM64 architectures
- Push the bins into the release as downloadable assets
Expand Down
18 changes: 11 additions & 7 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
# Frequently asked questions

### How is k0s pronounced?
## How is k0s pronounced?

kay-zero-ess

### How do I run a single node cluster?
## How do I run a single node cluster?

The cluster can be started with:
`k0s controller --single

```shell
k0s controller --single
```

See also the [Getting Started](https://docs.k0sproject.io/latest/install/) tutorial.

### How do I connect to the cluster?
## How do I connect to the cluster?

You find the config in `${DATADIR}/pki/admin.conf` (default: `/var/lib/k0s/pki/admin.conf`). Copy this file, and change the `localhost` entry to the public ip of the controller. Use the modified config to connect with kubectl:
```

```shell
export KUBECONFIG=/path/to/admin.conf
kubectl ...
```

### Why doesn't `kubectl get nodes` list the k0s controllers?
## Why doesn't `kubectl get nodes` list the k0s controllers?

As a default, the control plane does not run kubelet at all, and will not accept any workloads, so the controller will not show up on the node list in kubectl. If you want your controller to accept workloads and run pods, you do so with:
`k0s controller --enable-worker` (recommended only as test/dev/POC environments).

### Is k0sproject really open source?
## Is k0sproject really open source?

Yes, k0sproject is 100% open source. The source code is under Apache 2 and the documentation is under the Creative Commons License. Mirantis, Inc. is the main contributor and sponsor for this OSS project: building all the binaries from upstream, performing necessary security scans and calculating checksums so that it's easy and safe to use. The use of these ready-made binaries are subject to Mirantis EULA and the binaries include only open source software.
14 changes: 9 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
# Overview

![k0s logo](img/k0s-logo-full-color.svg)

k0s is an all-inclusive Kubernetes distribution, configured with all of the features needed to build a Kubernetes cluster simply by copying and running an executable file on each target host.

## Key Features

- Available as a single static binary
- Offers a self-hosted, isolated control plane
- Supports a variety of storage backends, including etcd, SQLite, MySQL (or any
compatible), and PostgreSQL.
- Supports a variety of storage backends, including etcd, SQLite, MySQL (or any compatible), and PostgreSQL.
- Offers an Elastic control plane
- Vanilla upstream Kubernetes
- Supports custom container runtimes (containerd is the default)
- Supports custom Container Network Interface (CNI) plugins (calico is the
default)
- Supports custom Container Network Interface (CNI) plugins (calico is the default)
- Supports x86_64 and arm64

## Join the Community
We welcome your help in building k0s! If you are interested, we invite you to check out the [k0s Contributing Guide](contributors/overview.md) and our [Code of Conduct](contributors/CODE_OF_CONDUCT.md).

We welcome your help in building k0s! If you are interested, we invite you to check out the [k0s Contributing Guide](contributors/overview.md) and our [Code of Conduct](contributors/CODE_OF_CONDUCT.md).

## Demo

![k0s demo](img/k0s_demo.gif)

## Downloading k0s

[Download k0s](https://github.com/k0sproject/k0s/releases) for linux amd64 and arm64 architectures.

## Getting Started

[Creating A k0s Cluster](install.md)
31 changes: 16 additions & 15 deletions docs/airgap-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,54 @@ You can install k0s in an environment with restricted Internet access.
* A working cluster with at least one controller, to be used to
build the images bundle. For more information, refer to the [Quick Start Guide](install.md).

* The containerd CLI management tool `ctr`, installed on the worker machine (refer to the ContainerD [getting-started](https://containerd.io/docs/getting-started/) guide).
* The containerd CLI management tool `ctr`, installed on the worker machine (refer to the ContainerD [getting-started](https://containerd.io/docs/getting-started/) guide).

## 1. Create the OCI bundle

**Note**: k0s supports only uncompressed image bundles.

As OCI bundles are build specifically for each architecture, create an OCI bundle that uses the same processor architecture (x86-64, ARM64, ARMv7) as on the target system.

k0s offers two methods for creating OCI bundles, one using Docker and the other using a previously set up k0s worker. Be aware, though, that you cannot use the Docker method for the ARM architectures due to [kube-proxy image multiarch manifest problem](https://github.com/kubernetes/kubernetes/issues/98229).
k0s offers two methods for creating OCI bundles, one using Docker and the other using a previously set up k0s worker. Be aware, though, that you cannot use the Docker method for the ARM architectures due to [kube-proxy image multiarch manifest problem](https://github.com/kubernetes/kubernetes/issues/98229).

#### Docker
### Docker

1. Pull the images.

```
```shell
k0s airgap list-images | xargs -I{} docker pull {}
```

2. Create the bundle.

```
```shell
docker image save $(k0s airgap list-images | xargs) -o bundle_file
```

#### Previously set up k0s worker
### Previously set up k0s worker

As containerd pulls all images during the k0s worker normal bootstrap, you can use it to build the OCI bundle with images.
As containerd pulls all images during the k0s worker normal bootstrap, you can use it to build the OCI bundle with images.

Use following commands on a machine with an installed k0s worker:

```
# export IMAGES=`k0s airgap list-images | xargs`
# ctr --namespace k8s.io --address /run/k0s/containerd.sock images export bundle_file $IMAGES
```shell
ctr --namespace k8s.io \
--address /run/k0s/containerd.sock \
images export bundle_file $(k0s airgap list-images | xargs)
```

## 2. Sync the bundle file with the airgapped machine

Copy the `bundle_file` you created in the previous step to the target machine into the `images` directory in the k0s data directory.
Copy the `bundle_file` you created in the previous step to the target machine into the `images` directory in the k0s data directory.

```
```shell
# mkdir -p /var/lib/k0s/images
# cp bundle_file /var/lib/k0s/images/bundle_file
```

## 3. Ensure pull policy in the k0s.yaml (Optional)

Use the following `k0s.yaml` to ensure that containerd does not pull images for k0s components from the Internet at any time.
Use the following `k0s.yaml` to ensure that containerd does not pull images for k0s components from the Internet at any time.

```yaml
apiVersion: k0s.k0sproject.io/v1beta1
Expand All @@ -67,10 +68,10 @@ spec:

## 4. Set up the Controller

Refer to the [Quick Start Guide](install.md) for information on setting up the controller node.
Refer to the [Quick Start Guide](install.md) for information on setting up the controller node.

## 5. Set up a worker

Perform the worker set up on the airgapped machine.

**Note**: During start up the k0s worker imports all bundles from the `$K0S_DATA_DIR/images` before even starting `kubelet`.
**Note**: During start up the k0s worker imports all bundles from the `$K0S_DATA_DIR/images` before even starting `kubelet`.
Loading

0 comments on commit be06618

Please sign in to comment.