From 27252a376b30805d0e7085ed882d0434a91d378e Mon Sep 17 00:00:00 2001 From: Abhijeet Gaurav <65087356+abhijeetgauravm@users.noreply.github.com> Date: Tue, 5 Sep 2023 20:14:17 +0530 Subject: [PATCH] Added Audience field in duckv1.Destination (#2797) * Added Audience field in duckv1.Destination * generated the DeepCopy functions to include the new field Signed-off-by: Abhijeet Gaurav * removed trailing whitespaces from both lines Signed-off-by: Abhijeet Gaurav --------- Signed-off-by: Abhijeet Gaurav --- apis/duck/v1/destination.go | 8 ++++++++ apis/duck/v1/zz_generated.deepcopy.go | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/apis/duck/v1/destination.go b/apis/duck/v1/destination.go index 8e067a99b..720d40677 100644 --- a/apis/duck/v1/destination.go +++ b/apis/duck/v1/destination.go @@ -40,6 +40,14 @@ type Destination struct { // by the Addressable target, if any. // +optional CACerts *string `json:"CACerts,omitempty"` + + // Audience is the OIDC audience. + // This need only be set, if the target is not an Addressable + // and thus the Audience can't be received from the Addressable itself. + // In case the Addressable specifies an Audience too, the Destinations + // Audience takes preference. + // +optional + Audience *string `json:"audience,omitempty"` } // Validate the Destination has all the necessary fields and check the diff --git a/apis/duck/v1/zz_generated.deepcopy.go b/apis/duck/v1/zz_generated.deepcopy.go index 61d9671eb..46cc83857 100644 --- a/apis/duck/v1/zz_generated.deepcopy.go +++ b/apis/duck/v1/zz_generated.deepcopy.go @@ -366,6 +366,11 @@ func (in *Destination) DeepCopyInto(out *Destination) { *out = new(string) **out = **in } + if in.Audience != nil { + in, out := &in.Audience, &out.Audience + *out = new(string) + **out = **in + } return }