- Add Prometheus metrics for marketplace API throughput and error rates with new dashboard panels - Implement confidential transaction models with encryption support and access control - Add key management system with registration, rotation, and audit logging - Create services and registry routers for service discovery and management - Integrate ZK proof generation for privacy-preserving receipts - Add metrics instru
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
{{- if .Values.autoscaling.enabled }}
|
|
apiVersion: autoscaling/v2
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ include "aitbc-blockchain-node.fullname" . }}
|
|
labels:
|
|
{{- include "aitbc-blockchain-node.labels" . | nindent 4 }}
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ include "aitbc-blockchain-node.fullname" . }}
|
|
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
|
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
|
metrics:
|
|
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
|
{{- end }}
|
|
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
|
- type: Resource
|
|
resource:
|
|
name: memory
|
|
target:
|
|
type: Utilization
|
|
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
|
{{- end }}
|
|
# Custom metrics for blockchain-specific scaling
|
|
- type: External
|
|
external:
|
|
metric:
|
|
name: blockchain_transaction_queue_depth
|
|
target:
|
|
type: AverageValue
|
|
averageValue: "100"
|
|
- type: External
|
|
external:
|
|
metric:
|
|
name: blockchain_pending_transactions
|
|
target:
|
|
type: AverageValue
|
|
averageValue: "500"
|
|
behavior:
|
|
scaleDown:
|
|
stabilizationWindowSeconds: 600 # Longer stabilization for blockchain
|
|
policies:
|
|
- type: Percent
|
|
value: 5
|
|
periodSeconds: 60
|
|
scaleUp:
|
|
stabilizationWindowSeconds: 60
|
|
policies:
|
|
- type: Percent
|
|
value: 50
|
|
periodSeconds: 60
|
|
- type: Pods
|
|
value: 2
|
|
periodSeconds: 60
|
|
selectPolicy: Max
|
|
{{- end }}
|