feat(tools): add kubernetes homelab awareness tools

This commit is contained in:
William Valentin
2026-02-16 14:31:33 -08:00
parent 21c986b671
commit 63df791b26
14 changed files with 501 additions and 4 deletions
+29
View File
@@ -849,6 +849,35 @@ describe('configSchema — skills watcher', () => {
});
});
describe('configSchema — k8s', () => {
const baseConfig = {
telegram: { bot_token: 'test-token', allowed_chat_ids: [123] },
models: { default: { provider: 'anthropic', model: 'claude-sonnet' } },
};
it('accepts config without k8s section', () => {
const result = configSchema.parse(baseConfig);
expect(result.k8s).toBeUndefined();
});
it('accepts k8s config with namespace restrictions', () => {
const result = configSchema.parse({
...baseConfig,
k8s: {
enabled: true,
kubectl_path: '/usr/local/bin/kubectl',
default_namespace: 'observability',
allowed_namespaces: ['observability', 'platform'],
},
});
expect(result.k8s?.enabled).toBe(true);
expect(result.k8s?.kubectl_path).toBe('/usr/local/bin/kubectl');
expect(result.k8s?.default_namespace).toBe('observability');
expect(result.k8s?.allowed_namespaces).toEqual(['observability', 'platform']);
});
});
describe('configSchema automation', () => {
const baseConfig = {
telegram: { bot_token: 'test-token', allowed_chat_ids: [123] },