Skip to content

Commit 1dd68b7

Browse files
authored
Merge pull request #4389 from shraddhabang/agacrd
[feat: aga] add AWS Global Accelerator CRD with comprehensive validation
2 parents 12a57d3 + 0a8459a commit 1dd68b7

File tree

10 files changed

+2251
-0
lines changed

10 files changed

+2251
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ AWS_SDK_MODEL_OVERRIDE ?= "n"
2121
# Move Gateway API CRDs from bases directory to gateway directory
2222
MOVE_GATEWAY_CRDS = mv config/crd/bases/gateway.k8s.aws_* config/crd/gateway/
2323

24+
# Move AGA CRDs from bases directory to aga directory
25+
MOVE_AGA_CRDS = mkdir -p config/crd/aga && mv config/crd/bases/aga.k8s.aws_* config/crd/aga/
26+
2427
# Copy combined Gateway API CRDs from bases directory to helm directory
2528
COPY_GATEWAY_CRDS_TO_HELM = cp config/crd/gateway/gateway-crds.yaml helm/aws-load-balancer-controller/crds/gateway-crds.yaml
2629

30+
# Copy combined AGA CRDs from aga directory to helm directory
31+
COPY_AGA_CRDS_TO_HELM = cp config/crd/aga/aga-crds.yaml helm/aws-load-balancer-controller/crds/aga-crds.yaml
32+
2733
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
2834
ifeq (,$(shell go env GOBIN))
2935
GOBIN=$(shell go env GOPATH)/bin
@@ -68,11 +74,16 @@ manifests: controller-gen kustomize
6874

6975
crds: manifests
7076
$(MOVE_GATEWAY_CRDS)
77+
$(MOVE_AGA_CRDS)
7178
$(KUSTOMIZE) build config/crd > helm/aws-load-balancer-controller/crds/crds.yaml
7279
$(KUSTOMIZE) build config/crd/gateway > config/crd/gateway/gateway-crds.yaml
7380
echo '---' > config/crd/gateway/gateway-crds.yaml
7481
$(KUSTOMIZE) build config/crd/gateway >> config/crd/gateway/gateway-crds.yaml
7582
$(COPY_GATEWAY_CRDS_TO_HELM)
83+
$(KUSTOMIZE) build config/crd/aga > config/crd/aga/aga-crds.yaml
84+
echo '---' > config/crd/aga/aga-crds.yaml
85+
$(KUSTOMIZE) build config/crd/aga >> config/crd/aga/aga-crds.yaml
86+
$(COPY_AGA_CRDS_TO_HELM)
7687

7788
# Run go fmt against code
7889
fmt:
@@ -218,3 +229,12 @@ gw-api-ref-docs:
218229
--config=crd-ref-docs.yaml \
219230
--renderer=markdown \
220231
--output-path=${PWD}/docs/guide/gateway/spec.md
232+
233+
# generate aga CRD spec doc
234+
.PHONY: aga-ref-docs
235+
aga-ref-docs:
236+
crd-ref-docs \
237+
--source-path=${PWD}/apis/aga/ \
238+
--config=crd-ref-docs.yaml \
239+
--renderer=markdown \
240+
--output-path=${PWD}/docs/guide/globalaccelerator/spec.md

apis/aga/v1beta1/globalaccelerator_types.go

Lines changed: 306 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Package v1beta1 contains API Schema definitions for the aga v1beta1 API group
18+
// +kubebuilder:object:generate=true
19+
// +groupName=aga.k8s.aws
20+
package v1beta1
21+
22+
import (
23+
"k8s.io/apimachinery/pkg/runtime/schema"
24+
"sigs.k8s.io/controller-runtime/pkg/scheme"
25+
)
26+
27+
var (
28+
// GroupVersion is group version used to register these objects
29+
GroupVersion = schema.GroupVersion{Group: "aga.k8s.aws", Version: "v1beta1"}
30+
31+
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
32+
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
33+
34+
// AddToScheme adds the types in this group-version to the given scheme.
35+
AddToScheme = SchemeBuilder.AddToScheme
36+
)

0 commit comments

Comments
 (0)