Skip to content

v0.34.0

Latest

Choose a tag to compare

@github-actions github-actions released this 01 Dec 10:03
· 14 commits to main since this release
v0.34.0
2c465c7

Changes by Kind

Chore

API Change

  • Add APIIdentity tracking (#4488, @mjudeikis)
  • Add Identity rotation api objects (#4386, @mjudeikis)
  • Add shard soft/hard limits (#4378, @mjudeikis)
  • Add support for gracefully cancelling in-progress logical cluster migrations by deleting the LogicalClusterMigration object, cleaning up destination data, and restoring the logical cluster on its origin shard. (#4465, @olamilekan000)
  • Add the Admin workspace: every shard serves /services/admin with an aggregated read-only view of all Shards (requires system:kcp:admin). The kubectl ws plugin exposes it as :admin.
    SDK testing helpers WorkspaceShard/WorkspaceShardOrDie now take a *rest.Config and resolve shards through the Admin workspace.
    The "name" label on Shard objects is always the shard name and can't be overridden via --shard-labels. (#4365, @mjudeikis)
  • Add the apis.kcp.io/GlobalValidatingWebhook admission plugin: a single ValidatingWebhookConfiguration, passed to the shard via the newly exposed --admission-control-config-file flag, is applied to requests in every logical cluster. The reviewed object carries the request's logical cluster name on the kcp.io/cluster annotation for the duration of the callout. (#4288, @mjudeikis)
  • Allocate some goroutines per logical cluster only if the relevant objects, such as ResourceQuotas, policies or webhook configurations, exist in the logical cluster. Do not build a new admission plugin per admission request. (#4532, @neolit123)
  • Allow api-syncagent to set its related-resources.syncagent.kcp.io/ annotations on synced objects again. (#4553, @ifdotpy)
  • Allow cordoning of shards via admin virtual workspace (#4371, @mjudeikis)
  • Allow users to set the api-syncagent syncagent.kcp.io/deletion-propagation-policy annotation on synced objects again. (#4561, @callum-stakater)
  • Consolidate cluster annotation handlers (#4443, @mjudeikis)
  • Disconnect active wildcard watches on origin and destination shards during logical cluster migration so migration copy and cleanup operations do not emit spurious watch events. (#4421, @olamilekan000)
  • Fix APIBinding admission dropping schema-defaulted permission claim fields, which bumped metadata.generation on every update and caused controller hot loops. (#4586, @mjudeikis)
  • Fix logical cluster migration when encryption at rest is enabled by decrypting values on the origin shard and re-encrypting them with the destination shard's transformers. (#4464, @olamilekan000)
  • Gate ClusterCachedResourceEndpointSlice behind "bind" when trying to use ClusterCachedResource (#4523, @mjudeikis)
  • If the user cannot bind to the default API Bindings present on a WorkspaceType, prevent the user from being able to create a Workspace object of that type. (#4311, @neolit123)
  • Implement apiexport identity rotation (#4436, @mjudeikis)
  • Move FrontProxy to use APIIdentities to resolve core identities so decouping it from root shard. (#4493, @mjudeikis)
  • Non-root shards and standalone virtual workspace servers no longer connect to the root shard. They read the identities of the core APIExports from the cache server, so they can start and restart while the root shard is down. The --root-shard-kubeconfig-file flag of kcp start is deprecated and ignored, and can be dropped from shard deployments. --cache-kubeconfig remains required on non-root shards. (#4496, @mjudeikis)
  • Preserve etcd lease TTLs (e.g. for events) when migrating a logical cluster to another shard. (#4423, @tolgayakar)
  • VWs can now handle subresources other than status of core APIs such as TokenRequest for ServiceAccount (#4342, @ntnn)
  • Validate migrated etcd data via paginated SHA-256 digests (LogicalClusterDigest) in a new Verifying phase before completing logical cluster migration, automatically rolling back on mismatch. (#4548, @olamilekan000)

Feature

  • Add --shard-peer-kubeconfig and make front-proxy to auto-discover shard using admin virtual workspace (#4373, @mjudeikis)
  • Add controller retry on apibinding resource dynamic informer (#4376, @mjudeikis)
  • Add support for processing proto.Reference extensions in virtual-workspace-framework. In addition to the general support, introduce logic that handles x-kubernetes-preserve-unknown-fields marker for OpenAPI _ref values. (#4437, @vitanovs)
  • LogicalClusterMigration objects now get a finalizer that prevents their deletion while the migration is in progress. (#4415, @Sarthak-Shreshtha01)
  • Move shard registration out of the root workspace (#4374, @mjudeikis)
  • Reduce kcp shard memory per object for ConfigMaps, Secrets and other CRDs by dropping managedFields from caches. (#4528, @neolit123)
  • Reduce the kcp memory usage per workspace, by introducing a client cache only for the API groups in use, instead of a caching the entire k8s clientset per workspace. (#4526, @neolit123)
  • The front-proxy proxy_request_duration_seconds metric now has a shard label. (#4516, @AuricX)

Bug or Regression

  • Adjust label handling for apibinding deletes (#4424, @mjudeikis)

  • Fix ClusterCachedResource replication stopping after leader election loss or CRD recreation while status stayed Ready. (#4552, @nfarhadian)

  • Fix kubectl kcp bind apiexport --accept-all-permission-claims and --reject-all-permission-claims dropping the identity hash of permission claims on resources from other APIExports. (#4545, @RaphaelFakhri)

  • Fix a panic in the CRD cleanup controller when a deletion event arrives wrapped in a cache tombstone. (#4430, @olamilekan000)

  • Fix potential panics in APIBinding and APIExport controllers by unwrapping deletion tombstones before handling delete events. (#4434, @olamilekan000)

  • Fix the PartitionSet controller endlessly deleting and recreating Partitions when a dimension is also part of the shard selector matchLabels. (#4550, @officialasishkumar)

  • Fixed a bug where bound CRDs were not reliably sorted first in the OpenAPI v3 service cache's internal ordering, which could affect cache-key stability and the merge order of bound vs. local specs. (#4452, @Sarthak-Shreshtha01)

  • Fixed logical cluster migrations stalling when migrating back to a previously used shard due to a stale cancelled context. (#4418, @tolgayakar)

  • IMPORTANT: The authorization chain has been restructured - it was possible to bypass checks for vital kcp functions via the authorization webhook. This has been remediated. Normal operation should be unaffected.

    BREAKING: When a MaximalPermissionPolicy applies and does not allow a request, the MaximalPermissionPolicy authorizer now returns Deny instead of NoOpinion. Later authorizers, including the webhook, can no longer allow such a request.

    BREAKING: --authorization-order now only selects and orders RBAC and Webhook (default RBAC,Webhook). AlwaysAllowGroups and AlwaysAllowPaths always run first. They can no longer be reordered, and leaving them out of the flag no longer disables them. Both names are still accepted in the flag, but they are ignored and will be removed in a future release. Use --authorization-always-allow-paths to control which paths are always allowed.

    The synthetic system:kcp:initializer:* and system:kcp:terminator:* groups only grant access if they name an initializer or terminator registered in the LogicalCluster's status, and the cluster is in the matching phase.

    The logical cluster admin identities (system:kcp:logical-cluster-admin and the external variant) skip authorization only for requests the bootstrap policy allows. Access they get through workspace-local or global RBAC now goes through the regular workspace access checks.

    BREAKING: Authorizer names in audit annotations have changed. The authorizers have been sorted into four group: bypass, pregate, grant and `gate. Each authorizer is annotated with its group as prefix. The numbering has been removed.

    01-requiredgroups → gate-requiredgroups
    02-content → grant-content
    03-systemcrd → gate-systemcrd
    04-maxpermissionpolicy → gate-maxpermissionpolicy
    05-bootstrap, 05-local, 05-global → grant-bootstrap, grant-local, grant-global

    New names: grant-webhook, pregate-existence, bypass-logicalclustermanagement. Update any audit log tooling that matches on the old names. (#4507, @ntnn)

  • Improve APIBinding controller failure handling (#4439, @mjudeikis)

  • Optimize logical cluster migration dumps to scan only the target logical cluster's etcd key ranges instead of reading unrelated workspaces across the shard. (#4476, @olamilekan000)

  • Return NotFound to WatchList clients when a shard does not serve the resource (#4384, @waldemar-kindler)

  • The front-proxy now routes virtual workspace requests whose path holds a segment named "clusters" before the target cluster, such as a CachedResource or APIExport named "clusters", instead of rejecting them with 403. (#4468, @waldemar-kindler)

Other (Cleanup or Flake)

  • Authentication/impersonation helper pkg has been moved from pkg to virtual-workspace-framework (#4560, @SimonTheLeg)
  • BREAKING: The virtual-workspace-framework now requires at least one mux pattern to be set instead of parsing request URLs by hand (#4543, @ntnn)
  • Cleanup false -possitive errors logging (#4538, @mjudeikis)

Dependencies

Added
  • github.com/aclements/go-moremath: f10218a
  • github.com/go-openapi/swag/pools: v0.27.1
  • github.com/google/cadvisor/lib: v0.60.5
  • github.com/google/nftables: v0.3.0
  • github.com/mdlayher/netlink: v1.11.2
  • github.com/mdlayher/socket: v0.6.1
  • golang.org/x/perf: 2f7363a
  • tags.cncf.io/container-device-interface/specs-go: v1.1.0
Changed
Removed
  • github.com/cenkalti/backoff/v4: v4.3.0
  • github.com/containerd/errdefs: v1.0.0
  • github.com/containerd/errdefs/pkg: v0.3.0
  • github.com/containerd/typeurl/v2: v2.2.3
  • github.com/euank/go-kmsg-parser: v2.0.0
  • github.com/go-openapi/swag/jsonname: v0.26.0
  • github.com/golang/groupcache: 41bb18b
  • github.com/google/cadvisor: v0.56.2
  • github.com/grpc-ecosystem/go-grpc-middleware: v1.3.0
  • github.com/kisielk/errcheck: v1.5.0
  • github.com/kisielk/gotool: v1.0.0
  • github.com/mistifyio/go-zfs: f784269