add standard/portworx-labels host-label examples - #555
add standard/portworx-labels host-label examples#555aditya-kumar-ships-it wants to merge 6 commits into
Conversation
Demonstrates Deployment Manager HostProfile labels for declarative Portworx node placement on a Standard 2+5 system with mixed worker roles (storage, storageless, and pure compute). Signed-off-by: Aditya Kumar <aditya.kumar@windriver.com>
| ptpRole: none | ||
| uuid: "" | ||
| - class: platform | ||
| dataNetworks: [] |
There was a problem hiding this comment.
expect to remove the none values from the interfaces, e.g.:
- dataNetworks: []
- maxRxRate: 0
- maxTxRate: 0
- ptpInterfaces: []
- ptpRole: none
- uuid: ""
it applies to all the interfaces in this file
Remove dataNetworks, maxRxRate, maxTxRate, ptpInterfaces, ptpRole, and uuid defaults from all interface definitions per review feedback. Signed-off-by: Aditya Kumar <aditya.kumar@windriver.com>
Signed-off-by: Aditya Kumar <aditya.kumar@windriver.com>
px-node is a custom label defined by us (not an official Portworx label). Using the portworx.io/ prefix implied it was an upstream Portworx label, which could cause confusion. Rename to the short-form 'px-node' in both px-storage-worker-profile and px-storageless-worker-profile. Signed-off-by: Aditya Kumar <aditya.kumar@windriver.com>
006e023 to
032a52b
Compare
| powerOn: true | ||
| provisioningMode: static | ||
| rootDevice: /dev/disk/by-path/pci-0000:00:1f.2-ata-1.0 | ||
| storage: |
There was a problem hiding this comment.
Please remove the whole storage section as irrelevant to the new labels and specific to severs
| powerOn: true | ||
| provisioningMode: static | ||
| rootDevice: /dev/disk/by-path/pci-0000:00:1f.2-ata-1.0 | ||
| storage: |
|
|
||
| | Label | Purpose | | ||
| |---|---| | ||
| | `portworx.io/px-node: "true"` | Shared gate — KMM loads `px.ko` on any node with this label | |
There was a problem hiding this comment.
The README says portworx.io/px-node but config.yaml defines the label as just px-node (no portworx.io/ prefix). The PR description also says portworx.io/px-node.
Which is the actual label consumed by KMM?
- If
px-node→ update README line 13, line 29, and PR description - If
portworx.io/px-node→ update config.yaml lines 289 and 397
As-is, a user following the README won't match what DM actually applies.
| metadata: | ||
| labels: | ||
| controller-tools.k8s.io: "1.0" | ||
| name: controller-0 |
There was a problem hiding this comment.
nit: The System CR name should describe the system/cluster, not a host. Existing examples use descriptive names (e.g., vbox). Consider something like portworx-standard or px-cluster to avoid confusion with the Host CR also named controller-0 on line 106.
| name: px-storage-worker-profile | ||
| namespace: deployment | ||
| spec: | ||
| administrativeState: unlocked |
There was a problem hiding this comment.
Consider using base: worker-profile here instead of repeating the full spec. This is the pattern used by existing examples (e.g., controller-profile uses base: common-profile). The px-* profiles would reduce to just:
spec:
base: worker-profile
labels:
px-node: "true"
portworx.io/node-type: "storage"This also naturally addresses @yjian118's request to remove the storage section — inherited fields come from the base, so only label-specific additions remain. The example then clearly demonstrates only the label feature.
| installOutput: graphical | ||
| interfaces: | ||
| ethernet: | ||
| - class: platform |
There was a problem hiding this comment.
px-storageless-worker-profile puts both mgmt and cluster-host on a single NIC (enp2s2), while worker-profile (line 164) and px-storage-worker-profile (line 278) split them across two NICs (enp2s2 + enp3s0).
Is this intentional for storageless nodes (fewer NICs needed since no storage traffic)? If so, a brief comment explaining why would help. If not, this may be a copy-paste issue.
| This example demonstrates how to use Deployment Manager `HostProfile` labels | ||
| to declaratively assign Portworx placement labels on a Standard system with | ||
| mixed worker roles (storage, storageless, and pure compute). | ||
|
|
There was a problem hiding this comment.
Consider adding a Prerequisites section here noting the minimum topology:
- 2 controllers (HA)
- 3 storage workers (Portworx quorum minimum)
- 0+ storageless/pure-compute workers (optional)
Users who reduce storage workers below 3 will get a non-functional PX cluster with no obvious error. A one-line callout like:
Note: Portworx requires a minimum of 3 storage nodes for quorum.
...would save significant debugging time.
| # CONTROLLER0MAC, CONTROLLER1MAC, WORKER0MAC, WORKER1MAC, WORKER2MAC, WORKER3MAC, WORKER4MAC | ||
| # CHANGEME_BASE64 (base64-encoded admin password) | ||
| # OS_REGION_NAME value (from: system show | grep region_name) | ||
| --- |
There was a problem hiding this comment.
Broader question: every other examples/standard/* subdirectory is a Kustomize
overlay on standard/default. This example is standalone (~411 lines).
I see this uses spec.match.bootMAC with dynamic provisioning (DM discovers
existing hosts by MAC), while the existing standard/default base uses
spec.overrides.bootMAC with static provisioning (DM creates hosts with that MAC).
These are fundamentally different provisioning approaches, which makes overlaying
the existing base impractical.
Consider adding a brief note in the README explaining this is a standalone example (not an overlay on standard/default) because it targets dynamically provisioned hosts rather than statically provisioned ones.
OR align with the existing patterns
- Fix px-node label: use short-form 'px-node' in README (matches config.yaml) - Refactor px-* profiles to use base: worker-profile (removes spec duplication) - Remove storage sections from worker profiles (irrelevant to label example) - Remove storage section from System CR - Rename System CR from 'controller-0' to 'px-standard' - Fix NIC inconsistency: storageless profile now inherits 2-NIC split from base - Add Prerequisites section to README (3-node PX quorum requirement) - Add Standalone Example section explaining why this is not a Kustomize overlay Signed-off-by: Aditya Kumar <aditya.kumar@windriver.com>
This change adds a new Deployment Manager example configuration demonstrating
declarative Portworx node-placement labels via HostProfile on a Standard 2+5
system with mixed worker roles (storage, storageless, and pure compute).
The example uses HostProfile.spec.labels to assign two Portworx-consumed labels:
Three worker profiles are defined:
This is a standalone example (not a Kustomize overlay on standard/default)
because it targets dynamically provisioned hosts via spec.match.bootMAC,
whereas the default base uses static provisioning via spec.overrides.bootMAC.
Files added:
Signed-off-by: Aditya Kumar aditya.kumar@windriver.com