feat(tools): add kubernetes homelab awareness tools
This commit is contained in:
@@ -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] },
|
||||
|
||||
Reference in New Issue
Block a user