Skip to content

Conversation

@taking
Copy link
Owner

@taking taking commented Oct 15, 2025

주요 변경 사항

  • Velero 백업 및 복원 API 추가
  • managedFields 제거 기능 추가
  • Pod, StorageClass 조회 API 추가
  • Minio 설정 검증 및 에러 메시지 개선
  • 문서 및 에러 처리 로직 정비

- Updated go-restful dependency from v3.11.0 to v3.11.1 in go.mod
- Added uniseg dependency v0.4.4 in go.mod
- Enhanced Makefile with GCFLAGS to ignore unnecessary type arguments
- Improved README with new features and usage instructions
- Added new test images and updated Bruno collections for Kubernetes and MinIO API tests
- Refactored Helm client and added comprehensive README documentation
- Introduced caching mechanism in client cache for improved performance
- Removed deprecated error handling code and streamlined error management
- Introduced new test files for client cache, Kubernetes validator, and MinIO validator.
- Implemented tests for client cache functionalities including creation, expiration, retrieval, and concurrent access.
- Added validation tests for Kubernetes and MinIO configurations, ensuring proper error handling and expected behaviors.
- Removed outdated test files for client implementations to streamline the codebase.
…ing logs

- Added timeout setting for resource fetching in BaseHandler to improve reliability.
- Introduced debugging logs for resource fetch failures and MinIO client creation to aid in troubleshooting.
- Enhanced the `clean` target in the Makefile to remove additional example files.
- Updated README to include new sections for advanced usage and performance optimization.
- Removed outdated Bruno files related to Helm and Velero API tests to streamline the codebase.
- Updated Go module dependencies for improved compatibility and performance.
- Refactored client code to improve clarity and maintainability.
- Deleted the `client_cache_test.go` file to streamline the codebase and eliminate redundant tests.
- This change helps maintain focus on relevant and up-to-date testing practices.
…ck clients

- Added a new `MockClient` implementation for testing purposes, allowing for isolated unit tests without external dependencies.
- Updated `BaseHandler` to support the use of a mock client, enhancing test reliability and maintainability.
- Refactored existing handler tests across Helm, Kubernetes, MinIO, and Velero to utilize the new mock client for improved testing practices.
…mprove configuration management (#26)

feat: Velero/MinIO integration, API extensions, testing, and structural improvements

- Added Velero installation and MinIO integration
  - Implemented Velero installation handlers and services
  - Enhanced MinIO client creation with debugging support

- Expanded Velero API
  - Introduced endpoints for backup repositories and storage locations
  - Added job management capabilities for Velero operations

- Strengthened testing and mocking
  - Added comprehensive tests for client cache and validators
  - Implemented a mock client and updated handlers to use it for improved testability
  - Removed outdated cache tests

- Refactored project structure
  - Reorganized Velero and MinIO handlers and services for better maintainability
  - Improved resource fetching logic

- Configuration and documentation
  - Added configuration management and validation utilities
  - Updated Go version and dependencies
  - Enhanced README and API documentation

Next steps:
- Add more integration tests for Velero backup/restore workflows
- Explore support for additional object storage providers
- Refactored client initialization in `initializeClients` to include error handling for each client creation, providing warnings for failures.
- Updated `MockClient` methods in tests to handle errors during client creation, returning nil clients when necessary.
- Enhanced `createClientWithRetry` to attempt fallback client creation on failure, ensuring more robust client handling.

These changes improve the reliability and maintainability of client interactions across the application.
- Updated client initialization across multiple files to include error handling for `NewClientWithConfig`, ensuring that failures are logged and handled appropriately.
- Improved error management in `BaseHandler` and `README.md` to provide clearer feedback during client creation.
- This refactor enhances the robustness and maintainability of client interactions throughout the application.
- Updated the base image in the Dockerfile to use Go version 1.25-alpine3.22, ensuring compatibility with the latest features and improvements.
- Modified router paths in Helm and Velero handlers to remove the '/api' prefix, aligning with the new API structure.
- Updated documentation comments for the affected endpoints to reflect the changes in routing.
- Added new API endpoints for creating, validating, and deleting Velero backups.
- Introduced request and response structures for backup operations, including validation details.
- Enhanced the Velero service with internal methods for backup creation and validation.
- Updated API routes to include the new backup management functionalities.
- Removed outdated files related to previous Velero API implementations to streamline the codebase.
- Added new endpoints for retrieving detailed information about specific Velero backups and restores.
- Implemented internal service methods for fetching backup and restore details, including validation checks.
- Updated API routes to include the new functionality for backup and restore management.
- Removed outdated files related to previous Velero API implementations to streamline the codebase.
- Implemented `stripManagedFieldsFromList` and `stripManagedFieldsFromSingle` functions to remove managedFields from various Kubernetes resource types, including Pods, ConfigMaps, Secrets, Namespaces, and StorageClasses.
- Updated the `GetPods`, `GetStorageClasses`, `GetNamespaces`, `GetConfigMaps`, and `GetSecrets` methods to utilize these new functions, ensuring managedFields are stripped from the returned resources.
- Added comprehensive validation for MinIO configuration, ensuring required fields like endpoint, access key, and secret key are checked before client creation.
- Improved error handling in the API to return specific error messages for various configuration issues, enhancing user feedback.
- Updated the HealthCheck function to verify MinIO client initialization and provide clearer error messages on connection failures.
…ieval

- Introduced a new endpoint for retrieving details of a specific Kubernetes pod by name.
- Added a new endpoint for fetching information about a specific storage class.
- Enhanced post-response scripts to set environment variables for pod and storage class names, improving the API's usability.
- Updated README.md to reflect new features, including security enhancements and TTL cache management.
- Improved error handling in the API by implementing a common error handling function for configuration parsing issues.
- Added tests for configuration parsers and security middleware to ensure robustness and reliability.
- Introduced new caching mechanisms with TTL support, enhancing memory efficiency and performance.
- Enhanced security middleware with input sanitization and CORS policies to strengthen application security.
cursor[bot]

This comment was marked as outdated.

- Upgraded Go version to 1.25.1 in all modules.
- Updated various dependencies, including Kubernetes and MinIO client libraries, to their latest versions for improved functionality and security.
- Enhanced error handling in client creation methods for Helm, Kubernetes, MinIO, and Velero, providing clearer feedback on configuration issues.
- Introduced HealthCheck methods in client interfaces to verify connectivity and client initialization.
- Added new example demonstrating type assertion helper functions for better handling of interface{} return values.
- Replaced direct client creation and context management with a unified resource client handler for backup validation and deletion.
- Improved code readability and maintainability by encapsulating client operations within a single function call.
- Ensured consistent error handling and response structure across backup operations.
@taking taking merged commit 99d4cd1 into main Oct 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants