Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/). Versioning alig

## [Unreleased]

### Added

- `spec.tags` on `Instance`, `VPC`, `Network` and `SecurityGroup`. A free-form list of user labels persisted on the CR so the REST API and UI can round-trip resource tags. Previously the field did not exist in the schema, so control-plane writes of `spec.tags` were rejected by strict field validation (core#256).

### Changed

- The Helm chart is no longer kept in this repository. The only copy is `charts/virtfoundry-operator` in [virtfoundry/helm-charts](https://github.com/virtfoundry/helm-charts). `make verify-chart-rbac` checks that chart (sibling checkout or a clone of helm-charts main) against the ClusterRole generated from the kubebuilder markers. To add a permission, add the rule to the chart first, then the marker here.
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/instance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ type InstanceSpec struct {
// +optional
PowerState string `json:"powerState,omitempty"`

// Tags are free-form user labels persisted on the Instance and returned
// unchanged by the REST API and UI.
// +optional
Tags []string `json:"tags,omitempty"`

// Import optional CloudStack/other import identity.
// +optional
Import *ImportMeta `json:"import,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/network_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ type NetworkSpec struct {
// +optional
VPCRef *LocalObjectRef `json:"vpcRef,omitempty"`

// Tags are free-form user labels persisted on the Network and returned
// unchanged by the REST API and UI.
// +optional
Tags []string `json:"tags,omitempty"`

// Import optional CloudStack/other import identity.
// +optional
Import *ImportMeta `json:"import,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/securitygroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ type SecurityGroupSpec struct {
// +optional
VPCRef *LocalObjectRef `json:"vpcRef,omitempty"`

// Tags are free-form user labels persisted on the SecurityGroup and
// returned unchanged by the REST API and UI.
// +optional
Tags []string `json:"tags,omitempty"`

// Rules firewall rules applied to attached instances.
// +optional
Rules []SecurityGroupRuleSpec `json:"rules,omitempty"`
Expand Down
5 changes: 5 additions & 0 deletions api/v1alpha1/vpc_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ type VPCSpec struct {
// CIDR IPv4 network range for the VPC.
CIDR string `json:"cidr"`

// Tags are free-form user labels persisted on the VPC and returned
// unchanged by the REST API and UI.
// +optional
Tags []string `json:"tags,omitempty"`

// Import optional CloudStack/other import identity.
// +optional
Import *ImportMeta `json:"import,omitempty"`
Expand Down
20 changes: 20 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions config/crd/bases/virtfoundry.io_instances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ spec:
- name
type: object
type: array
tags:
description: |-
Tags are free-form user labels persisted on the Instance and returned
unchanged by the REST API and UI.
items:
type: string
type: array
templateRef:
description: TemplateRef names the Template CR.
properties:
Expand Down
7 changes: 7 additions & 0 deletions config/crd/bases/virtfoundry.io_networks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ spec:
- isolated
- shared
type: string
tags:
description: |-
Tags are free-form user labels persisted on the Network and returned
unchanged by the REST API and UI.
items:
type: string
type: array
vpcRef:
description: VPCRef names the parent VPC CR.
properties:
Expand Down
7 changes: 7 additions & 0 deletions config/crd/bases/virtfoundry.io_securitygroups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ spec:
- protocol
type: object
type: array
tags:
description: |-
Tags are free-form user labels persisted on the SecurityGroup and
returned unchanged by the REST API and UI.
items:
type: string
type: array
vpcRef:
description: VPCRef names the parent VPC CR.
properties:
Expand Down
7 changes: 7 additions & 0 deletions config/crd/bases/virtfoundry.io_vpcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ spec:
name:
description: Name display label shown in UI/REST.
type: string
tags:
description: |-
Tags are free-form user labels persisted on the VPC and returned
unchanged by the REST API and UI.
items:
type: string
type: array
required:
- cidr
- name
Expand Down
Loading