Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 30 additions & 26 deletions docs/07-Release Notes/v0.22/v0.22.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ title: v0.22.21
sidebar_position: 1
---
# metal-stack v0.22.21
See original release note at [https://github.com/metal-stack/releases/releases/tag/untagged-7a025c0a46613d6e600b](https://github.com/metal-stack/releases/releases/tag/untagged-7a025c0a46613d6e600b)
## General
See original release note at [https://github.com/metal-stack/releases/releases/tag/v0.22.21](https://github.com/metal-stack/releases/releases/tag/v0.22.21)
## General
* [Gardener v1.140](https://github.com/gardener/gardener/releases/tag/v1.140.0)
## Noteworthy
## Noteworthy
* Add environment variables support to cosign verify. (metal-stack/ansible-common#50)
* Prometheus in the partition monitoring role can now be configured with additional labels. As some systems use `replica` while others use `__replica__` that may conflict, the label: `replica: '{{ inventory_hostname }}'` has been added to the defaults. If you make use of this configuration option and want to keep the `replica` label, make sure to include it explicitly. (metal-stack/metal-roles#702)
## Breaking Changes
## Breaking Changes
* In the `mgmt-server` role the misspelled `mgmt_server_routerid` is renamed to `mgmt_server_router_id`. Update your variables accordingly. The role will error on missing variable. (metal-stack/metal-roles#626)
## Component Releases
### csi-driver-lvm v0.9.1
## Component Releases
### csi-driver-lvm v0.9.1
* Support setting mount options via HelmChart (metal-stack/csi-driver-lvm#160) @serveric
### metal-roles v0.31.1
### metal-roles v0.31.1
* fix: change default apiserver admin token expiry to 16h (metal-stack/metal-roles#715) @mwennrich
* Fix mgmt-server FRR installation (metal-stack/metal-roles#668) @iljarotar
* fix(mgmt-server): use mgmt_server_router_id in frr.conf template (metal-stack/metal-roles#626) @GeertJohan
Expand All @@ -25,19 +25,19 @@ See original release note at [https://github.com/metal-stack/releases/releases/t
* Partition Prometheus Additional External Labels (metal-stack/metal-roles#702) @simcod
* Service account secret for virtual-garden-kubeconfig-refresher (metal-stack/metal-roles#713) @simcod
* Run the test workflow on pull requests (metal-stack/metal-roles#711) @GeertJohan
### metal-core v0.18.0
### metal-core v0.18.0
* Add option for SONiC interface naming schema (metal-stack/metal-core#208) @iljarotar
* Some cleanup and formatting (metal-stack/metal-core#210) @iljarotar
* register with RoomID (metal-stack/metal-core#193) @mwennrich
* Support additional routes to the management network gateway (metal-stack/metal-core#204) @GeertJohan
### helm-charts v0.7.8
### helm-charts v0.7.8
* Sync csi-driver-lvm chart v0.9.1. (metal-stack/helm-charts#176) @Gerrit91
### ansible-common v0.9.1
### ansible-common v0.9.1
* add existing env for proxy support, if set (metal-stack/ansible-common#50) @TLINDEN
### gardener-extension-provider-metal v0.27.12
* Update dependencies. (metal-stack/gardener-extension-provider-metal#507) @Gerrit91
* fix: change calico bpfConnectTimeLoadBalancing from default "TCP" to "Enabled", to also allow udp-connection from host to kubernetes services (metal-stack/gardener-extension-provider-metal#506) @mwennrich
# Merged Pull Requests
### gardener-extension-provider-metal v0.27.12
* Update dependencies. (metal-stack/gardener-extension-provider-metal#507) @Gerrit91
* fix: change calico bpfConnectTimeLoadBalancing from default "TCP" to "Enabled", to also allow udp-connection from host to kubernetes services (metal-stack/gardener-extension-provider-metal#506) @mwennrich
# Merged Pull Requests
This is a list of pull requests that were merged since the last release. The list does not contain pull requests from release-vector-repositories.

The fact that these pull requests were merged does not necessarily imply that they have already become part of this metal-stack release.
Expand All @@ -46,15 +46,19 @@ The fact that these pull requests were merged does not necessarily imply that th
* Fix Reconcile on Dualstack Firewalls (metal-stack/firewall-controller#227) @majst01
* Add link to management server iso generation repository (metal-stack/website#341) @muhittink
* Indicate the secrets used in the reusable workflows (metal-stack/actions-common#19) @Gerrit91
* Update to latest actions. (metal-stack/actions-common#20) @Gerrit91
* Allow to optionally pass a registry password. (metal-stack/actions-common#21) @Gerrit91
* Fix MEP-8 identity crisis (metal-stack/website#340) @GeertJohan
* Remove install-go (metal-stack/metal-images#426) @majst01
* Update go deps and actions (metal-stack/security#68) @majst01
* Update go deps and actions (metal-stack/metal-lib#213) @majst01
* Fix only completion (metal-stack/cli#50) @majst01
* Admin IP command (metal-stack/cli#47) @majst01
* Allow to set firewall vpn ip (metal-stack/metal-lib#214) @majst01
* chore(deps): bump the other-dependencies group across 1 directory with 6 updates (metal-stack/website#338) @dependabot[bot]
* Add `machine` cmd. (metal-stack/cli#51) @Gerrit91
* Prune components (metal-stack/cli#53) @majst01
* Update to latest actions. (metal-stack/actions-common#20) @Gerrit91
* Allow to optionally pass a registry password. (metal-stack/actions-common#21) @Gerrit91
* Fix MEP-8 identity crisis (metal-stack/website#340) @GeertJohan
* Remove install-go (metal-stack/metal-images#426) @majst01
* Update go deps and actions (metal-stack/security#68) @majst01
* Update go deps and actions (metal-stack/metal-lib#213) @majst01
* Fix only completion (metal-stack/cli#50) @majst01
* Admin IP command (metal-stack/cli#47) @majst01
* Allow to set firewall vpn ip (metal-stack/metal-lib#214) @majst01
* chore(deps): bump the other-dependencies group across 1 directory with 6 updates (metal-stack/website#338) @dependabot[bot]
* Add `machine` cmd. (metal-stack/cli#51) @Gerrit91
* Prune components (metal-stack/cli#53) @majst01
* Metal stack v0.22.20 with sync fixes (metal-stack/website#343) @vknabel
* chore: bump deps (metal-stack/website#344) @vknabel
* FI-TS C5 blogpost (metal-stack/website#342) @philiphaas
* Next release (metal-stack/releases#315) @metal-robot[bot]
175 changes: 52 additions & 123 deletions docs/08-References/Clients/metalctl/metalctl.md
Original file line number Diff line number Diff line change
@@ -1,135 +1,64 @@
---
slug: /references/metalctl
title: metalctl
sidebar_position: 1
sidebar_position: 0
---

# metalctl
## metalctl

*metalctl* is the command line client to access the [metal-api](https://github.com/metal-stack/metal-api).
a cli to manage entities in the metal-stack api

## Installation
### Options

Download locations:

- [metalctl-linux-amd64](https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-linux-amd64)
- [metalctl-darwin-amd64](https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-darwin-amd64)
- [metalctl-darwin-arm64](https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-darwin-arm64)
- [metalctl-windows-amd64](https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-windows-amd64)

### Installation on Linux

```bash
curl -LO https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-linux-amd64
chmod +x metalctl-linux-amd64
sudo mv metalctl-linux-amd64 /usr/local/bin/metalctl
```

### Installation on MacOS

For x86 based Macs:

```bash
curl -LO https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-darwin-amd64
chmod +x metalctl-darwin-amd64
sudo mv metalctl-darwin-amd64 /usr/local/bin/metalctl
```

For Apple Silicon (M1) based Macs:

```bash
curl -LO https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-darwin-arm64
chmod +x metalctl-darwin-arm64
sudo mv metalctl-darwin-arm64 /usr/local/bin/metalctl
```

### Installation on Windows

```bash
curl -LO https://github.com/metal-stack/metalctl/releases/latest/download/metalctl-windows-amd64
copy metalctl-windows-amd64 metalctl.exe
```

### metalctl update

In order to keep your local `metalctl` installation up to date, you can update the binary like this:

```bash
metalctl update check
latest version:v0.8.3 from:2020-08-13T11:55:14Z
local version:v0.8.2 from:2020-08-12T09:27:39Z
metalctl is not up to date

metalctl update do
# a download with progress bar starts and replaces the binary. If the binary has root permissions please execute
sudo metalctl update do
# instead
```

### Built from project

```bash
make
sudo ln -sf $(pwd)/bin/metalctl /usr/local/bin/metalctl
--api-token string api token to authenticate. Can be specified with METALCTL_API_TOKEN environment variable.
--api-url string api server address. Can be specified with METALCTL_API_URL environment variable.
-c, --config string alternative config file path, (default is ~/.metalctl/config.yaml).
Example config.yaml:

---
apitoken: "alongtoken"
...


--debug debug output
--force-color force colored output even without tty
-h, --help help for metalctl
--kubeconfig string Path to the kube-config to use for authentication and authorization. Is updated by login. Uses default path if not specified.
--no-headers do not print headers of table output format (default print headers)
-o, --output-format string output format (table|wide|markdown|json|yaml|template), wide is a table with more columns. (default "table")
--template string output template for template output-format, go template format.
For property names inspect the output of -o json or -o yaml for reference.
Example for machines:

metalctl machine list -o template --template "{{ .id }}:{{ .size.id }}"


--yes-i-really-mean-it skips security prompts (which can be dangerous to set blindly because actions can lead to data loss or additional costs)
```

## Configuration

Set up auto-completion for `metalctl`, e.g. add to your `~/.bashrc`:

```bash
source <(metalctl completion bash)
```

Set up `metalctl` config, by first creating the config folder (`mkdir -p ~/.metalctl`), then set the values according to your installation in `~/.metalctl/config.yaml`:

```yaml
---
current: prod
contexts:
prod:
url: https://api.metal-stack.io/metal
issuer_url: https://dex.metal-stack.io/dex
client_id: metal_client
client_secret: 456
hmac: YOUR_HMAC
hmac_auth_type: THE_AUTH_TYPE_OF_YOUR_HMAC # Metal-Admin, Metal-Edit or Metal-View
```

Optional you can specify `issuer_type: generic` if you use other issuers as Dex, e.g. Keycloak (this will request scopes `openid,profile,email`):

```bash
contexts:
prod:
url: https://api.metal-stack.io/metal
issuer_url: https://keycloak.somedomain.io
issuer_type: generic
client_id: my-client-id
client_secret: my-secret
```

If you must specify special scopes for your issuer, you can use `custom_scopes`:

```bash
contexts:
prod:
url: https://api.metal-stack.io/metal
issuer_url: https://keycloak.somedomain.io
custom_scopes: roles,openid,profile,email
client_id: my-client-id
client_secret: my-secret
```

## Available commands

Full documentation is generated out of the cobra command implementation with:

`metalctl markdown`

generated markdown is [here](./metalctl.md) and [here](https://docs.metal-stack.io/stable/external/metalctl/README/)

## Development

For MacOS users, running the tests might throw an error because tests are utilizing [go-mpatch](https://github.com/undefinedlabs/go-mpatch) in order to manipulate the `time.Now` function. The patch allows testing with fixed timestamps.
### SEE ALSO

* [metalctl audit](./metalctl_audit.md) - manage audit trace entities
* [metalctl completion](./metalctl_completion.md) - Generate the autocompletion script for the specified shell
* [metalctl context](./metalctl_context.md) - manage metalctl context
* [metalctl filesystemlayout](./metalctl_filesystemlayout.md) - manage filesystemlayout entities
* [metalctl firewall](./metalctl_firewall.md) - manage firewall entities
* [metalctl firmware](./metalctl_firmware.md) - manage firmwares
* [metalctl health](./metalctl_health.md) - shows the server health
* [metalctl image](./metalctl_image.md) - manage image entities
* [metalctl login](./metalctl_login.md) - login user and receive token
* [metalctl logout](./metalctl_logout.md) - logout user from OIDC SSO session
* [metalctl machine](./metalctl_machine.md) - manage machine entities
* [metalctl markdown](./metalctl_markdown.md) - create markdown documentation
* [metalctl network](./metalctl_network.md) - manage network entities
* [metalctl partition](./metalctl_partition.md) - manage partition entities
* [metalctl project](./metalctl_project.md) - manage project entities
* [metalctl size](./metalctl_size.md) - manage size entities
* [metalctl switch](./metalctl_switch.md) - manage switch entities
* [metalctl tenant](./metalctl_tenant.md) - manage tenant entities
* [metalctl update](./metalctl_update.md) - update the program
* [metalctl version](./metalctl_version.md) - print the client and server version information
* [metalctl vpn](./metalctl_vpn.md) - access VPN
* [metalctl whoami](./metalctl_whoami.md) - shows current user

Instead, MacOS users can utilize the `make test-in-docker` target to execute the tests.
2 changes: 1 addition & 1 deletion docs/08-References/Clients/metalctl/metalctl_audit.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_audit
title: metalctl_audit
sidebar_position: 0
sidebar_position: 1
---

## metalctl audit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_audit_describe
title: metalctl_audit_describe
sidebar_position: 1
sidebar_position: 2
---

## metalctl audit describe
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_audit_list
title: metalctl_audit_list
sidebar_position: 2
sidebar_position: 3
---

## metalctl audit list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_completion
title: metalctl_completion
sidebar_position: 1
sidebar_position: 4
---

## metalctl completion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_completion_bash
title: metalctl_completion_bash
sidebar_position: 1
sidebar_position: 5
---

## metalctl completion bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_completion_fish
title: metalctl_completion_fish
sidebar_position: 2
sidebar_position: 6
---

## metalctl completion fish
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_completion_powershell
title: metalctl_completion_powershell
sidebar_position: 3
sidebar_position: 7
---

## metalctl completion powershell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_completion_zsh
title: metalctl_completion_zsh
sidebar_position: 4
sidebar_position: 8
---

## metalctl completion zsh
Expand Down
2 changes: 1 addition & 1 deletion docs/08-References/Clients/metalctl/metalctl_context.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_context
title: metalctl_context
sidebar_position: 2
sidebar_position: 9
---

## metalctl context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_context_short
title: metalctl_context_short
sidebar_position: 1
sidebar_position: 10
---

## metalctl context short
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
slug: /references/metalctl_filesystemlayout
title: metalctl_filesystemlayout
sidebar_position: 3
sidebar_position: 11
---

## metalctl filesystemlayout
Expand Down
Loading