Skip to content

Commit bf17da1

Browse files
authored
Merge pull request #1575 from shiftstack/projectid
⚠️ Remove ProjectID from PortOpts
2 parents b511a57 + 3d11496 commit bf17da1

10 files changed

+6
-21
lines changed

api/v1alpha5/zz_generated.conversion.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha6/zz_generated.conversion.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1alpha7/types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ type PortOpts struct {
8888
AdminStateUp *bool `json:"adminStateUp,omitempty"`
8989
MACAddress string `json:"macAddress,omitempty"`
9090
// Specify pairs of subnet and/or IP address. These should be subnets of the network with the given NetworkID.
91-
FixedIPs []FixedIP `json:"fixedIPs,omitempty"`
92-
ProjectID string `json:"projectId,omitempty"`
91+
FixedIPs []FixedIP `json:"fixedIPs,omitempty"`
9392
// The names, uuids, filters or any combination these of the security groups to assign to the instance
9493
SecurityGroupFilters []SecurityGroupFilter `json:"securityGroupFilters,omitempty"`
9594
AllowedAddressPairs []AddressPair `json:"allowedAddressPairs,omitempty"`

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclusters.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3944,8 +3944,6 @@ spec:
39443944
mode” for the VF.
39453945
type: boolean
39463946
type: object
3947-
projectId:
3948-
type: string
39493947
propagateUplinkStatus:
39503948
description: PropageteUplinkStatus enables or disables
39513949
the propagate uplink status on the port.

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackclustertemplates.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1784,8 +1784,6 @@ spec:
17841784
the “trusted mode” for the VF.
17851785
type: boolean
17861786
type: object
1787-
projectId:
1788-
type: string
17891787
propagateUplinkStatus:
17901788
description: PropageteUplinkStatus enables or
17911789
disables the propagate uplink status on the

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachines.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,8 +1320,6 @@ spec:
13201320
mode” for the VF.
13211321
type: boolean
13221322
type: object
1323-
projectId:
1324-
type: string
13251323
propagateUplinkStatus:
13261324
description: PropageteUplinkStatus enables or disables the propagate
13271325
uplink status on the port.

config/crd/bases/infrastructure.cluster.x-k8s.io_openstackmachinetemplates.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,6 @@ spec:
11281128
mode” for the VF.
11291129
type: boolean
11301130
type: object
1131-
projectId:
1132-
type: string
11331131
propagateUplinkStatus:
11341132
description: PropageteUplinkStatus enables or disables
11351133
the propagate uplink status on the port.

docs/book/src/topics/crd-changes/v1alpha6-to-v1alpha7.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- [Changes to ports](#changes-to-ports)
1313
- [Change to securityGroupFilters](#change-to-securitygroupfilters)
1414
- [Removal of securityGroups](#removal-of-securitygroups)
15-
- [Removal of tenantId](#removal-of-tenantid)
15+
- [Removal of tenantId and projectId](#removal-of-tenantid-and-projectid)
1616
- [Change to profile](#change-to-profile)
1717
- [`OpenStackCluster`](#openstackcluster)
1818
- [Change to externalRouterIPs.subnet](#change-to-externalrouteripssubnet)
@@ -184,9 +184,9 @@ securityGroupFilters:
184184
- id: 4a131d3e-9939-4a6b-adea-788a2e89fcd8
185185
```
186186

187-
##### Removal of tenantId
187+
##### Removal of tenantId and projectId
188188

189-
Use projectId instead.
189+
These are removed without replacement. They required admin permission to set, which CAPO does not have by default, and served no purpose.
190190

191191
##### Change to profile
192192

pkg/cloud/services/networking/port.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ func (s *Service) GetOrCreatePort(eventObject runtime.Object, clusterName string
137137
Description: description,
138138
AdminStateUp: portOpts.AdminStateUp,
139139
MACAddress: portOpts.MACAddress,
140-
ProjectID: portOpts.ProjectID,
141140
SecurityGroups: securityGroupsPtr,
142141
AllowedAddressPairs: addressPairs,
143142
FixedIPs: fixedIPs,

pkg/cloud/services/networking/port_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func Test_GetOrCreatePort(t *testing.T) {
4343
portID1 := "50214c48-c09e-4a54-914f-97b40fd22802"
4444
portID2 := "4c096384-f0a5-466d-9534-06a7ed281a79"
4545
hostID := "825c1b11-3dca-4bfe-a2d8-a3cc1964c8d5"
46-
projectID := "063171b1-0595-4882-98cd-3ee79676ff87"
4746
trunkID := "eb7541fa-5e2a-4cca-b2c3-dfa409b917ce"
4847
portSecurityGroupID := "f51d1206-fc5a-4f7a-a5c0-2e03e44e4dc0"
4948

@@ -171,7 +170,6 @@ func Test_GetOrCreatePort(t *testing.T) {
171170
},
172171
IPAddress: "192.168.0.50",
173172
}, {IPAddress: "192.168.1.50"}},
174-
ProjectID: projectID,
175173
SecurityGroupFilters: portSecurityGroupFilters,
176174
AllowedAddressPairs: []infrav1.AddressPair{{
177175
IPAddress: "10.10.10.10",
@@ -203,7 +201,6 @@ func Test_GetOrCreatePort(t *testing.T) {
203201
IPAddress: "192.168.1.50",
204202
},
205203
},
206-
ProjectID: projectID,
207204
SecurityGroups: &securityGroupUUIDs,
208205
AllowedAddressPairs: []ports.AddressPair{{
209206
IPAddress: "10.10.10.10",

0 commit comments

Comments
 (0)