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 AppliedEventPoliciesStatus type #7975

Closed
creydr opened this issue Jun 10, 2024 · 2 comments · Fixed by #7999
Closed

Add AppliedEventPoliciesStatus type #7975

creydr opened this issue Jun 10, 2024 · 2 comments · Fixed by #7999
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Issues which should be fixed (post-triage)

Comments

@creydr
Copy link
Member

creydr commented Jun 10, 2024

As the Eventing Authorization feature track describes, targeting resources which implement the EventPolicy capabilities, display in their status the EventPolicies which apply to them, as shown in the following example:

apiVersion: eventing.knative.dev/v1
kind: Broker
metadata:
  name: my-broker
spec:
  ...
status:
  ...
  policies:
    - name: event-policy
      apiVersion: v1alpha1
    - name: another-event-policy
      apiVersion: v1alpha1

  conditions:
    ...

Therefor we need to add the AppliedEventPoliciesStatus type, which allows implementing resources to reflect this in their status:

type AppliedEventPoliciesStatus struct {
	Policies []AppliedEventPoliciesStatusPolicy `json:"policies,omitempty"`
}

type AppliedEventPoliciesStatusPolicy struct {
	APIVersion string `json:"apiVersion"`
	Name       string `json:"name"`
}

We should also update the following types and their CRDs to include this in their .status.policies :

Additional hints for new contributors before starting with this issue:

  1. When the issue has the Draft status, the issue is subject to change and thus should not be started to be worked on
  2. Make sure you've read and understood the CONTRIBUTING.md guidelines
  3. Make sure you're able to run Knative Eventing locally and run at least the unit tests.
  4. When you feel comfortable with this issue, feel free to assign it to you (e.g. by commenting /assign) and ask any question you have. Please be aware that we might unassign you, if we don't see any progress from your side to give other contributors also a chance to work on this issue.
@creydr creydr added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Jun 10, 2024
@pierDipi
Copy link
Member

should EventTypeStatusListPolicies be singular ?

@creydr creydr changed the title Add EventTypeStatusList type Add AppliedEventPoliciesStatus type Jun 12, 2024
@creydr
Copy link
Member Author

creydr commented Jun 12, 2024

should EventTypeStatusListPolicies be singular ?

👍
Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. triage/accepted Issues which should be fixed (post-triage)
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants