Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LBSubnetPath under VPC status #262

Merged
merged 1 commit into from
Aug 10, 2023
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
60 changes: 16 additions & 44 deletions build/yaml/crd/nsx.vmware.com_vpcs.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down Expand Up @@ -38,48 +39,6 @@ spec:
status:
description: VPCStatus defines the observed state of VPC
properties:
cidrsUsage:
properties:
privateCIDRsUsage:
properties:
allocated:
description: Allocated IPs in the IP Block (including IPs
used by other VPCs).
type: integer
total:
description: Total IP number in the IP Block.
type: integer
used:
description: Used IP for the VPC in the IP Block (IPs used
only in current VPC).
type: integer
required:
- allocated
- total
- used
type: object
publicCIDRsUsage:
properties:
allocated:
description: Allocated IPs in the IP Block (including IPs
used by other VPCs).
type: integer
total:
description: Total IP number in the IP Block.
type: integer
used:
description: Used IP for the VPC in the IP Block (IPs used
only in current VPC).
type: integer
required:
- allocated
- total
- used
type: object
required:
- privateCIDRsUsage
- publicCIDRsUsage
type: object
conditions:
items:
description: Condition defines condition of custom resource.
Expand Down Expand Up @@ -109,19 +68,32 @@ spec:
type: object
type: array
defaultSNATIP:
description: Default SNAT IP for private Subnets
description: Default SNAT IP for private Subnets.
type: string
lbSubnetCIDR:
description: CIDR for the load balancer Subnet.
type: string
lbSubnetPath:
description: NSX PolicyPath for the load balancer Subnet.
type: string
nsxResourcePath:
description: NSX VPC Policy API resource path.
type: string
required:
- cidrsUsage
- conditions
- defaultSNATIP
- lbSubnetCIDR
- lbSubnetPath
- nsxResourcePath
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
25 changes: 7 additions & 18 deletions pkg/apis/v1alpha1/vpc_types.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2022 VMware, Inc. All Rights Reserved.
/* Copyright © 2022 VMware, Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0 */

package v1alpha1
Expand Down Expand Up @@ -38,23 +38,12 @@ type VPCStatus struct {
Conditions []Condition `json:"conditions"`
// NSX VPC Policy API resource path.
NSXResourcePath string `json:"nsxResourcePath"`
// Default SNAT IP for private Subnets
DefaultSNATIP string `json:"defaultSNATIP"`
CIDRsUsage VPCCIDRsUsageInfo `json:"cidrsUsage"`
}

type VPCCIDRsUsageInfo struct {
PublicCIDRsUsage CIDRsUsageInfo `json:"publicCIDRsUsage"`
PrivateCIDRsUsage CIDRsUsageInfo `json:"privateCIDRsUsage"`
}

type CIDRsUsageInfo struct {
// Allocated IPs in the IP Block (including IPs used by other VPCs).
Allocated int `json:"allocated"`
// Used IP for the VPC in the IP Block (IPs used only in current VPC).
Used int `json:"used"`
// Total IP number in the IP Block.
Total int `json:"total"`
// Default SNAT IP for private Subnets.
DefaultSNATIP string `json:"defaultSNATIP"`
// NSX PolicyPath for the load balancer Subnet.
LBSubnetPath string `json:"lbSubnetPath"`
// CIDR for the load balancer Subnet.
LBSubnetCIDR string `json:"lbSubnetCIDR"`
}

func init() {
Expand Down
33 changes: 0 additions & 33 deletions pkg/apis/v1alpha1/zz_generated.deepcopy.go

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

Loading