Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Mar 6, 2024
2 parents feb1563 + 420d06e commit 686ea4a
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 451 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
mode: exactly
count: 1
labels: "kind/bug, kind/cleanup, kind/feature, kind/i18n, dependencies"
labels: "kind/bug, kind/cleanup, kind/documentation, kind/feature, kind/i18n, dependencies"

pull-request-title-check:
name: Pull request title check
Expand Down
64 changes: 64 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Development

## Architecture

The Kubernetes Dashboard consists of a few main modules:

- API — Stateless Go module, which could be referred to as a Kubernetes API extension. It provides functionalities like:
- Aggregation (i.e., returning metrics and events for pods)
- Sorting
- Filtering
- Pagination
- Auth — Go module handling authentication to the Kubernetes API.
- Web — Module containing web application written in Angular and Go server with some web-related logic (i.e., settings). Its main task is presenting data fetched from Kubernetes API through API module.
- Metrics Scraper — Go module used to scrape and store a small window of metrics fetched from the Kubernetes Metrics Server.

## Code Conventions

When writing new Go code, we try to follow conventions described in [Effective Go](https://golang.org/doc/effective_go.html). We are using [Go Report Card](https://goreportcard.com/report/github.com/kubernetes/dashboard) to monitor how well we are doing.

For Angular, we try to follow conventions described in [Angular Style Guide](https://angular.io/guide/styleguide) and [Material Design Guidelines](https://material.io/guidelines/).

We are running a set of checks for each pull request, all of them have to be successful before the change can be merged. You can run most of them locally using `make` targets, i.e. `make test` or `make check` (see [`Makefile`](Makefile) for more information).

Tools that we are using include [golangci-lint](https://github.com/golangci/golangci-lint), [eslint](https://eslint.org), [stylelint](https://github.com/stylelint/stylelint), [prettier](https://prettier.io/).

## Development Environment

Make sure the following software is installed and added to your path:

- [Docker](https://docs.docker.com/engine/install/)
- [Go](https://golang.org/dl/) (check the required version in [`modules/go.work`](modules/go.work))
- [Node.js](https://nodejs.org/en/download) (check the required version in [`modules/web/package.json`](modules/web/package.json))
- [Yarn](https://yarnpkg.com/getting-started/install) (check the required version in [`modules/web/.yarnrc.yml`](modules/web/.yarnrc.yml))

## Getting Started

After cloning the repository, install web dependencies with `cd modules/web && yarn`.

Then you can start the development version of the application with `make serve` It will create local kind cluster and run all the modules with Docker compose.

If you would like to run production version use `make run`

To create Docker images locally use `make image`.

See [`Makefile`](Makefile) to get to know other targets useful during development. You can also run `make help` to quickly check the list of available commands.

## Dependency Management

We keep all the dependencies outside the repository and always try to avoid using suspicious, unknown dependencies as they may introduce vulnerabilities.

We use [go mod](https://github.com/golang/go/wiki/Modules) to manage Go dependencies. We try to use only official releases, avoid using specific or latest commits. Before sending any changes we run `go mod tidy` to remove unused dependencies.

We use [Yarn](https://yarnpkg.com/) to manage JavaScript dependencies. After checking out repository, run `yarn` to install all dependencies.

Additionally, we use [Dependabot](https://github.com/dependabot) to automate dependency updates.


## Releases

We follow [semver](https://semver.org/) versioning scheme for versioning releases of app and all of its modules.

Each module described in the [Architecture section](#architecture) has its own releases and versions. After testing everything on a production version of application, i.e., using `make run`, new release can be created. For modules described above we create tag and the release with module name and its version in it, i.e.`api/v1.0.0` or `web/v2.4.5`. After a new tag is created, new images should be built by GitHub actions.

We also create application releases by releasing a new version of Helm chart that uses modules described before. After applying all the changes to the chart and testing it on a Kubernetes cluster a new tag and the release can be created. For application releases we put only the version in the tag and release name, i.e. `v3.0.0`. This release should include detailed description including release notes, compatibility matrix and all other important information.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,18 @@ You can install Dashboard using `kubectl` as described in the installation instr

## Access

You can access Dashboard as described in the instructions that can be found in the [access guide](docs/user/accessing-dashboard/README.md).
You can access the Dashboard as described in the instructions that can be found in the [access guide](docs/user/accessing-dashboard/README.md).

## Create An Authentication Token (RBAC)
To find out how to create sample user and log in follow [Creating sample user](docs/user/access-control/creating-sample-user.md) guide.

**NOTE:**
* Kubeconfig Authentication method does not support external identity providers or certificate-based authentication.
* [Metrics-Server](https://github.com/kubernetes-sigs/metrics-server) has to be running in the cluster for the metrics and graphs to be available. Read more about it in [Integrations](docs/user/integrations.md) guide.

## Documentation

Dashboard documentation can be found on [docs](docs/README.md) directory which contains:

* [Common](docs/common/README.md): Entry-level overview.
* [User Guide](docs/user/README.md): [Accessing Dashboard](docs/user/accessing-dashboard/README.md) and more for users.
* [Developer Guide](docs/developer/README.md): Important information for contributors that would like to test, run and work on Dashboard locally.
* [Developer Guide](DEVELOPMENT.md): Important information for contributors that would like to test, run and work on Dashboard locally.

## Community, discussion, contribution, and support

Expand Down
11 changes: 2 additions & 9 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* [FAQ](common/faq.md)
* [Dashboard arguments](common/arguments.md)
* [Internationalization](common/internationalization.md)

## [User Guide](user/README.md)

Expand All @@ -13,15 +14,7 @@
* [Integrations](user/integrations.md)
* [Labels](user/labels.md)

## [Developer Guide](developer/README.md)

* [Getting started](developer/getting-started.md)
* [Release procedures](developer/release-procedures.md)
* [Dependency management](developer/dependency-management.md)
* [Architecture](developer/architecture.md)
* [Code conventions](developer/code-conventions.md)
* [Text conventions](developer/text-conventions.md)
* [Internationalization](developer/internationalization.md)
## [Developer Guide](../DEVELOPMENT.md)

----
_Copyright 2019 [The Kubernetes Dashboard Authors](https://github.com/kubernetes/dashboard/graphs/contributors)_
4 changes: 0 additions & 4 deletions docs/common/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

In case you did not find any answer here and in [closed issues](https://github.com/kubernetes/dashboard/issues?q=is%3Aissue+is%3Aclosed), [create new issue](https://github.com/kubernetes/dashboard/issues/new/choose).

### I would like to use development environment on HTTPS, how to do it?

Refer to our [Developer guide](../developer/getting-started.md).

### I cannot see any graphs in Dashboard, how to enable them?

Make sure, that `metrics-server` and `dashboard-metrics-scraper` are up and running and Dashboard was able to connect with `dashboard-metrics-scraper`. You should check Dashboard logs and look for `metric` and `scraper` keywords. You can find more informations about Dashboard's Integrations [here](../user/integrations.md).
Expand Down
File renamed without changes.
25 changes: 0 additions & 25 deletions docs/developer/README.md

This file was deleted.

49 changes: 0 additions & 49 deletions docs/developer/architecture.md

This file was deleted.

48 changes: 0 additions & 48 deletions docs/developer/code-conventions.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/developer/dependency-management.md

This file was deleted.

Loading

0 comments on commit 686ea4a

Please sign in to comment.