Skip to content

Commit 2dff178

Browse files
committed
chore: regenerate crds
1 parent e6b7970 commit 2dff178

10 files changed

+909
-2
lines changed

.github/workflows/crdgen.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,8 @@ jobs:
3232
- name: Regenerate OverlayExtensionConfig CRD
3333
run: make -C crd/overlayextensionconfig
3434
- name: Fail if the tree is dirty
35-
run: test -z "$(git status --porcelain)"
35+
run: |
36+
if [ -n "$(git status --porcelain)" ]; then
37+
echo "Changes detected. Please run 'make regenerate-crd' locally to regenerate crds."
38+
exit 1
39+
fi

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,11 @@ dockerfiles: renderkit ## Render all Dockerfile templates with current state of
943943
@make -f build/images.mk render PATH=cns
944944
@make -f build/images.mk render PATH=cni
945945

946+
regenerate-crd: controller-gen ## Regenerate CRDs
947+
@for makefile in $$(find ./crd/ -name "Makefile" -type f); do \
948+
make -f $$makefile all; \
949+
done
950+
946951

947952
$(REPO_ROOT)/.git/hooks/pre-push:
948953
@ln -s $(REPO_ROOT)/.hooks/pre-push $(REPO_ROOT)/.git/hooks/
@@ -961,11 +966,14 @@ setup: install-hooks gitconfig ## performs common required repo setup
961966

962967
##@ Tools
963968

964-
tools: renderkit
969+
tools: renderkit controller-gen
965970

966971
renderkit: ## Install renderkit for rendering Dockerfile templates
967972
@go install -modfile=$(TOOLS_GO_MOD) github.com/orellazri/renderkit
968973

974+
controller-gen: ## Install renderkit for rendering Dockerfile templates
975+
@go install -modfile=$(TOOLS_GO_MOD) -mod=readonly sigs.k8s.io/controller-tools/cmd/controller-gen
976+
969977
##@ Help
970978

971979
help: ## Display this help
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.18.0
7+
name: clustersubnetstates.acn.azure.com
8+
spec:
9+
group: acn.azure.com
10+
names:
11+
kind: ClusterSubnetState
12+
listKind: ClusterSubnetStateList
13+
plural: clustersubnetstates
14+
singular: clustersubnetstate
15+
scope: Namespaced
16+
versions:
17+
- additionalPrinterColumns:
18+
- jsonPath: .status.exhausted
19+
name: Exhausted
20+
type: string
21+
- jsonPath: .status.timestamp
22+
name: Updated
23+
type: string
24+
name: v1alpha1
25+
schema:
26+
openAPIV3Schema:
27+
description: ClusterSubnetState is the Schema for the ClusterSubnetState API
28+
properties:
29+
apiVersion:
30+
description: |-
31+
APIVersion defines the versioned schema of this representation of an object.
32+
Servers should convert recognized schemas to the latest internal value, and
33+
may reject unrecognized values.
34+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
35+
type: string
36+
kind:
37+
description: |-
38+
Kind is a string value representing the REST resource this object represents.
39+
Servers may infer this from the endpoint the client submits requests to.
40+
Cannot be updated.
41+
In CamelCase.
42+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
43+
type: string
44+
metadata:
45+
type: object
46+
status:
47+
description: ClusterSubnetStateStatus defines the observed state of ClusterSubnetState
48+
properties:
49+
exhausted:
50+
type: boolean
51+
timestamp:
52+
type: string
53+
required:
54+
- exhausted
55+
- timestamp
56+
type: object
57+
type: object
58+
served: true
59+
storage: true
60+
subresources:
61+
status: {}
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.18.0
7+
name: nodenetworkconfigs.acn.azure.com
8+
spec:
9+
group: acn.azure.com
10+
names:
11+
kind: NodeNetworkConfig
12+
listKind: NodeNetworkConfigList
13+
plural: nodenetworkconfigs
14+
shortNames:
15+
- nnc
16+
singular: nodenetworkconfig
17+
scope: Namespaced
18+
versions:
19+
- additionalPrinterColumns:
20+
- jsonPath: .spec.requestedIPCount
21+
name: Requested IPs
22+
priority: 1
23+
type: integer
24+
- jsonPath: .spec.availabilityZone
25+
name: Availability Zone
26+
priority: 1
27+
type: string
28+
- jsonPath: .status.assignedIPCount
29+
name: Allocated IPs
30+
type: integer
31+
- jsonPath: .status.networkContainers[*].subnetName
32+
name: Subnet
33+
priority: 1
34+
type: string
35+
- jsonPath: .status.networkContainers[*].subnetAddressSpace
36+
name: Subnet CIDR
37+
priority: 1
38+
type: string
39+
- jsonPath: .status.networkContainers[*].id
40+
name: NC ID
41+
priority: 1
42+
type: string
43+
- jsonPath: .status.networkContainers[*].assignmentMode
44+
name: NC Mode
45+
type: string
46+
- jsonPath: .status.networkContainers[*].type
47+
name: NC Type
48+
priority: 1
49+
type: string
50+
- jsonPath: .status.networkContainers[*].version
51+
name: NC Version
52+
type: integer
53+
name: v1alpha
54+
schema:
55+
openAPIV3Schema:
56+
description: NodeNetworkConfig is the Schema for the nodenetworkconfigs API
57+
properties:
58+
apiVersion:
59+
description: |-
60+
APIVersion defines the versioned schema of this representation of an object.
61+
Servers should convert recognized schemas to the latest internal value, and
62+
may reject unrecognized values.
63+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
64+
type: string
65+
kind:
66+
description: |-
67+
Kind is a string value representing the REST resource this object represents.
68+
Servers may infer this from the endpoint the client submits requests to.
69+
Cannot be updated.
70+
In CamelCase.
71+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
72+
type: string
73+
metadata:
74+
type: object
75+
spec:
76+
description: NodeNetworkConfigSpec defines the desired state of NetworkConfig
77+
properties:
78+
availabilityZone:
79+
description: AvailabilityZone contains the Azure availability zone
80+
for the virtual machine where network containers are placed.
81+
type: integer
82+
ipsNotInUse:
83+
items:
84+
type: string
85+
type: array
86+
requestedIPCount:
87+
default: 0
88+
format: int64
89+
type: integer
90+
type: object
91+
status:
92+
description: NodeNetworkConfigStatus defines the observed state of NetworkConfig
93+
properties:
94+
assignedIPCount:
95+
default: 0
96+
type: integer
97+
networkContainers:
98+
items:
99+
description: NetworkContainer defines the structure of a Network
100+
Container as found in NetworkConfigStatus
101+
properties:
102+
assignmentMode:
103+
default: dynamic
104+
description: AssignmentMode is whether we are allocated an entire
105+
block or IP by IP.
106+
enum:
107+
- dynamic
108+
- static
109+
type: string
110+
defaultGateway:
111+
type: string
112+
defaultGatewayV6:
113+
type: string
114+
id:
115+
type: string
116+
ipAssignments:
117+
items:
118+
description: IPAssignment groups an IP address and Name. Name
119+
is a UUID set by the the IP address assigner.
120+
properties:
121+
ip:
122+
type: string
123+
name:
124+
type: string
125+
type: object
126+
type: array
127+
macAddress:
128+
type: string
129+
nodeIP:
130+
type: string
131+
primaryIP:
132+
type: string
133+
primaryIPV6:
134+
type: string
135+
resourceGroupID:
136+
type: string
137+
status:
138+
description: NCStatus indicates the latest NC request status
139+
enum:
140+
- NCUpdateSubnetFullError
141+
- NCUpdateInternalServerError
142+
- NCUpdateUnauthorizedError
143+
- NCUpdateSuccess
144+
- NCUpdateFailed
145+
type: string
146+
subcriptionID:
147+
type: string
148+
subnetAddressSpace:
149+
type: string
150+
subnetID:
151+
type: string
152+
subnetName:
153+
type: string
154+
type:
155+
default: vnet
156+
description: NCType is the specific type of network this NC
157+
represents.
158+
type: string
159+
version:
160+
default: 0
161+
format: int64
162+
type: integer
163+
vnetID:
164+
type: string
165+
type: object
166+
type: array
167+
scaler:
168+
description: Scaler groups IP request params together
169+
properties:
170+
batchSize:
171+
format: int64
172+
type: integer
173+
maxIPCount:
174+
format: int64
175+
type: integer
176+
releaseThresholdPercent:
177+
format: int64
178+
type: integer
179+
requestThresholdPercent:
180+
format: int64
181+
type: integer
182+
type: object
183+
status:
184+
description: Status indicates the NNC reconcile status
185+
enum:
186+
- Updating
187+
- Updated
188+
- Error
189+
type: string
190+
type: object
191+
type: object
192+
served: true
193+
storage: true
194+
subresources:
195+
status: {}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.18.0
7+
name: overlayextensionconfigs.acn.azure.com
8+
spec:
9+
group: acn.azure.com
10+
names:
11+
kind: OverlayExtensionConfig
12+
listKind: OverlayExtensionConfigList
13+
plural: overlayextensionconfigs
14+
shortNames:
15+
- oec
16+
singular: overlayextensionconfig
17+
scope: Namespaced
18+
versions:
19+
- additionalPrinterColumns:
20+
- jsonPath: .spec.extensionIPRange
21+
name: OverlayExtensionConfig IP range
22+
priority: 1
23+
type: string
24+
name: v1alpha1
25+
schema:
26+
openAPIV3Schema:
27+
description: OverlayExtensionConfig is the Schema for the overlayextensionconfigs
28+
API
29+
properties:
30+
apiVersion:
31+
description: |-
32+
APIVersion defines the versioned schema of this representation of an object.
33+
Servers should convert recognized schemas to the latest internal value, and
34+
may reject unrecognized values.
35+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
36+
type: string
37+
kind:
38+
description: |-
39+
Kind is a string value representing the REST resource this object represents.
40+
Servers may infer this from the endpoint the client submits requests to.
41+
Cannot be updated.
42+
In CamelCase.
43+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
44+
type: string
45+
metadata:
46+
type: object
47+
spec:
48+
description: OverlayExtensionConfigSpec defines the desired state of OverlayExtensionConfig.
49+
properties:
50+
extensionIPRange:
51+
description: |-
52+
ExtensionIPRange field defines a CIDR that should be able to reach routing domain ip addresses.
53+
43 is max length of IPv6 CIDR string
54+
maxLength: 43
55+
type: string
56+
x-kubernetes-validations:
57+
- message: Value is immutable
58+
rule: self == oldSelf
59+
type: object
60+
x-kubernetes-validations:
61+
- message: ExtensionIPRange is required once set
62+
rule: '!has(oldSelf.extensionIPRange) || has(self.extensionIPRange)'
63+
status:
64+
description: OverlayExtensionConfigStatus defines the observed state of
65+
OverlayExtensionConfig
66+
properties:
67+
message:
68+
type: string
69+
state:
70+
default: None
71+
enum:
72+
- None
73+
- Pending
74+
- Succeeded
75+
- Failed
76+
type: string
77+
type: object
78+
type: object
79+
served: true
80+
storage: true
81+
subresources:
82+
status: {}

0 commit comments

Comments
 (0)