Skip to content

feat: support storage and services in catalog workloads#197

Merged
mrhillsman merged 3 commits into
mainfrom
feat/196-catalog-storage-services
Jun 14, 2026
Merged

feat: support storage and services in catalog workloads#197
mrhillsman merged 3 commits into
mainfrom
feat/196-catalog-storage-services

Conversation

@mrhillsman

Copy link
Copy Markdown
Contributor

Summary

  • Extend workload.yaml manifest schema with declarative storage and service sections so catalog workloads can provision DataVolumes, extra disks, and K8s Services without writing Go code
  • Add manifest validation with 10 error sentinels covering storage names, sizes, serials, mount paths, service ports, and protocols
  • Override storage/service methods on both GenericWorkload and GenericMultiWorkload — including cloud-init disk setup script injection with correct runcmd ordering (setup scripts run before systemctl daemon-reload)
  • Support selector-role on service definitions for multi-role workloads, routing to the virtwork/role label

Example manifest

storage:
  - name: data
    size: 10Gi
    serial: vw-data
    mount: /mnt/data

service:
  ports:
    - name: postgres
      port: 5432
      protocol: TCP
  selector-role: server

Test plan

  • 36 new Ginkgo specs across generic_test.go and generic_multi_test.go
  • Catalog validation tests for all 10 error paths in catalog_test.go
  • Full suite passes (347 workload specs, all packages green)
  • go vet, go fmt, go build clean

Resolves #196

Extend CatalogManifest with Storage and Service fields. Add
StorageDefinition, ServiceDefinition, and ServicePort types for YAML
unmarshaling. Add validation in LoadCatalogEntry with error sentinels
for name, size, serial, mount, port, and protocol constraints.

Add buildCatalogServiceSpec and convertServicePorts helpers shared by
GenericWorkload and GenericMultiWorkload. Update NewGenericWorkload to
accept namespace parameter for service generation.

Implement ExtraVolumes, ExtraDisks, DataVolumeTemplates, RequiresService,
and ServiceSpec overrides on both GenericWorkload and GenericMultiWorkload.
Inject diskSetupScript into cloud-init userdata when storage is declared.

Refs: #196

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
…orkload

Cover DataVolumeTemplates, ExtraDisks, ExtraVolumes, RequiresService,
ServiceSpec, cloud-init disk setup script injection, runcmd ordering,
selector-role routing, backward compatibility, and combined storage+service.

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
@exe-prow-github-app exe-prow-github-app Bot requested a review from OchiengEd June 13, 2026 23:57
@exe-prow-github-app

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrhillsman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 13, 2026
@mrhillsman mrhillsman merged commit 07b8779 into main Jun 14, 2026
3 of 4 checks passed
@mrhillsman mrhillsman removed the request for review from OchiengEd June 14, 2026 01:26
@mrhillsman mrhillsman deleted the feat/196-catalog-storage-services branch June 15, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support storage and services in catalog workloads

1 participant