-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1820 from atarax/atarax/globalaccelerator
- Loading branch information
Showing
32 changed files
with
6,269 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
ignore: | ||
field_paths: | ||
- "CreateAcceleratorInput.IdempotencyToken" | ||
- "CreateListenerInput.AcceleratorArn" | ||
- "CreateListenerInput.IdempotencyToken" | ||
- "CreateEndpointGroupInput.ListenerArn" | ||
- "CreateEndpointGroupInput.IdempotencyToken" | ||
resource_names: | ||
- "CustomRoutingAccelerator" | ||
- "CustomRoutingEndpointGroup" | ||
- "CustomRoutingListener" | ||
|
||
resources: | ||
Accelerator: | ||
exceptions: | ||
errors: | ||
404: | ||
code: AcceleratorNotFoundException | ||
Listener: | ||
exceptions: | ||
errors: | ||
404: | ||
code: ListenerNotFoundException | ||
EndpointGroup: | ||
exceptions: | ||
errors: | ||
404: | ||
code: EndpointGroupNotFoundException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
Copyright 2021 The Crossplane Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha1 | ||
|
||
import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" | ||
|
||
// CustomAcceleratorParameters contains the additional fields for AcceleratorParameters | ||
type CustomAcceleratorParameters struct{} | ||
|
||
// CustomEndpointGroupParameters contains the additional fields for EndpointGroupParameters | ||
type CustomEndpointGroupParameters struct { | ||
// ListenerArn is the ARN for the Listener. | ||
// +immutable | ||
// +crossplane:generate:reference:type=Listener | ||
// +crossplane:generate:reference:extractor=ListenerARN() | ||
// +crossplane:generate:reference:refFieldName=ListenerArnRef | ||
// +crossplane:generate:reference:selectorFieldName=ListenerArnSelector | ||
ListenerARN *string `json:"listenerArn,omitempty"` | ||
|
||
// ListenerArnRef is a reference to an ARN used to set | ||
// the ListenerArn. | ||
// +optional | ||
ListenerArnRef *xpv1.Reference `json:"listenerArnRef,omitempty"` | ||
|
||
// ListenerArnSelector selects references to Listener used | ||
// to set the Arn. | ||
// +optional | ||
ListenerArnSelector *xpv1.Selector `json:"listenerArnSelector,omitempty"` | ||
} | ||
|
||
// CustomListenerParameters contains the additional fields for ListenerParameters | ||
type CustomListenerParameters struct { | ||
// AcceleratorArn is the ARN for the Accelerator. | ||
// +immutable | ||
// +crossplane:generate:reference:type=Accelerator | ||
// +crossplane:generate:reference:extractor=AcceleratorARN() | ||
// +crossplane:generate:reference:refFieldName=AcceleratorArnRef | ||
// +crossplane:generate:reference:selectorFieldName=AcceleratorArnSelector | ||
AcceleratorArn *string `json:"acceleratorArn,omitempty"` | ||
|
||
// AcceleratorArnRef is a reference to an ARN used to set | ||
// the AcceleratorArn. | ||
// +optional | ||
AcceleratorArnRef *xpv1.Reference `json:"acceleratorArnRef,omitempty"` | ||
|
||
// AcceleratorArnSelector selects references to Accelerator used | ||
// to set the Arn. | ||
// +optional | ||
AcceleratorArnSelector *xpv1.Selector `json:"acceleratorArnSelector,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
"github.com/crossplane/crossplane-runtime/pkg/reference" | ||
"github.com/crossplane/crossplane-runtime/pkg/resource" | ||
"k8s.io/utils/pointer" | ||
) | ||
|
||
// AcceleratorARN returns the status.atProvider.ARN of an Accelerator | ||
func AcceleratorARN() reference.ExtractValueFn { | ||
return func(mg resource.Managed) string { | ||
r, ok := mg.(*Accelerator) | ||
if !ok { | ||
return "" | ||
} | ||
|
||
return pointer.StringDeref(r.Status.AtProvider.AcceleratorARN, "") | ||
} | ||
} | ||
|
||
// ListenerARN returns the status.atProvider.ARN of an Listener | ||
func ListenerARN() reference.ExtractValueFn { | ||
return func(mg resource.Managed) string { | ||
r, ok := mg.(*Listener) | ||
if !ok { | ||
return "" | ||
} | ||
|
||
return pointer.StringDeref(r.Status.AtProvider.ListenerARN, "") | ||
} | ||
} |
Oops, something went wrong.