mirror of
https://github.com/siderolabs/extensions.git
synced 2025-08-07 06:47:17 +02:00
feat: use ExtensionServiceConfig
document
Use `ExtensionServiceConfig` document for extensions using `.machine.files` or `environmentFile`. Ref: https://github.com/siderolabs/talos/pull/8273 Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
parent
fbaefd573c
commit
c677b87c58
@ -10,14 +10,15 @@ See [Installing Extensions](https://github.com/siderolabs/extensions#installing-
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
Configure the extension via `ExtensionServiceConfig` document.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
machine:
|
---
|
||||||
files:
|
apiVersion: v1alpha1
|
||||||
- content: |
|
kind: ExtensionServiceConfig
|
||||||
TS_AUTHKEY=<your auth key>
|
name: tailscale
|
||||||
permissions: 0o644
|
environment:
|
||||||
path: /var/etc/tailscale/auth.env
|
- TS_AUTHKEY=<your auth key>
|
||||||
op: create
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -52,14 +53,13 @@ Current known env vars are:
|
|||||||
|
|
||||||
A pratical example is enabling subnetrouting
|
A pratical example is enabling subnetrouting
|
||||||
```
|
```
|
||||||
machine:
|
---
|
||||||
files:
|
apiVersion: v1alpha1
|
||||||
- content: |
|
kind: ExtensionServiceConfig
|
||||||
TS_AUTHKEY=<your auth key>
|
name: tailscale
|
||||||
TS_ROUTES=10.96.0.0/12
|
environment:
|
||||||
permissions: 0o644
|
- TS_AUTHKEY=<your auth key>
|
||||||
path: /var/etc/tailscale/auth.env
|
- TS_ROUTES=10.96.0.0/12
|
||||||
op: create
|
|
||||||
```
|
```
|
||||||
|
|
||||||
10.96.0.0/12 is the service subnet talos uses by default (if you use a custom one, you will need to change it).
|
10.96.0.0/12 is the service subnet talos uses by default (if you use a custom one, you will need to change it).
|
||||||
|
@ -5,9 +5,9 @@ depends:
|
|||||||
- addresses
|
- addresses
|
||||||
- connectivity
|
- connectivity
|
||||||
- etcfiles
|
- etcfiles
|
||||||
|
- configuration: true
|
||||||
container:
|
container:
|
||||||
entrypoint: /usr/local/bin/containerboot
|
entrypoint: /usr/local/bin/containerboot
|
||||||
environmentFile: /var/etc/tailscale/auth.env
|
|
||||||
environment:
|
environment:
|
||||||
- PATH=/sbin:/usr/local/bin
|
- PATH=/sbin:/usr/local/bin
|
||||||
- TS_SOCKET=/var/run/tailscale/tailscaled.sock
|
- TS_SOCKET=/var/run/tailscale/tailscaled.sock
|
||||||
|
@ -6,22 +6,22 @@ See [Installing Extensions](https://github.com/siderolabs/extensions#installing-
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Configure the extension via `.machine.files`.
|
Configure the extension via `ExtensionServiceConfig` document.
|
||||||
You must replace upsmonHost and upsmonPasswd to match configuration on your nut server.
|
You must replace upsmonHost and upsmonPasswd to match configuration on your nut server.
|
||||||
See [upsd.users](https://networkupstools.org/docs/man/upsd.users.html) man page for details.
|
See [upsd.users](https://networkupstools.org/docs/man/upsd.users.html) man page for details.
|
||||||
|
|
||||||
On Talos SHUTDOWNCMD must be `/sbin/poweroff`
|
On Talos SHUTDOWNCMD must be `/sbin/poweroff`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
machine:
|
---
|
||||||
files:
|
apiVersion: v1alpha1
|
||||||
- path: /var/etc/nut/upsmon.conf
|
kind: ExtensionServiceConfig
|
||||||
permissions: 0o600
|
name: nut-client
|
||||||
op: create
|
configFiles:
|
||||||
content: |-
|
- content: |-
|
||||||
MONITOR ${upsmonHost} 1 remote ${upsmonPasswd} slave
|
MONITOR ${upsmonHost} 1 remote ${upsmonPasswd} slave
|
||||||
SHUTDOWNCMD "/sbin/poweroff"
|
SHUTDOWNCMD "/sbin/poweroff"
|
||||||
|
mountPath: /usr/local/etc/nut/upsmon.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
@ -6,6 +6,7 @@ depends:
|
|||||||
- connectivity
|
- connectivity
|
||||||
- etcfiles
|
- etcfiles
|
||||||
- path: /system/run/machined/machine.sock
|
- path: /system/run/machined/machine.sock
|
||||||
|
- configuration: true
|
||||||
container:
|
container:
|
||||||
entrypoint: ./upsmon
|
entrypoint: ./upsmon
|
||||||
args:
|
args:
|
||||||
@ -24,13 +25,6 @@ container:
|
|||||||
options:
|
options:
|
||||||
- bind
|
- bind
|
||||||
- ro
|
- ro
|
||||||
# Configuration provided via `.machine.files`.
|
|
||||||
- source: /var/etc/nut
|
|
||||||
destination: /usr/local/etc/nut
|
|
||||||
type: bind
|
|
||||||
options:
|
|
||||||
- bind
|
|
||||||
- ro
|
|
||||||
# `/sbin/init` talks to `machined`.
|
# `/sbin/init` talks to `machined`.
|
||||||
- source: /system/run/machined/machine.sock
|
- source: /system/run/machined/machine.sock
|
||||||
destination: /system/run/machined/machine.sock
|
destination: /system/run/machined/machine.sock
|
||||||
|
Loading…
Reference in New Issue
Block a user