-
|
The documentation docs has so many gaps, or rather, it doesn't describe anything at all, and I've been searching through all the issues/discussions/pull requests and other repositories for days, but I still don't know exactly how to use ExtensionServiceConfig for my own custom extension. Until now, the configurations for our custom extensions have always been stored under machine:
files:
- content: |
{
"cert_ttl_sec": 2592000,
"renewal_interval_sec": 3600
}
op: create
path: /var/extension-data/foo-ext/config.json
permissions: 0o600And our extension depends on this file: name: foo-ext
container:
entrypoint: /usr/bin/python3
args:
- /app/main.py
mounts:
- source: /var/extension-data/foo-ext
destination: /extension-data/foo-ext
type: bind
options:
- rshared
- rbind
- rw
depends:
- path: /var/extension-data/foo-ext/config.json
restart: alwaysHow should this now be done with ExtensionServiceConfig?This is my Extension file: name: foo-ext
container:
entrypoint: /usr/bin/python3
args:
- /app/main.py
mounts:
- source: /var/extension-data/foo-ext
destination: /extension-data/foo-ext
type: bind
options:
- rshared
- rbind
- rw
depends:
- configuration: true # <-- This is needed to say Talos that an ExtensionServiceConfig is needed for this Extension
restart: alwaysAnd this is my ExtensionServiceConfig: apiVersion: v1alpha1
kind: ExtensionServiceConfig
name: foo-ext
configFiles:
- content: |
{
"cert_ttl_sec": 2592000,
"renewal_interval_sec": 3800
}
mountPath: /var/extension-data/foo-ext/config.jsonBut when I apply it, my extension crashes because it cannot find the file And when I try to show me the file with So what is the correct way? Summary what I've done:
Talos version: 1.10.6 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
when using The |
Beta Was this translation helpful? Give feedback.
when using
ExtensionServiceConfigthe app yaml definition doesn't need a mount at all, the extensionservice config adds that at runtime.The
ExtensionServiceConfigname should be justfoonotfoo-ext