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 CRDB support #116

Draft
wants to merge 17 commits into
base: feature-logical-clusters-1.24
Choose a base branch
from

Commits on Apr 22, 2022

  1. pkg/storage/etcd3: correctly validate resourceVersions

    In a number of tests, the underlying storage backend interaction will
    return the revision (logical clock underpinning the MVCC implementation)
    at the call-time of the RPC. Previously, the tests validated that this
    returned revision was exactly equal to some previously seen revision.
    This assertion is only true in systems where no other events are
    advancing the logical clock. For instance, when using a single etcd
    cluster as a shared fixture for these tests, the assertion is not valid
    any longer. By checking that the returned revision is no older than the
    previously seen revision, the validation logic is correct in all cases.
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    4dc04fb View commit details
    Browse the repository at this point in the history
  2. storage/etcd3: clarify the pagingation flow in LIST

    It is not possible for the nil-check to ever return anything different
    from what the explicit boolean used to, but this is only something that
    a reader can come to the conclusion on if they very, very carefuly read
    the code. Instead of having this implicit flow that is difficult to
    follow, let's keep the boolean.
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    834667b View commit details
    Browse the repository at this point in the history
  3. apiserver/store: seed generic package with etcd3

    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    e07e932 View commit details
    Browse the repository at this point in the history
  4. storage/generic: move resuable tests into separate files

    In order to be able to import these tests in the future, we need them to
    not be in `_test.go` files.
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    cf74d45 View commit details
    Browse the repository at this point in the history
  5. storage/generic: update package name, chase imports

    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    d6e655f View commit details
    Browse the repository at this point in the history
  6. storage/generic: add a client interface and response types

    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    7c41794 View commit details
    Browse the repository at this point in the history
  7. storage/generic: adapt implementation to be generic

    The current etcd3 implementation is correct for any storage backend that
    allows clients to interact with the logcal clock timestamps used to
    drive MVCC semantics and provide a robust watching mechanism. This commit
    adapts the current implementation to use a generic interface (albeit this
    amount of genericism is small, few databases allow such control).
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    4b51b03 View commit details
    Browse the repository at this point in the history
  8. storage/etcd3: refactor to use generic store

    This commit isolates etcd3-specific logic into a driver/client, which
    can simply be used as the backing implementation for the generic store.
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    f140c97 View commit details
    Browse the repository at this point in the history
  9. storage/crdb: implement a CockroachDB-based backend

    CockroachDB allows clients to access the logical clock that underpins
    the MVCC implementation in the database. Furthermore, changefeeds allow
    users to efficently watch for changes to keys. These characteristics
    enable CRDB to be used as a backing store for k8s as they expose the
    same interaction mechanisms as etcd.
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    b4193b9 View commit details
    Browse the repository at this point in the history
  10. storage/crdb: add support for indices

    TODO:
    
    - there's a disagreement between caching indices (generic) and
      selectors, which can be fields or labels ... we need to reconcile this
    - for CRDs we'd need to plumb in CEL-based expressions to the current
      index support
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    b6fb555 View commit details
    Browse the repository at this point in the history
  11. test/integration: use a generic storage client

    It is likely better to use `store.Interface` in all cases, but that is a
    larger clean-up here. Especially the use of etcd compaction is extremely
    questionable at this level of abstraction - even the storage
    implementation does not use that part of the etcd API.
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    987377d View commit details
    Browse the repository at this point in the history
  12. *: update vendor

    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    05c4a1d View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2022

  1. hacks

    stevekuznetsov committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    5a801e7 View commit details
    Browse the repository at this point in the history
  2. Revert "storage/crdb: add support for indices"

    This reverts commit b6fb555.
    
    Signed-off-by: Steve Kuznetsov <[email protected]>
    stevekuznetsov committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    8e97916 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. Initial CRDB merge.

    Signed-off-by: andreyod <[email protected]>
    andreyod committed Nov 16, 2022
    Configuration menu
    Copy the full SHA
    e615371 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2022

  1. Fix unit test that fail before the crdb merge

    Fix conflicts in go.sum
    
    Signed-off-by: andreyod <[email protected]>
    andreyod authored and ezrasilvera committed Nov 29, 2022
    Configuration menu
    Copy the full SHA
    cdcf337 View commit details
    Browse the repository at this point in the history
  2. merge latest 1.24 code

    Signed-off-by: Ezra Silvera <[email protected]>
    ezrasilvera committed Nov 29, 2022
    Configuration menu
    Copy the full SHA
    634619c View commit details
    Browse the repository at this point in the history