Skip to content

Commit 5beb917

Browse files
committed
fix to use k8s API convention
1 parent 2c7482c commit 5beb917

File tree

15 files changed

+93
-94
lines changed

15 files changed

+93
-94
lines changed

apis/elbv2/v1beta1/targetgroupbinding_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ type TargetGroupBindingSpec struct {
146146
// +optional
147147
IPAddressType *TargetGroupIPAddressType `json:"ipAddressType,omitempty"`
148148

149-
// VpcId is the VPC of the TargetGroup. If unspecified, it will be automatically inferred.
149+
// VpcID is the VPC of the TargetGroup. If unspecified, it will be automatically inferred.
150150
// +optional
151-
VpcId string `json:"vpcId,omitempty"`
151+
VpcID string `json:"vpcID,omitempty"`
152152
}
153153

154154
// TargetGroupBindingStatus defines the observed state of TargetGroupBinding

config/crd/bases/elbv2.k8s.aws_targetgroupbindings.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ spec:
386386
- instance
387387
- ip
388388
type: string
389-
vpcId:
390-
description: VpcId is the VPC of the TargetGroup. If unspecified,
389+
vpcID:
390+
description: VpcID is the VPC of the TargetGroup. If unspecified,
391391
it will be automatically inferred.
392392
type: string
393393
required:

config/webhook/manifests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
apiVersion: admissionregistration.k8s.io/v1
32
kind: MutatingWebhookConfiguration
43
metadata:

docs/guide/targetgroupbinding/targetgroupbinding.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ spec:
3131
```
3232
3333
34-
## VpcId
34+
## VpcID
3535
TargetGroupBinding CR supports the explicit definition of the Virtual Private Cloud (VPC) of your TargetGroup.
3636
3737
!!!tip ""
38-
If the VpcId is not explicitly specified, a mutating webhook will automatically call AWS API to find the VpcId for your TargetGroup and set it to correct value.
38+
If the VpcID is not explicitly specified, a mutating webhook will automatically call AWS API to find the VpcID for your TargetGroup and set it to correct value.
3939
4040
4141
## Sample YAML
@@ -49,7 +49,7 @@ spec:
4949
name: awesome-service # route traffic to the awesome-service
5050
port: 80
5151
targetGroupARN: <arn-to-targetGroup>
52-
vpcId: <vpcId>
52+
vpcID: <vpcID>
5353
```
5454
5555

helm/aws-load-balancer-controller/crds/crds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,8 @@ spec:
587587
- instance
588588
- ip
589589
type: string
590-
vpcId:
591-
description: VpcId is the VPC of the TargetGroup. If unspecified,
590+
vpcID:
591+
description: VpcID is the VPC of the TargetGroup. If unspecified,
592592
it will be automatically inferred.
593593
type: string
594594
required:

pkg/deploy/elbv2/target_group_binding_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func buildK8sTargetGroupBindingSpec(ctx context.Context, resTGB *elbv2model.Targ
187187
}
188188
k8sTGBSpec.NodeSelector = resTGB.Spec.Template.Spec.NodeSelector
189189
k8sTGBSpec.IPAddressType = resTGB.Spec.Template.Spec.IPAddressType
190-
k8sTGBSpec.VpcId = resTGB.Spec.Template.Spec.VpcId
190+
k8sTGBSpec.VpcID = resTGB.Spec.Template.Spec.VpcID
191191
return k8sTGBSpec, nil
192192
}
193193

pkg/ingress/model_build_target_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (t *defaultModelBuildTask) buildTargetGroupBindingSpec(ctx context.Context,
7777
Networking: tgbNetworking,
7878
NodeSelector: nodeSelector,
7979
IPAddressType: (*elbv2api.TargetGroupIPAddressType)(tg.Spec.IPAddressType),
80-
VpcId: t.vpcID,
80+
VpcID: t.vpcID,
8181
},
8282
},
8383
}

pkg/ingress/model_builder_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ const baseStackJSON = `
308308
"$ref":"#/resources/AWS::ElasticLoadBalancingV2::TargetGroup/ns-1/ing-1-svc-1:http/status/targetGroupARN"
309309
},
310310
"targetType":"instance",
311-
"vpcId": "vpc-dummy",
311+
"vpcID": "vpc-dummy",
312312
"ipAddressType":"ipv4",
313313
"serviceRef":{
314314
"name":"svc-1",
@@ -351,7 +351,7 @@ const baseStackJSON = `
351351
},
352352
"targetType":"instance",
353353
"ipAddressType":"ipv4",
354-
"vpcId": "vpc-dummy",
354+
"vpcID": "vpc-dummy",
355355
"serviceRef":{
356356
"name":"svc-2",
357357
"port":"http"
@@ -392,7 +392,7 @@ const baseStackJSON = `
392392
"$ref":"#/resources/AWS::ElasticLoadBalancingV2::TargetGroup/ns-1/ing-1-svc-3:https/status/targetGroupARN"
393393
},
394394
"targetType":"ip",
395-
"vpcId": "vpc-dummy",
395+
"vpcID": "vpc-dummy",
396396
"ipAddressType":"ipv4",
397397
"serviceRef":{
398398
"name":"svc-3",
@@ -1445,7 +1445,7 @@ func Test_defaultModelBuilder_Build(t *testing.T) {
14451445
},
14461446
"spec": {
14471447
"ipAddressType": "ipv4",
1448-
"vpcId": "vpc-dummy",
1448+
"vpcID": "vpc-dummy",
14491449
"networking": {
14501450
"ingress": [
14511451
{
@@ -2433,7 +2433,7 @@ func Test_defaultModelBuilder_Build(t *testing.T) {
24332433
},
24342434
"spec": {
24352435
"ipAddressType": "ipv6",
2436-
"vpcId": "vpc-dummy",
2436+
"vpcID": "vpc-dummy",
24372437
"networking": {
24382438
"ingress": [
24392439
{
@@ -2700,7 +2700,7 @@ func Test_defaultModelBuilder_Build(t *testing.T) {
27002700
},
27012701
"spec": {
27022702
"ipAddressType": "ipv4",
2703-
"vpcId": "vpc-dummy",
2703+
"vpcID": "vpc-dummy",
27042704
"networking": {
27052705
"ingress": [
27062706
{
@@ -2860,7 +2860,7 @@ func Test_defaultModelBuilder_Build(t *testing.T) {
28602860
},
28612861
"spec": {
28622862
"ipAddressType": "ipv4",
2863-
"vpcId": "vpc-dummy",
2863+
"vpcID": "vpc-dummy",
28642864
"networking": {
28652865
"ingress": [
28662866
{

pkg/model/elbv2/target_group_binding.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ type TargetGroupBindingSpec struct {
104104
// +optional
105105
IPAddressType *elbv2api.TargetGroupIPAddressType `json:"ipAddressType,omitempty"`
106106

107-
// VpcId is the VPC of the TargetGroup. If unspecified, it will be automatically inferred.
107+
// VpcID is the VPC of the TargetGroup. If unspecified, it will be automatically inferred.
108108
// +optional
109-
VpcId string `json:"vpcId,omitempty"`
109+
VpcID string `json:"vpcID,omitempty"`
110110
}
111111

112112
// Template for TargetGroupBinding Custom Resource.

pkg/service/model_build_target_group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ func (t *defaultModelBuildTask) buildTargetGroupBindingSpec(ctx context.Context,
444444
Networking: tgbNetworking,
445445
NodeSelector: nodeSelector,
446446
IPAddressType: (*elbv2api.TargetGroupIPAddressType)(targetGroup.Spec.IPAddressType),
447-
VpcId: t.vpcID,
447+
VpcID: t.vpcID,
448448
},
449449
},
450450
}, nil

0 commit comments

Comments
 (0)