Skip to content
Open
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
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ changecrd: manifests generate generate-api-docs
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="github.com/vmware-tanzu/nsx-operator/pkg/apis/legacy/v1alpha1" output:crd:artifacts:config=build/yaml/crd/legacy/
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="github.com/vmware-tanzu/nsx-operator/pkg/apis/vpc/v1alpha1" output:crd:artifacts:config=build/yaml/crd/vpc/
# EAS CRDs are for schema validation and kubectl explain only; do not apply to cluster.
# EAS resources are served by the aggregated API server via APIService, not by CRDs.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="github.com/vmware-tanzu/nsx-operator/pkg/apis/eas/v1alpha1" output:crd:artifacts:config=build/yaml/crd/eas/

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand Down Expand Up @@ -96,6 +99,11 @@ build-clean: generate fmt vet ## Build clean binary.
@mkdir -p $(BINDIR)
GOOS=linux go build -o $(BINDIR)/clean $(GOFLAGS) -ldflags '$(LDFLAGS)' cmd_clean/main.go

.PHONY: build-eas
build-eas: generate fmt vet ## Build EAS (Extension API Server) binary.
@mkdir -p $(BINDIR)
GOOS=linux go build -o $(BINDIR)/nsx-eas $(GOFLAGS) -ldflags '$(LDFLAGS)' cmd_eas/main.go

.PHONY: run
run: manifests generate fmt vet ## Run a controller from your host.
go run ./cmd/main.go
Expand Down
155 changes: 155 additions & 0 deletions build/yaml/crd/eas/eas.nsx.vmware.com_ipblockusages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.5
name: ipblockusages.eas.nsx.vmware.com
spec:
group: eas.nsx.vmware.com
names:
kind: IPBlockUsage
listKind: IPBlockUsageList
plural: ipblockusages
singular: ipblockusage
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: IP block visibility
jsonPath: .spec.visibility
name: Visibility
type: string
- description: Used IP count
jsonPath: .spec.usedIpsCount
name: UsedIPs
type: string
- description: Available IP count
jsonPath: .spec.availableIpsCount
name: AvailableIPs
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: IPBlockUsage is the Schema for the IP block usage API.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: IPBlockUsageSpec represents the usage of an IP Address Block.
properties:
addressType:
description: Address type (IPV4 or IPV6).
type: string
availableIpRanges:
description: Available IP ranges.
items:
type: string
type: array
availableIpsCount:
description: Total count of available IPs.
type: string
cidrUsage:
description: Usage details for each CIDR.
items:
description: CidrUsageDetails represents usage details for a CIDR
of IpAddressBlock.
properties:
availableIpRanges:
description: Available IP ranges.
items:
type: string
type: array
availableIpsCount:
description: Available IP count.
type: string
cidr:
description: CIDR notation.
type: string
overallUsedIpsCount:
description: Overall used IP count (not limited to user's scope).
type: string
usedIpRanges:
description: Used IP ranges in the user's scope.
items:
type: string
type: array
usedIpsCount:
description: Used IP count in the user's scope.
type: string
type: object
type: array
description:
description: Description of the IP block.
type: string
displayName:
description: Display name of the IP block.
type: string
intentPath:
description: Policy path of IpAddressBlock.
type: string
overallIpsCount:
description: Total count of IPs in this block.
type: string
rangeUsage:
description: Usage details for each IP range.
items:
description: RangeUsageDetails represents usage details for an IP
range of IpAddressBlock.
properties:
availableIpRanges:
description: Available IP ranges.
items:
type: string
type: array
availableIpsCount:
description: Available IP count.
type: string
overallUsedIpsCount:
description: Overall used IP count (not limited to user's scope).
type: string
start:
description: The IP range from RangeList in IpAddressBlock.
type: string
usedIpRanges:
description: Used IP ranges in the user's scope.
items:
type: string
type: array
usedIpsCount:
description: Used IP count in the user's scope.
type: string
type: object
type: array
usedIpRanges:
description: Used IP ranges.
items:
type: string
type: array
usedIpsCount:
description: Total count of used IPs.
type: string
visibility:
description: Visibility (PRIVATE or EXTERNAL).
type: string
type: object
required:
- spec
type: object
served: true
storage: true
subresources: {}
116 changes: 116 additions & 0 deletions build/yaml/crd/eas/eas.nsx.vmware.com_subnetdhcpserverconfigstats.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.16.5
name: subnetdhcpserverconfigstats.eas.nsx.vmware.com
spec:
group: eas.nsx.vmware.com
names:
kind: SubnetDHCPServerConfigStats
listKind: SubnetDHCPServerConfigStatsList
plural: subnetdhcpserverconfigstats
singular: subnetdhcpserverconfigstats
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: DHCP server UUID
jsonPath: .spec.dhcpServerId
name: DHCPServerID
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: SubnetDHCPServerConfigStats is the Schema for the subnet DHCP
server config stats API.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: SubnetDHCPServerConfigStatsSpec represents the DHCP server
statistics for a subnet.
properties:
acks:
description: Total number of DHCP ACK packets.
format: int64
type: integer
declines:
description: Total number of DHCP DECLINE packets.
format: int64
type: integer
dhcpServerId:
description: DHCP server UUID.
type: string
discovers:
description: Total number of DHCP DISCOVER packets.
format: int64
type: integer
errors:
description: Total number of DHCP errors.
format: int64
type: integer
informs:
description: Total number of DHCP INFORM packets.
format: int64
type: integer
ipPoolStats:
description: DHCP IP pool usage statistics.
items:
description: DhcpIpPoolUsage represents DHCP IP pool usage statistics.
properties:
allocatedNumber:
description: Allocated number (reference only).
format: int64
type: integer
allocatedPercentage:
description: Allocated percentage (reference only).
format: int64
type: integer
consumedNumber:
description: Total number of IP addresses consumed by DHCP clients.
format: int64
type: integer
dhcpIpPoolId:
description: UUID of DHCP IP pool.
type: string
poolSize:
description: Pool size.
format: int64
type: integer
type: object
type: array
nacks:
description: Total number of DHCP NACK packets.
format: int64
type: integer
offers:
description: Total number of DHCP OFFER packets.
format: int64
type: integer
releases:
description: Total number of DHCP RELEASE packets.
format: int64
type: integer
type: object
required:
- spec
type: object
served: true
storage: true
subresources: {}
Loading
Loading