-
Notifications
You must be signed in to change notification settings - Fork 1
bump kubernetes #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump kubernetes #20
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughThis update introduces a new Kubernetes sync feature by adding two new files: one for Kubernetes client configuration handling and another for the sync command that lists pods in the default namespace. The sync command registration is updated to include this new Kubernetes subcommand. The ClickHouse sync logic is refactored to support a richer API model, more detailed resource metadata, and switches to basic authentication. A new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CobraCmd
participant KubernetesSyncCmd
participant KubeConfigHelper
participant KubeClient
participant K8sAPI
User->>CobraCmd: Run `sync kubernetes` command
CobraCmd->>KubernetesSyncCmd: Execute command handler
KubernetesSyncCmd->>KubeConfigHelper: getKubeConfig()
KubeConfigHelper->>KubeConfigHelper: Load config (env, default, in-cluster)
KubeConfigHelper-->>KubernetesSyncCmd: Return config, cluster name
KubernetesSyncCmd->>KubeClient: Create clientset
KubernetesSyncCmd->>K8sAPI: List pods in "default" namespace
K8sAPI-->>KubernetesSyncCmd: Return pod list
KubernetesSyncCmd->>User: Print/log pod info
sequenceDiagram
participant SyncCmd
participant ClickHouseClient
participant ClickHouseAPI
participant Logger
SyncCmd->>ClickHouseClient: GetServices()
ClickHouseClient->>Logger: Log org ID
ClickHouseClient->>ClickHouseAPI: HTTP GET with basic auth
ClickHouseAPI-->>ClickHouseClient: Return JSON response
ClickHouseClient->>Logger: Pretty-print raw JSON
ClickHouseClient->>ClickHouseClient: Decode to ClickHouseListResponse
ClickHouseClient-->>SyncCmd: Return list of ClickHouseConfigResponse
SyncCmd->>Logger: Log and process resources
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (7)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Refactor
Chores
.gitignoreto exclude environment and test script files from version control.