-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create AccessLogPolicy CRD #420
Conversation
…oute reconciler info logs, remove use of struct embedding in logs
Pull Request Test Coverage Report for Build 6399132954
💛 - Coveralls |
listKind: AccessLogPolicyList | ||
plural: accesslogpolicies | ||
shortNames: | ||
- tgp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to fix this, btw this field is used for kubectl get tgp
, etc as a shorthand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed next commit, thanks for catching this!
|
||
// +genclient | ||
// +kubebuilder:object:root=true | ||
// +kubebuilder:resource:categories=gateway-api,shortName=tgp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shortName=alp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed next commit, thanks for catching this!
// | ||
// Changes to this value results in replacement of the VPC Lattice Access Log Subscription. | ||
// +optional | ||
DestinationArn *string `json:"protocol,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be json:"destinationarn,omitempty"
do we need add arn format validation logic in the accesslogpolicy_types.go
(by +kubebuilder:validation:Pattern=)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set to destinationArn (camelCase) next commit.
Also added the format validation logic so that it matches the pattern used in the VPC Lattice API (Pattern=^arn(:[a-z0-9]+([.-][a-z0-9]+)*){2}(:([a-z0-9]+([.-][a-z0-9]+)*)?){2}:([^/].*)?
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @solmonk @mikhail-aws please take a look if you have a time
@@ -0,0 +1,95 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we duplicate crd and template to helm? may be there is a difference that I couldn't spot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this is how we did it with previous CRD additions, such as https://github.com/aws/aws-application-networking-k8s/pull/339/files
Added the status subresource, which was previously missing. This is required as part of the Policy definition in Gateway API https://gateway-api.sigs.k8s.io/geps/gep-713/#on-policy-objects |
What type of PR is this?
Feature
Which issue does this PR fix:
#200 partially
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:
Testing done on this change:
N/A
Automation added to e2e:
N/A
Will this PR introduce any new dependencies?:
No
Will this break upgrades or downgrades. Has updating a running cluster been tested?:
New CRD can be applied, but is not used by controller yet.
To apply new CRD, run
kubectl apply -f config/crds/bases/application-networking.k8s.aws_accesslogpolicies.yaml
Does this PR introduce any user-facing change?:
No
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.