Skip to content
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

Add AuthStatus to OIDC identity providing resources #7287

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ spec:
uid:
description: UID is used to understand the origin of the subscriber.
type: string
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
additionalPrinterColumns:
- name: URL
type: string
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/apiserversource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,13 @@ spec:
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
ceAttributes:
description: CloudEventAttributes are the specific attributes that the Source uses as part of its CloudEvents.
type: array
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/channel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ spec:
uid:
description: UID is used to understand the origin of the subscriber.
type: string
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
names:
kind: Channel
plural: channels
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/containersource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ spec:
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
ceAttributes:
description: CloudEventAttributes are the specific attributes that the Source uses as part of its CloudEvents.
type: array
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/parallel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ spec:
just the reconciler conveying richer information outwards.
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
branchStatuses:
description: BranchStatuses is an array of corresponding to branch
statuses. Matches the Spec.Branches array in the order.
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/pingsource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ spec:
just the reconciler conveying richer information outwards.'
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
ceAttributes:
description: 'CloudEventAttributes are the specific attributes that
the Source uses as part of its CloudEvents.'
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/sequence.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ spec:
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
channelStatuses:
description: ChannelStatuses is an array of corresponding Channel statuses. Matches the Spec.Steps array in the order.
type: array
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/sinkbindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ spec:
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
ceAttributes:
description: CloudEventAttributes are the specific attributes that the Source uses as part of its CloudEvents.
type: array
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ spec:
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
conditions:
description: Conditions the latest available observations of a resource's current state.
type: array
Expand Down
7 changes: 7 additions & 0 deletions config/core/resources/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ spec:
description: Annotations is additional Status fields for the Resource to save some additional State as well as convey more information to the user. This is roughly akin to Annotations on any k8s resource, just the reconciler conveying richer information outwards.
type: object
x-kubernetes-preserve-unknown-fields: true
auth:
description: Auth provides the relevant information for OIDC authentication.
type: object
properties:
serviceAccountName:
description: ServiceAccountName is the name of the generated service account used for this components OIDC authentication.
type: string
conditions:
description: Conditions the latest available observations of a resource's current state.
type: array
Expand Down
70 changes: 70 additions & 0 deletions docs/eventing-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,20 @@ string
<p>A human readable message indicating details of Ready status.</p>
</td>
</tr>
<tr>
<td>
<code>auth</code><br/>
<em>
<a href="https://pkg.go.dev/knative.dev/pkg/apis/duck/v1#AuthStatus">
knative.dev/pkg/apis/duck/v1.AuthStatus
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Auth provides the relevant information for OIDC authentication.</p>
</td>
</tr>
</tbody>
</table>
<hr/>
Expand Down Expand Up @@ -2375,6 +2389,20 @@ DeliveryStatus
resolved delivery options.</p>
</td>
</tr>
<tr>
<td>
<code>auth</code><br/>
<em>
<a href="https://pkg.go.dev/knative.dev/pkg/apis/duck/v1#AuthStatus">
knative.dev/pkg/apis/duck/v1.AuthStatus
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Auth provides the relevant information for OIDC authentication.</p>
</td>
</tr>
</tbody>
</table>
<hr/>
Expand Down Expand Up @@ -3459,6 +3487,20 @@ will target the first subscriber.
It generally has the form {channel}.{namespace}.svc.{cluster domain name}</p>
</td>
</tr>
<tr>
<td>
<code>auth</code><br/>
<em>
<a href="https://pkg.go.dev/knative.dev/pkg/apis/duck/v1#AuthStatus">
knative.dev/pkg/apis/duck/v1.AuthStatus
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Auth provides the relevant information for OIDC authentication.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="flows.knative.dev/v1.ParallelSubscriptionStatus">ParallelSubscriptionStatus
Expand Down Expand Up @@ -3793,6 +3835,20 @@ will target the first subscriber.
It generally has the form {channel}.{namespace}.svc.{cluster domain name}</p>
</td>
</tr>
<tr>
<td>
<code>auth</code><br/>
<em>
<a href="https://pkg.go.dev/knative.dev/pkg/apis/duck/v1#AuthStatus">
knative.dev/pkg/apis/duck/v1.AuthStatus
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Auth provides the relevant information for OIDC authentication.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="flows.knative.dev/v1.SequenceStep">SequenceStep
Expand Down Expand Up @@ -4614,6 +4670,20 @@ SubscriptionStatusPhysicalSubscription
<p>PhysicalSubscription is the fully resolved values that this Subscription represents.</p>
</td>
</tr>
<tr>
<td>
<code>auth</code><br/>
<em>
<a href="https://pkg.go.dev/knative.dev/pkg/apis/duck/v1#AuthStatus">
knative.dev/pkg/apis/duck/v1.AuthStatus
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Auth provides the relevant information for OIDC authentication.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="messaging.knative.dev/v1.SubscriptionStatusPhysicalSubscription">SubscriptionStatusPhysicalSubscription
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/duck/v1/subscribable_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
"k8s.io/apimachinery/pkg/types"
"knative.dev/pkg/apis"
"knative.dev/pkg/apis/duck"

duckv1 "knative.dev/pkg/apis/duck/v1"
)

// +genduck
Expand Down Expand Up @@ -80,6 +82,9 @@ type SubscriberStatus struct {
// A human readable message indicating details of Ready status.
// +optional
Message string `json:"message,omitempty"`
// Auth provides the relevant information for OIDC authentication.
// +optional
Auth *duckv1.AuthStatus `json:"auth,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
9 changes: 8 additions & 1 deletion pkg/apis/duck/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/apis/eventing/v1/trigger_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ type TriggerStatus struct {
// DeliveryStatus contains a resolved URL to the dead letter sink address, and any other
// resolved delivery options.
eventingduckv1.DeliveryStatus `json:",inline"`

// Auth provides the relevant information for OIDC authentication.
// +optional
Auth *duckv1.AuthStatus `json:"auth,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/eventing/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/apis/flows/v1/parallel_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ type ParallelStatus struct {
// will target the first subscriber.
// It generally has the form {channel}.{namespace}.svc.{cluster domain name}
duckv1.AddressStatus `json:",inline"`

// Auth provides the relevant information for OIDC authentication.
// +optional
Auth *duckv1.AuthStatus `json:"auth,omitempty"`
}

// ParallelBranchStatus represents the current state of a Parallel branch
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/flows/v1/sequence_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ type SequenceStatus struct {
// It generally has the form {channel}.{namespace}.svc.{cluster domain name}
// +optional
Address duckv1.Addressable `json:"address,omitempty"`

// Auth provides the relevant information for OIDC authentication.
// +optional
Auth *duckv1.AuthStatus `json:"auth,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
10 changes: 10 additions & 0 deletions pkg/apis/flows/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions pkg/apis/messaging/v1/subscription_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ type SubscriptionStatus struct {

// PhysicalSubscription is the fully resolved values that this Subscription represents.
PhysicalSubscription SubscriptionStatusPhysicalSubscription `json:"physicalSubscription,omitempty"`

// Auth provides the relevant information for OIDC authentication.
// +optional
Auth *duckv1.AuthStatus `json:"auth,omitempty"`
}

// SubscriptionStatusPhysicalSubscription represents the fully resolved values for this
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/messaging/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.