Closed hcavarsan closed 2 months ago
The updates involve enhancing functionalities related to JSON configurations, port forwarding tasks, and Kubernetes context handling. Key changes include introducing a mechanism to remove blank or default fields from JSON, utilizing tokio::sync::Notify
to control port forwarding tasks, refining pod and service lookup logic, and updating the frontend to handle new workload types and configuration fields. These improvements aim to streamline operations, enhance flexibility, and ensure robust handling of various Kubernetes workloads.
Files | Change Summary |
---|---|
crates/kftray-tauri/src/config.rs |
Refactored remove_blank_fields to remove_blank_or_default_fields , adding default config handling. Added is_value_default function, updated export_configs . |
...kubeforward/commands.rs |
Integrated tokio::sync::Notify to cancel port forwarding tasks, updated handling for different workloads (pod_label , service ). |
...kubeforward/kubecontext.rs |
Added imports (HashSet , Resource ), PodInfo struct, and refactored pod and service list functions for improved handling. |
...kubeforward/pod_finder.rs |
Refactored pod finding logic with separate functions for finding by service name or pod label, updated error handling. |
...kubeforward/port_forward.rs |
Added Notify usage, integrated CANCEL_NOTIFIER for cancellation in port forwarding tasks, adjusted relevant method signatures. |
frontend/src/.../AddConfigModal/... |
Renamed variables for clarity, added new state variables, updated queries and logic for handling pods and services, modified UI for workload type. |
frontend/src/.../Main/index.tsx |
Included target field in several places, updated logic to handle workload_type values for port forwarding. |
frontend/src/.../PortForwardRow/... |
Enhanced port forwarding logic to include pod workload type, adjusted UI to reflect changes in workload types. |
frontend/src/types/index.ts |
Updated Status , Config , Response interfaces to include new target field. |
.github/workflows/ci.yaml |
Updated GitHub Actions workflow to use docker/build-push-action@v6 . |
.github/workflows/main.yml |
Added step for reconfiguring for Linux ARM64 in the workflow. |
sequenceDiagram
participant User
participant UI as User Interface
participant App as KFTray App
participant PF as Port Forwarding Task
participant CancelNotifier as CANCEL_NOTIFIER
User->>UI: Initiates port forwarding
UI->>App: Start port forwarding with workload type
App->>PF: Starts task
PF-->>App: Task running
User->>UI: Requests cancellation
UI->>App: Cancels port forwarding
App->>CancelNotifier: Notify cancellation
CancelNotifier->>PF: Signals task to cancel
PF->>App: Task cancelled
App-->>User: Cancellation confirmed
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
changes: