netsuite-consumer
Overview
- Namespace:
netsuite-consumer - Purpose: NetSuite ERP Integration Consumers - PRODUCTION
- Age: ~4 years (since February 2021)
- Status: x Mostly Deprecated - Only 2 of 11 deployments active
- Workloads: 11 deployments (2 active, 9 scaled to 0)
- Environment: PRODUCTION - NetSuite ERP data synchronization
Architecture
NetSuite integration consumers handle data synchronization between the medical platform and NetSuite ERP:
- Active Consumers: Test master data synchronization (2 deployments)
- Deprecated Consumers: Orders, pricing, inventory, promotions (9 deployments scaled to 0)
- No Auto-scaling: No HPAs or KEDA configuration
- No Services: No exposed services (pure consumer namespace)
Auto-Scaling Configuration
No Auto-Scaling Configured:
- No HorizontalPodAutoscalers (HPAs)
- No KEDA scaled objects
- Fixed replica counts (1 for active, 0 for deprecated)
Workload Categories
Active Consumers (2 deployments)
| Name | Replicas | Status | Purpose |
|---|---|---|---|
| netsuite-consumer-test-master-group | 1/1 | Running | Test group master data sync |
| netsuite-consumer-test-master-investigation | 1/1 | Running | Test investigation master data sync |
Deprecated Consumers (9 deployments - ALL SCALED TO 0)
x CRITICAL CLEANUP OPPORTUNITY: 82% of deployments inactive for years
| Name | Replicas | Age | Last Active | Category |
|---|---|---|---|---|
| ds-ns-consumer-orders | 0/0 | 4y269d | ~3 years ago | Data Streaming - Orders |
| ds-ns-consumer-pricelist | 0/0 | 4y269d | ~4 years ago | Data Streaming - Pricing |
| ds-ns-consumer-testresult | 0/0 | 4y269d | ~3 years ago | Data Streaming - Test Results |
| netsuite-consumer-inventory-consumption-report | 0/0 | 4y270d | ~4 years ago | Inventory - Consumption |
| netsuite-consumer-inventory-product-master | 0/0 | 4y270d | ~4 years ago | Inventory - Products |
| netsuite-consumer-inventory-stock-out | 0/0 | 4y270d | ~4 years ago | Inventory - Stock |
| netsuite-consumer-ot-record | 0/0 | 4y4d | ~4 years ago | OT Records |
| netsuite-consumer-promotion | 0/0 | 4y270d | ~2 years ago | Promotions |
| netsuite-consumer-status-attune | 0/0 | 4y4d | ~2 years ago | Attune Device Status |
Services
No Services: This is a pure consumer namespace with no exposed services.
Access & Management
View all resources:
kubectl get all -n netsuite-consumer
Check active consumers:
# View only active consumers
kubectl get pods -n netsuite-consumer
# Check test master consumers
kubectl logs -f deployment/netsuite-consumer-test-master-group -n netsuite-consumer
kubectl logs -f deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer
View scaled-to-0 deployments:
# List all scaled-to-0 deployments
kubectl get deployments -n netsuite-consumer | grep "0/0"
# Count scaled-to-0 deployments
kubectl get deployments -n netsuite-consumer | grep -c "0/0"
# Output: 9 (out of 11 total)
Cleanup commands:
# x ONLY RUN AFTER CONFIRMING WITH TEAM
# List deployments to be removed
echo "Deployments to potentially remove:"
kubectl get deployments -n netsuite-consumer | grep "0/0" | awk '{print $1}'
# Delete scaled-to-0 deployments (DANGEROUS - confirm first!)
# kubectl delete deployment ds-ns-consumer-orders -n netsuite-consumer
# kubectl delete deployment ds-ns-consumer-pricelist -n netsuite-consumer
# ... etc for each deprecated deployment
Restart active consumers:
# Restart test master consumers
kubectl rollout restart deployment/netsuite-consumer-test-master-group -n netsuite-consumer
kubectl rollout restart deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer
Monitoring
Resource usage:
# Active pods only (2 pods)
kubectl top pods -n netsuite-consumer
Deployment status:
# All deployments
kubectl get deployments -n netsuite-consumer
# Active only
kubectl get deployments -n netsuite-consumer | grep -v "0/0"
Events:
kubectl get events -n netsuite-consumer --sort-by='.lastTimestamp' | head -20
Pod age and restarts:
# Check pod age and restart count
kubectl get pods -n netsuite-consumer -o wide
Data Flow
NetSuite ERP (External)
↓
Message Queue (Kafka/Redpanda)
↓
Active Consumers (2)
├─ Test Master Group
└─ Test Master Investigation
↓
Medical Platform Database
↓
Test Master Data Available
Deprecated Data Flows (No longer active)
Orders Sync (ds-ns-consumer-orders)
Price List Sync (ds-ns-consumer-pricelist)
Test Results Sync (ds-ns-consumer-testresult)
Inventory Sync (3 consumers)
Promotions Sync (netsuite-consumer-promotion)
Device Status Sync (netsuite-consumer-status-attune)
NetSuite Integration
Active Integration: Test Master Data
Purpose: Synchronize test catalog and investigation data from NetSuite ERP
-
Test Master Group Sync:
- Test group definitions
- Test categories
- Group relationships
netsuite-consumer-test-master-groupprocesses events
-
Test Master Investigation Sync:
- Investigation test definitions
- Test parameters
- Investigation profiles
netsuite-consumer-test-master-investigationprocesses events
Deprecated Integrations
All deprecated integrations have been replaced by other systems or discontinued:
-
Data Streaming Consumers (ds-ns-consumer-*):
- Orders, price lists, test results
- Likely replaced by direct API integration or different architecture
-
Inventory Sync:
- Consumption reports, product master, stock management
- Possibly moved to different integration approach
-
Promotions & Device Status:
- No longer syncing via NetSuite
- Managed by different systems
Production Considerations
High Availability
x Limited HA:
- Only 2 active consumers, both at 1 replica
- No redundancy for test master data sync
- Single point of failure for each consumer
Current State
- Active: 2 consumers processing test master data
- Deprecated: 9 consumers inactive for years
- Load: Very low (only 2 pods running)
- Criticality: Low to Medium (test master data important but not real-time critical)
Recommendations
-
URGENT: Resource Cleanup:
- 9 deployments (82%) scaled to 0 for years
- This is the largest cleanup opportunity in the namespace
- Action plan:
- Confirm with team that these are permanently deprecated
- Document the decision
- Delete deprecated deployments to clean up namespace
- Remove from deployment pipelines
-
Consumer Resilience:
- Both active consumers at 1 replica
- Consider 2 replicas for HA:
- netsuite-consumer-test-master-group
- netsuite-consumer-test-master-investigation
-
Consider Auto-scaling:
- No KEDA configured
- If message volumes increase, add KEDA for queue-based scaling
- Currently low volume doesn't justify KEDA overhead
-
Monitoring Improvements:
- Add health checks for NetSuite connectivity
- Monitor sync lag for test master data
- Alert on consumer failures (critical for test catalog)
-
Documentation:
- Document why other integrations were deprecated
- Maintain history for reference
- Update integration architecture docs
Troubleshooting
Active consumer issues:
# Check test master group consumer
kubectl logs -f deployment/netsuite-consumer-test-master-group -n netsuite-consumer
# Check test master investigation consumer
kubectl logs -f deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer
# Check for errors in last 100 lines
kubectl logs deployment/netsuite-consumer-test-master-group -n netsuite-consumer --tail=100 | grep -i error
# Check pod restarts
kubectl get pods -n netsuite-consumer -o wide
# Note: test-master-investigation has 1 restart (86 days ago)
# Restart consumers if needed
kubectl rollout restart deployment/netsuite-consumer-test-master-group -n netsuite-consumer
kubectl rollout restart deployment/netsuite-consumer-test-master-investigation -n netsuite-consumer
NetSuite connectivity issues:
# Check consumer logs for connection errors
kubectl logs deployment/netsuite-consumer-test-master-group -n netsuite-consumer | grep -i "connection\|timeout\|refused"
# Check if consuming messages
kubectl logs deployment/netsuite-consumer-test-master-group -n netsuite-consumer --tail=50
# Verify Kafka connectivity (if using Kafka)
kubectl exec -it deployment/netsuite-consumer-test-master-group -n netsuite-consumer -- env | grep KAFKA
Sync lag investigation:
# Monitor consumer processing
kubectl logs -f deployment/netsuite-consumer-test-master-group -n netsuite-consumer | grep -i "processed\|consumed"
# Check if stuck
kubectl get pods -n netsuite-consumer -o wide
# Look for old pod age or high restart count
Investigating scaled-to-0 deployments:
# View deployment history
kubectl rollout history deployment/ds-ns-consumer-orders -n netsuite-consumer
# Check deployment configuration
kubectl get deployment ds-ns-consumer-orders -n netsuite-consumer -o yaml
# View when last scaled to 0
kubectl describe deployment ds-ns-consumer-orders -n netsuite-consumer | grep -A 10 "Events:"
Performance Metrics
Current Scale
- Active Consumers: 2 deployments, 2 pods total
- Deprecated: 9 deployments, 0 pods
- Resource Usage: Very low (only 2 pods)
- Pod Age: 381 days (very stable, no recent restarts except 1)
Historical Context
This namespace has been dramatically downsized over the past 4 years:
- Original: 11 active integrations
- Current: 2 active integrations
- Reduction: 82% of consumers deprecated
- Reason: Likely architectural changes, direct API integration, or feature deprecation
Integration Points
External Systems
-
NetSuite ERP:
- Cloud-based ERP system
- Source of test master data
- Likely API-based or file-based integration
-
Test Catalog:
- Receives test group definitions
- Receives investigation profiles
- Used by ordering and booking systems
Internal Systems
- Test Master Database: Stores synchronized test definitions
- Booking System: Uses test master data for test selection
- POS System: Uses test master data for pricing and ordering
Important Notes
x PRODUCTION ENVIRONMENT:
- Only 2 active consumers out of 11 deployments
- Test master data is important for test catalog accuracy
- Changes should be coordinated with ERP team
- Low risk due to small footprint
x MASSIVE CLEANUP OPPORTUNITY:
- 9 deployments (82%) scaled to 0 for years
- Largest cleanup opportunity across all documented namespaces
- Removing these would:
- Simplify namespace management
- Reduce deployment pipeline complexity
- Clean up monitoring dashboards
- Improve deployment list readability
- Action Required: Coordinate with team to delete permanently
x No Redundancy:
- Both active consumers at 1 replica
- Single point of failure for each
- Consider increasing to 2 replicas for HA
System Purpose
NetSuite Consumer namespace serves as:
- Test Master Data Sync: Synchronize test catalog from NetSuite ERP (active)
- Deprecated Integrations: Historical integrations no longer in use (9 scaled to 0)
- Legacy Namespace: Majority of original functionality moved elsewhere
Key Role: Minimal active integration for test master data synchronization with NetSuite ERP. Primarily a legacy namespace with significant cleanup needed.
Cleanup Checklist
Before removing scaled-to-0 deployments, verify:
- Confirm with ERP integration team
- Confirm with infrastructure team
- Verify no re-activation plans
- Check deployment pipelines
- Update architecture documentation
- Remove from monitoring dashboards
- Delete deployments:
- ds-ns-consumer-orders
- ds-ns-consumer-pricelist
- ds-ns-consumer-testresult
- netsuite-consumer-inventory-consumption-report
- netsuite-consumer-inventory-product-master
- netsuite-consumer-inventory-stock-out
- netsuite-consumer-ot-record
- netsuite-consumer-promotion
- netsuite-consumer-status-attune