e2e/operator: Refactor encryption provider interface and fix single-cluster setup#633
Draft
nameisbhaskar wants to merge 1 commit into
Draft
e2e/operator: Refactor encryption provider interface and fix single-cluster setup#633nameisbhaskar wants to merge 1 commit into
nameisbhaskar wants to merge 1 commit into
Conversation
…luster setup
Introduce clean interface-based architecture for encryption at rest testing:
**Core Changes:**
- Create encryption.Provider interface with platform-specific config
- Define encryption.PlatformConfig (Platform, RequiresCredentialsSecret, etc.)
- Add GetEncryptionProvider() to CloudProvider interface
- Auto-set encryption provider in ProviderFactory
**Fix: Cloud-Specific Config Flow**
- Problem: Platform/credentials hardcoded to "UNKNOWN_KEY_TYPE"
- Solution: EncryptionAtRestConfig() dynamically retrieves from provider
- Platform and cmekCredentialsSecretName now flow correctly to helm charts
- Enables AWS_KMS, GCP_CLOUD_KMS, UNKNOWN_KEY_TYPE support
**Additional Improvements:**
- Extract shared SetupFileBasedEncryptionSecrets() utility
- Remove unused IsMultiRegion field and OperatorUseCases interface
- Add utils.GetProviderFromEnv() and utils.GenerateClusterNames()
- Better cluster naming: PR numbers in CI, usernames locally
Fix Kind single-cluster deployments timing out during infrastructure setup:
**Problem:** CoreDNS LoadBalancer service waited for IP without MetalLB
**Solution:** Skip MetalLB and CoreDNS for single-cluster (uses default DNS)
Single-cluster now completes setup in seconds instead of timing out.
- tests/e2e/operator/encryption/types.go: Provider interface
- tests/e2e/operator/infra/{provider,local,gcp}.go: Implementations
- tests/e2e/operator/region.go: Fix EncryptionAtRestConfig()
- tests/e2e/operator/utils/cluster_naming.go: New utilities
- tests/e2e/operator/*/test.go: Use new architecture
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.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.
Introduce clean interface-based architecture for encryption at rest testing:
Core Changes:
Fix: Cloud-Specific Config Flow
Additional Improvements:
Fix Kind single-cluster deployments timing out during infrastructure setup:
Problem: CoreDNS LoadBalancer service waited for IP without MetalLB Solution: Skip MetalLB and CoreDNS for single-cluster (uses default DNS)
Single-cluster now completes setup in seconds instead of timing out.