Repository navigation
[1- De-Rooting] Add APIIdentity #4488
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
Merged
+4,554
−266
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
154d532
Add APIIdentity
mjudeikis 5f5b885
Add e2e and holders logic
mjudeikis a8b0d9c
add print col
mjudeikis f6ecc75
Add graceperiod and labels
mjudeikis 8b2cb5c
rename labels
mjudeikis 6414488
Rework identity to be virtual/projected resource
mjudeikis 5705018
lint
mjudeikis a055545
Fix racy test
mjudeikis e369b2c
Add readiness checks and few nits
mjudeikis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| controller-gen.kubebuilder.io/version: v0.17.3 | ||
| name: apiidentities.admin.kcp.io | ||
| spec: | ||
| group: admin.kcp.io | ||
| names: | ||
| categories: | ||
| - kcp | ||
| kind: APIIdentity | ||
| listKind: APIIdentityList | ||
| plural: apiidentities | ||
| singular: apiidentity | ||
| scope: Cluster | ||
| versions: | ||
| - additionalPrinterColumns: | ||
| - description: APIExport owning the identity | ||
| jsonPath: .status.owner.name | ||
| name: Owner | ||
| type: string | ||
| - description: Logical cluster of the owner | ||
| jsonPath: .status.owner.cluster | ||
| name: Cluster | ||
| type: string | ||
| - description: Identity of a core APIExport in root | ||
| jsonPath: .status.core | ||
| name: Core | ||
| type: boolean | ||
| - description: True while other APIExports hold the identity | ||
| jsonPath: .status.conditions[?(@.type=="Shared")].status | ||
| name: Shared | ||
| priority: 1 | ||
| type: string | ||
| - jsonPath: .metadata.creationTimestamp | ||
| name: Age | ||
| type: date | ||
| name: v1alpha1 | ||
| schema: | ||
| openAPIV3Schema: | ||
| description: |- | ||
| APIIdentity is the view of one API identity: which APIExport owns it and | ||
| which other APIExports hold it. It is computed from the APIExports of the | ||
| installation and not stored anywhere; there is one per identity, named | ||
| after the identity value, served read-only through the Admin workspace. | ||
| properties: | ||
| apiVersion: | ||
| description: |- | ||
| APIVersion defines the versioned schema of this representation of an object. | ||
| Servers should convert recognized schemas to the latest internal value, and | ||
| may reject unrecognized values. | ||
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
| type: string | ||
| kind: | ||
| description: |- | ||
| Kind is a string value representing the REST resource this object represents. | ||
| Servers may infer this from the endpoint the client submits requests to. | ||
| Cannot be updated. | ||
| In CamelCase. | ||
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds | ||
| type: string | ||
| metadata: | ||
| type: object | ||
| status: | ||
| description: |- | ||
| APIIdentityStatus is the derived state of an identity. The object has no | ||
| spec: nothing about it is user intent. | ||
| properties: | ||
| conditions: | ||
| description: conditions is a list of conditions that apply to the | ||
| identity. | ||
| items: | ||
| description: Condition defines an observation of a object operational | ||
| state. | ||
| properties: | ||
| lastTransitionTime: | ||
| description: |- | ||
| Last time the condition transitioned from one status to another. | ||
| This should be when the underlying condition changed. If that is not known, then using the time when | ||
| the API field changed is acceptable. | ||
| format: date-time | ||
| type: string | ||
| message: | ||
| description: |- | ||
| A human readable message indicating details about the transition. | ||
| This field may be empty. | ||
| type: string | ||
| reason: | ||
| description: |- | ||
| The reason for the condition's last transition in CamelCase. | ||
| The specific API may choose whether or not this field is considered a guaranteed API. | ||
| This field may not be empty. | ||
| type: string | ||
| severity: | ||
| description: |- | ||
| Severity provides an explicit classification of Reason code, so the users or machines can immediately | ||
| understand the current situation and act accordingly. | ||
| The Severity field MUST be set only when Status=False. | ||
| type: string | ||
| status: | ||
| description: Status of the condition, one of True, False, Unknown. | ||
| type: string | ||
| type: | ||
| description: |- | ||
| Type of condition in CamelCase or in foo.example.com/CamelCase. | ||
| Many .condition.type values are consistent across resources like Available, but because arbitrary conditions | ||
| can be useful (see .node.status.conditions), the ability to deconflict is important. | ||
| type: string | ||
| required: | ||
| - lastTransitionTime | ||
| - status | ||
| - type | ||
| type: object | ||
| type: array | ||
| core: | ||
| description: |- | ||
| core is true for the identities of the core APIExports in the root | ||
| workspace, which every shard needs before it can serve. | ||
| type: boolean | ||
| holders: | ||
| description: |- | ||
| holders lists the APIExports, other than the owner, that serve the | ||
| identity: those whose identity secret carries the same key, oldest | ||
| first. | ||
| items: | ||
| description: Holder is an APIExport, other than the owner, that | ||
| serves the identity. | ||
| properties: | ||
| cluster: | ||
| description: cluster is the logical cluster name hosting the | ||
| APIExport. | ||
| minLength: 1 | ||
| type: string | ||
| name: | ||
| description: name is the name of the APIExport. | ||
| minLength: 1 | ||
| type: string | ||
| since: | ||
| description: since is when the holder was created. | ||
| format: date-time | ||
| type: string | ||
| uid: | ||
| description: |- | ||
| uid is the UID of the APIExport, so that an export deleted and | ||
| recreated under the same name can be told apart from the original. | ||
| type: string | ||
| required: | ||
| - cluster | ||
| - name | ||
| type: object | ||
| type: array | ||
| x-kubernetes-list-map-keys: | ||
| - cluster | ||
| - name | ||
| x-kubernetes-list-type: map | ||
| owner: | ||
| description: |- | ||
| owner is the APIExport that holds the identity authoritatively: the | ||
| oldest one holding it. When it is deleted the oldest holder succeeds | ||
| it; an identity no APIExport holds any more has no entry. | ||
| properties: | ||
| cluster: | ||
| description: cluster is the logical cluster name hosting the APIExport. | ||
| minLength: 1 | ||
| type: string | ||
| name: | ||
| description: name is the name of the APIExport. | ||
| minLength: 1 | ||
| type: string | ||
| uid: | ||
| description: |- | ||
| uid is the UID of the APIExport, so that an export deleted and | ||
| recreated under the same name can be told apart from the original. | ||
| type: string | ||
| required: | ||
| - cluster | ||
| - name | ||
| type: object | ||
| required: | ||
| - owner | ||
| type: object | ||
| type: object | ||
| served: true | ||
| storage: true | ||
| subresources: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.