Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

RFC: Add announcements package & mesage handler #1957

Merged
merged 3 commits into from
Oct 29, 2020

Conversation

draychev
Copy link
Contributor

This PR adds the skeleton of a new package pkg/announcements. This package is intended to contain the types for the messages that will be passed around via the announcement system OSM employs.

In this PR we also include an example of how this may be used: every announcement interface{} is examined / type asserted to see if it is Announcement{}. When it is - it is passed to a handler, which could further examine the properties of the message and do something specific.

The first use case for this more specific messaging system would be #1719, where we need to react to Pod Deletion events and clean-up relevant certificates.

For more context on how this could be used - see draft PR here: #1956


Affected area:

  • New Functionality [ ]
  • Documentation [ ]
  • Install [ ]
  • Control Plane [ ]
  • CLI Tool [ ]
  • Certificate Management [ ]
  • Networking [ ]
  • Metrics [ ]
  • SMI Policy [ ]
  • Security [ ]
  • Tests [ ]
  • CI System [ ]
  • Performance [ ]
  • Other [ ]

Please answer the following questions with yes/no.

  • Does this change contain code from or inspired by another project? If so, did you notify the maintainers and provide attribution?

@draychev draychev requested a review from a team as a code owner October 29, 2020 01:55
@codecov-io
Copy link

Codecov Report

Merging #1957 into main will decrease coverage by 0.02%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1957      +/-   ##
==========================================
- Coverage   58.45%   58.43%   -0.03%     
==========================================
  Files         131      131              
  Lines        5284     5288       +4     
==========================================
+ Hits         3089     3090       +1     
- Misses       2192     2195       +3     
  Partials        3        3              
Impacted Files Coverage Δ
pkg/catalog/repeater.go 70.83% <25.00%> (-9.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c340a7a...3825f23. Read the comment docs.

Copy link
Member

@shashankram shashankram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The announcements package could implement a pub-sub model if we decide to do so for #1914

@draychev draychev merged commit 41d787c into openservicemesh:main Oct 29, 2020
@draychev draychev deleted the add-announcements-package branch October 29, 2020 23:08
@draychev draychev linked an issue Jan 28, 2021 that may be closed by this pull request
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize announcement channels and XDS config push in osm-controller
4 participants