- Deploy Portworx Operator + CSI driver via ArgoCD - Support both iSCSI block and NFS file storage from FlashArray - Integrate with 1Password External Secrets for FlashArray credentials - Include comprehensive deployment documentation and validation script - Storage classes: pure-block (iSCSI) and pure-file (NFS) - Talos Linux compatible with iSCSI/multipath configuration
11 KiB
Portworx CSI Implementation Summary
Overview
Successfully created a complete GitOps deployment for Portworx CSI driver to integrate Pure Storage FlashArray with Talos Linux Kubernetes cluster (fastpass). This implementation follows the homelab's established GitOps patterns and provides enterprise-grade block and file storage capabilities.
What Was Created
Directory Structure
cluster/platform/portworx-csi/
├── application.yaml # ArgoCD Application manifest
├── operator-values.yaml # Helm values for Portworx Operator
├── storagecluster.yaml # StorageCluster CR for PX-CSI deployment
├── externalsecret.yaml # ExternalSecret for FlashArray credentials
├── storageclass-block.yaml # StorageClass for iSCSI block volumes
├── storageclass-file.yaml # StorageClass for NFS file storage
├── talos-config-reference.yaml # Talos configuration reference (not a K8s resource)
├── README.md # Complete deployment documentation
├── DEPLOYMENT-CHECKLIST.md # Step-by-step deployment checklist
├── QUICKREF.md # Quick reference for common operations
└── validate-prereqs.sh # Pre-deployment validation script
Total: 11 files, ~1,922 lines of YAML and documentation
Implementation Details
1. ArgoCD Application (application.yaml)
- Sync Wave: 2 (after External Secrets Operator, before applications)
- Multi-source: Helm chart from Portworx + local manifests from Git
- Auto-sync: Enabled with prune and self-heal
- Namespace:
portworx
2. Portworx Operator (operator-values.yaml)
- Chart:
px-operatorversion 25.0.0 - Deployment: Single replica (sufficient for homelab)
- Resources: Minimal (50m CPU, 128Mi memory)
- Tolerations: Can run on control plane nodes
3. StorageCluster CR (storagecluster.yaml)
- Backend: Pure Storage FlashArray
- Protocol: iSCSI (can be changed to NVMe-oF)
- CSI Driver: Enabled with PX-CSI 3.2.0
- Secret: References
px-pure-secret(from ExternalSecret) - Monitoring: Prometheus metrics enabled
- Topology: Disabled (can be enabled later for multi-zone)
4. FlashArray Credentials (externalsecret.yaml)
- Source: 1Password via ClusterSecretStore
- Vault:
homelab - Item:
pure-flasharray-fastpass - Field:
pure.json(JSON configuration) - Target Secret:
px-pure-secretinportworxnamespace - Refresh: Hourly
Expected 1Password pure.json format:
{
"FlashArrays": [
{
"MgmtEndPoint": "flasharray.mk-labs.cloud",
"APIToken": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"NFSEndPoint": "flasharray-nfs.mk-labs.cloud"
}
]
}
5. StorageClasses
pure-block
- Provisioner:
pxd.portworx.com - Backend: FlashArray block volumes (iSCSI)
- Access Mode: ReadWriteOnce (RWO)
- Filesystem: ext4
- Features: Volume expansion, snapshots
- Use Case: Databases, stateful applications
pure-file
- Provisioner:
pxd.portworx.com - Backend: FlashArray File Services (NFS)
- Access Mode: ReadWriteMany (RWX)
- Protocol: NFS v4.1
- Features: Shared storage, volume expansion
- Use Case: Multi-pod applications, shared data
6. Talos Configuration (talos-config-reference.yaml)
NOTE: This is a reference document, NOT a Kubernetes resource. Must be applied via talhelper or talosctl.
Required Talos patches:
- System Extensions:
iscsi-tools,util-linux-tools - Kernel Modules:
iscsi_tcp,dm_multipath,dm_round_robin - Multipath Config:
/etc/multipath.confwith Pure Storage settings - udev Rules:
/etc/udev/rules.d/99-pure-storage.rulesfor queue tuning - kubelet Mounts:
/var/lib/iscsishared mount for iSCSI persistence
7. Documentation
README.md (16KB)
Comprehensive documentation including:
- Architecture diagrams
- Prerequisites (FlashArray, 1Password, Talos)
- Step-by-step deployment instructions
- Usage examples (PVCs, snapshots, expansion)
- Monitoring setup
- Troubleshooting guide
- References and architecture decisions
DEPLOYMENT-CHECKLIST.md (12KB)
8-phase deployment checklist:
- FlashArray Preparation
- 1Password Secret Configuration
- Talos Node Configuration
- GitOps Deployment
- Deployment Verification
- Functional Testing
- Monitoring Setup
- Documentation & Handoff
Includes rollback plan and success criteria.
QUICKREF.md (9KB)
Quick reference for:
- Status checks
- Volume operations (create, expand, snapshot, restore)
- Log viewing
- Troubleshooting commands
- Monitoring queries
- Maintenance procedures
- Useful aliases
validate-prereqs.sh (7KB)
Automated pre-deployment validation script that checks:
- Kubernetes cluster connectivity
- External Secrets Operator presence
- ClusterSecretStore configuration
- Talos nodes
- Existing CSI drivers
- StorageClass conflicts
- ArgoCD setup
- Required manifests in repository
GitOps Workflow
Deployment Flow
1. Commit to Git (homelab repo)
↓
2. ArgoCD detects changes
↓
3. Wave 2 sync (after External Secrets)
↓
4. Helm deploys Portworx Operator
↓
5. Operator deploys PX-CSI components
↓
6. StorageClasses become available
↓
7. Applications can provision volumes
Dependencies
- Wave 1: External Secrets Operator, 1Password Connect
- Wave 2: Portworx CSI (this deployment)
- Wave 3+: Applications using Pure storage
Prerequisites Summary
FlashArray Requirements
- ✅ FlashArray accessible from cluster network
- ✅ Storage admin user created with API token
- ✅ iSCSI targets configured (for block storage)
- ✅ File Services enabled (optional, for NFS)
- ✅ NFS policy configured with user mapping disabled (optional)
Kubernetes Requirements
- ✅ Talos Linux cluster with kernel modules (iscsi_tcp, dm_multipath)
- ✅ External Secrets Operator installed (wave 1)
- ✅ ClusterSecretStore configured for 1Password
- ✅ ArgoCD installed and operational
- ✅ Multipath and udev rules configured on all nodes
1Password Requirements
- ✅ Vault:
homelab - ✅ Item:
pure-flasharray-fastpass - ✅ Field:
pure.jsonwith FlashArray configuration
Next Steps
1. Before Deployment
- Create FlashArray storage admin user and API token
- Add FlashArray credentials to 1Password
- Apply Talos configuration to all worker nodes:
cd ~/git/homelab/talos/talhelper # Add portworx-csi patches to talconfig.yaml talhelper genconfig talosctl apply-config --file clusterconfig/<node>.yaml --nodes <node-ip> talosctl reboot --nodes <node-ip> - Verify iSCSI and multipath on each node
- Run validation script:
./validate-prereqs.sh
2. Deploy
cd ~/git/homelab
git add cluster/platform/portworx-csi/
git commit -m "Add Portworx CSI driver for Pure FlashArray"
git push origin main
# ArgoCD will auto-sync (wave 2)
# Or manually sync:
argocd app sync portworx-csi
3. Verify Deployment
# Check ArgoCD application
kubectl get application -n argocd portworx-csi
# Verify pods
kubectl get pods -n portworx
# Check StorageCluster
kubectl get storagecluster -n portworx
# Test with sample PVC (see DEPLOYMENT-CHECKLIST.md Phase 6)
4. Post-Deployment
- Configure Prometheus/Grafana dashboards for Portworx metrics
- Update homelab infrastructure documentation
- Create runbook for common operations
- Schedule follow-up review after 1 week
Key Design Decisions
Why Portworx CSI?
- Direct Access: FlashArray volumes directly attached to pods (no aggregation layer)
- Native Integration: Official Pure Storage support
- Feature Rich: Snapshots, expansion, topology-aware provisioning
- Talos Compatible: Works with Talos Linux after proper configuration
Why iSCSI (vs NVMe-oF)?
- Broad Compatibility: Works on all Talos nodes without special NICs
- Proven: Mature protocol with extensive documentation
- Upgrade Path: Can migrate to NVMe-oF later for performance
- Simpler Setup: Fewer hardware dependencies
Why Multi-Source ArgoCD Application?
- Consistency: Follows homelab pattern (same as cert-manager, nfs-csi)
- Upstream Helm: Use official Portworx chart, not custom forks
- Local Overrides: StorageClasses and configs in Git
- GitOps Friendly: All configuration is declarative
Why Wave 2?
- Dependencies: Needs External Secrets (wave 1) for credentials
- Before Apps: Storage must be ready before applications deploy
- Parallel Safe: Can deploy alongside other platform services
Validation Results
All YAML files validated successfully:
- ✅
application.yaml- Valid YAML - ✅
externalsecret.yaml- Valid YAML - ✅
operator-values.yaml- Valid YAML - ✅
storageclass-block.yaml- Valid YAML - ✅
storageclass-file.yaml- Valid YAML - ✅
storagecluster.yaml- Valid YAML - ✅
talos-config-reference.yaml- Valid YAML
Important Notes
Talos Configuration
⚠️ CRITICAL: The talos-config-reference.yaml file is NOT a Kubernetes resource. It documents the required Talos patches that must be applied via talhelper or talosctl. Do not attempt to kubectl apply this file.
Secret Management
The FlashArray API token is stored in 1Password and synced to Kubernetes via External Secrets Operator. Never commit credentials to Git.
Node Reboots Required
After applying Talos configuration with kernel modules, nodes must be rebooted for modules to load. Schedule appropriately.
iSCSI Initiator Names
Each Talos node must have a unique iSCSI initiator name. Verify uniqueness across all nodes to avoid conflicts.
Default StorageClass
Neither pure-block nor pure-file is set as the default StorageClass. The existing nfs-emporium remains the default. Applications must explicitly request Pure storage by specifying storageClassName.
Support and References
Documentation
- Full Deployment Guide:
cluster/platform/portworx-csi/README.md - Deployment Checklist:
cluster/platform/portworx-csi/DEPLOYMENT-CHECKLIST.md - Quick Reference:
cluster/platform/portworx-csi/QUICKREF.md
Official Documentation
Troubleshooting
If issues arise during deployment:
- Check
DEPLOYMENT-CHECKLIST.mdfor step-by-step verification - Review
QUICKREF.mdfor troubleshooting commands - Run
validate-prereqs.shto check prerequisites - Consult Portworx CSI documentation for advanced scenarios
Summary
A complete, production-ready GitOps deployment for Portworx CSI driver has been created. The implementation:
✅ Follows homelab GitOps patterns
✅ Integrates with existing External Secrets Operator
✅ Supports both block (iSCSI) and file (NFS) storage
✅ Includes comprehensive documentation and validation tools
✅ Provides clear deployment checklist and troubleshooting guides
✅ Ready for deployment after FlashArray and Talos prerequisites are met
Total effort: 11 files, ~1,922 lines, comprehensive documentation and tooling.
Ready for: Git commit → ArgoCD deployment → Production use