Skip to content

Commit

Permalink
Merge pull request #2505 from dlom/HIVE-2637
Browse files Browse the repository at this point in the history
HIVE-2637: Add new API field AdditionalSecurityGroupIDs for OpenStack machine pools
  • Loading branch information
openshift-merge-bot[bot] authored Nov 6, 2024
2 parents 59d42b1 + 89c2ee0 commit 00f84cc
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 1 deletion.
6 changes: 6 additions & 0 deletions apis/hive/v1/openstack/machinepools.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ type MachinePool struct {
// The instances use ephemeral disks if not set.
// +optional
RootVolume *RootVolume `json:"rootVolume,omitempty"`

// AdditionalSecurityGroupIDs contains IDs of additional security groups for machines, where each ID
// is presented in the format sg-xxxx.
//
// +optional
AdditionalSecurityGroupIDs []string `json:"additionalSecurityGroupIDs,omitempty"`
}

// Set sets the values from `required` to `a`.
Expand Down
5 changes: 5 additions & 0 deletions apis/hive/v1/openstack/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/crds/hive.openshift.io_machinepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,13 @@ spec:
description: OpenStack is the configuration used when installing
on OpenStack.
properties:
additionalSecurityGroupIDs:
description: |-
AdditionalSecurityGroupIDs contains IDs of additional security groups for machines, where each ID
is presented in the format sg-xxxx.
items:
type: string
type: array
flavor:
description: |-
Flavor defines the OpenStack Nova flavor.
Expand Down
8 changes: 8 additions & 0 deletions hack/app-sre/saas-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7498,6 +7498,14 @@ objects:
description: OpenStack is the configuration used when installing
on OpenStack.
properties:
additionalSecurityGroupIDs:
description: 'AdditionalSecurityGroupIDs contains IDs of
additional security groups for machines, where each ID
is presented in the format sg-xxxx.'
items:
type: string
type: array
flavor:
description: 'Flavor defines the OpenStack Nova flavor.
Expand Down
3 changes: 2 additions & 1 deletion pkg/controller/machinepool/openstackactuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func (a *OpenStackActuator) GenerateMachineSets(cd *hivev1.ClusterDeployment, po
// get back a MachineSet.
// Providing the empty string will give back a MachineSet running on the default
// OpenStack Nova availability zone.
Zones: []string{""},
Zones: []string{""},
AdditionalSecurityGroupIDs: pool.Spec.Platform.OpenStack.AdditionalSecurityGroupIDs,
}

if pool.Spec.Platform.OpenStack.RootVolume != nil {
Expand Down

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

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

0 comments on commit 00f84cc

Please sign in to comment.