feat: add catalog aws and k8s subcommands - #226
Merged
Conversation
Adds `cortex catalog aws -t <tag>` and `cortex catalog k8s -t <tag>` to retrieve cached AWS and Kubernetes resource details for an entity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add argo-deploy-rollout.yaml (canary with stepped weights) - Add argo-workloadref-rollout.yaml (Deployment + Rollout via workloadRef) - Add hostAliases comment block to helm deployment.yaml for local testing - Add .helmignore and README.md to helm chart Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Calls `cortex catalog k8s -t k8s-test-annotation` to verify k8s data is accessible via the public API, replacing the Playwright UI test suggestion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Profile files (.env.<name>) contain only the vars that differ per environment. `just env <profile>` patches them into .env without touching shared vars. Includes .env.local.example for local dev and .env.default.example for cloud workspaces. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace sed substitution with grep -v + append approach so the value is never used in a regex pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CORTEX_BASE_URL in .env uses host.minikube.internal (for the in-cluster agent) which doesn't resolve on the host. Use -t CORTEX_TENANT_CODE so the CLI reads the host-accessible URL from ~/.cortex/config instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Catch requests.ConnectionError around the HTTP call and print a clean one-line error message instead of a multi-page Python traceback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Stop swallowing errors with || true. Capture exit code and report failures clearly. Exit non-zero if any check fails. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…-label - Unset CORTEX_BASE_URL and CORTEX_API_KEY in catalog create call so it uses the tenant config from ~/.cortex/config instead of exported env vars - Rename entity tag from k8s-test-annotation to k8s-test-label across cortex-entity.yaml, all k8s manifests, and the test recipe Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When the configmap changes (e.g. BASE_URL switches between cloud and local), the sha256 checksum annotation on the pod template changes, causing Helm to trigger a rolling restart automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cortex.io/tag value is a k8s annotation, so the entity name should reflect that. Renamed from k8s-test-label to k8s-test-annotation across entity YAML, all manifests, and the test recipe. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display type, namespace/name, and cluster for each k8s resource found, making it clear what the test is validating. Uses single-line python to avoid Just parser issues with multiline scripts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Map argo-deploy rollout, argo-workloadref deployment, and argo-workloadref rollout to the k8s-test-annotation entity so the agent picks them up. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The cortex-key secret is created outside Helm, so configmap checksum changes alone don't trigger a restart when the API key changes. Adding an explicit rollout restart ensures the pod always picks up the latest secret and configmap values. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Show agent logs at end of setup (waits 15s for first cache push) - Show the CLI command being run in test output - Display sample JSON from first resource to make test logic visible Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New `cortex sso` subcommand with: - list: List all SSO configurations - create: Create OIDC connection via JSON file or CLI params (--provider, --identifier, --secret, --issuer) Google issuer auto-filled when --provider google - delete: Delete specific connection by ID - delete-all: Delete all SSO configurations Supported providers: OKTA, GOOGLE, AZURE Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add `catalog aws` command to retrieve AWS resource details for an entity - Add `catalog k8s` command to retrieve Kubernetes workload details for an entity - Both commands support --table and --csv output (k8s) with configurable columns - Handle ConnectionError gracefully in CortexClient instead of stack trace - Add tests for catalog k8s command Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
URLs were missing a slash between 'validate' and the alias (causing
'validate{alias}' instead of 'validate/{alias}'), and validate_all
was hitting the list endpoint instead of the validate endpoint.
Affected: launchdarkly, datadog, gitlab, azure-resources, azure-devops,
circleci, coralogix, incidentio, pagerduty, prometheus, sonarqube, aws
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- azure_resources: fix URL typo 'azure-resoures' -> 'azure-resources' - sonarqube add-multiple: fix mock method POST -> PUT to match CLI - config_file bad_url: update assertion for new friendly error message Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
catalog awssubcommand to retrieve AWS resource details for a catalog entitycatalog k8ssubcommand to retrieve Kubernetes workload details for a catalog entity, with--tableand--csvoutput supportConnectionErrorgracefully inCortexClient— shows a friendly message instead of a stack traceTest plan
tests/test_catalog_k8s.py— 5 tests covering JSON, table, CSV, mutual exclusion, and empty response