Repository navigation
v1.0.1
π Release Notes
π New Features
Grafana Dashboard
- Added pre-built Grafana dashboard for comprehensive monitoring
- Dashboard sections include:
- Controller Overview (Leader, Ready, Healthy pods, CRD count, IP stats)
- Leader Election History timeline
- CRD Status Table (Health, Reserved, Attached, Unattached IPs)
- IP Allocation (Attachment rate gauge, IP-to-node mapping)
- Node Status (Cordoned nodes, ip.ready label status)
- Operations & Errors (Reconciliation rate, duration percentiles, API errors)
- ConfigMap provisioning support for Grafana sidecar auto-discovery
- Multi-cluster filtering with optional
clustervariable
Optional Cluster Label for Metrics
- All metrics now support an optional
clusterlabel for multi-cluster environments - Set
CLUSTER_NAMEenvironment variable to enable cluster labeling - Dashboard automatically detects and filters by cluster when available
- Works seamlessly without cluster label if not configured
Controller Health Metric
- Added
netipallocation_controller_healthygauge metric - Non-leader pods now report
ready=1andhealthy=1(standby mode) - Better visibility into all controller pod states
π§ Improvements
- Metrics are now initialized on startup for all pods (leader and non-leader)
- Leader election status is updated immediately in
lease_renewal_loop() - Added
pod_nameparameter toreconcile_all()for proper metrics labeling - Improved metric label consistency across all metrics
π Observability
- New Grafana dashboard ConfigMap for automatic provisioning
- Dashboard supports datasource variable selection
- All PromQL queries include optional cluster filtering (
cluster=~"$cluster")
π Documentation
- Updated README with Grafana Dashboard section
- Added ConfigMap provisioning instructions
- Added dashboard preview diagram
- Updated Project Structure to match actual layout
- Added
CLUSTER_NAMEenvironment variable documentation - Added PodMonitor example for Prometheus Operator
- Added troubleshooting for metrics and Grafana issues
β οΈ Breaking Changes
None
π¦ Dependencies
No new dependencies
v1.1.0 (2025-12-15)
π New Features
Prometheus Metrics Integration
- Added comprehensive Prometheus metrics for monitoring and alerting
- New metrics endpoint available at
/metrics(port 9999) - Metrics include:
netipallocation_crd_status- CRD health statusnetipallocation_reserved_ips_total- Total reserved IPs per CRDnetipallocation_attached_ips_total- Currently attached IPsnetipallocation_unattached_ips_total- Unattached IPsnetipallocation_ip_attached- Per-IP attachment statusnetipallocation_node_cordoned- Node cordon statusnetipallocation_node_ip_ready- Node label statusnetipallocation_controller_is_leader- Leader election statusnetipallocation_controller_ready- Controller readinessnetipallocation_reconcile_total- Reconciliation counternetipallocation_ip_attach_total- IP attach operations counternetipallocation_ip_detach_total- IP detach operations counternetipallocation_gcp_api_errors_total- GCP API error counternetipallocation_reconcile_duration_seconds- Reconciliation latency histogram
Smart IP Reallocation for Cordoned Nodes
- Controller now detects cordoned nodes and reallocates IPs intelligently
- If a node is cordoned but deployment pods are still running, IP is preserved
- If a node is cordoned and no deployment pods are running, IP is detached and reallocated to a healthy node
- Prevents service disruption during node maintenance and cluster autoscaling
Enhanced Node Drain Detection
- Improved
is_node_drained()function to be deployment-aware - Skips system namespaces (
kube-system,gke-system,istio-system) - Skips DaemonSet pods when checking if node is drained
- Uses
deploymentReffrom CRD to check for specific deployment pods
π§ Improvements
- Added
deployment_refparameter todetach_ip_from_node()for smarter detachment decisions - Better logging with detailed context for debugging
- Added debug logs showing which nodes are being checked during reconciliation
- Improved error handling with GCP API error tracking
π Observability
- New PodMonitor support for Prometheus Operator
- Recommended PrometheusRule alerts included in documentation
- Example Prometheus queries provided
π Bug Fixes
- Fixed variable shadowing issue where local
node_cordonedvariable conflicted with imported Prometheus metric - Fixed IP not being reallocated when node is cordoned but has no running pods
π Documentation
- Updated README with comprehensive metrics documentation
- Added troubleshooting section
- Added architecture diagram
- Added cloud provider setup instructions
β οΈ Breaking Changes
None
π¦ Dependencies
- Added
prometheus-client>=0.19.0
v1.0.0 (2025-12-01)
π Initial Release
Features
- Automatic static external IP allocation to Kubernetes nodes
- Support for GCP cloud provider
- Leader election using Kubernetes Lease
- Node labeling with
ip.ready=truewhen IP is attached - Pod eviction from misconfigured nodes
- Configurable reconciliation interval per CRD
- Health endpoints (
/healthz,/readyz)
CRD Support
NetIPAllocationcustom resource for defining IP allocation rules- Support for
reservedIPs,deploymentRef,nodeSelector - Cloud provider configuration (
gcp,aws,azure) - Strategy configuration (
maxSurge,maxUnavailable)
Upgrade Guide
From v1.1.0 to v1.2.0
- Update the controller image:
kubectl set image deployment/ip-address-controller \
controller=your-registry/ip-address-controller:v1.2.0- Optional: Set cluster name for multi-cluster metrics:
env:
- name: CLUSTER_NAME
value: "gke-prod" # or your cluster name- Optional: Deploy Grafana dashboard:
kubectl apply -f k8s/grafana-dashboard-configmap.yamlFrom v1.0.0 to v1.1.0
- Update the controller image:
kubectl set image deployment/ip-address-controller \
controller=your-registry/ip-address-controller:v1.1.0- Add metrics port to deployment (if not present):
ports:
- name: health
containerPort: 8080
- name: metrics
containerPort: 9999- Optional: Deploy PodMonitor for Prometheus Operator:
kubectl apply -f k8s/podmonitor.yaml- Optional: Deploy PrometheusRule for alerts:
kubectl apply -f k8s/prometheusrule.yamlRoadmap
v1.3.0 (Planned)
- AWS support
- Azure support
- Webhook validation for CRD
- Status subresource for CRD
v1.4.0 (Planned)
- Multi-IP per node support
- IP pool management
- Automatic IP reservation from cloud provider
- Custom health checks before IP reallocation