-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate APIs for Kubernetes 1.32 et al (#19)
* chore: Deduplicate knownOpts into new file * Regenerate APIs from Kubernetes 1.32.0 et al * Update JSR imports * Update README for 0.5.4 * fix readme typo
- Loading branch information
Showing
33 changed files
with
3,774 additions
and
3,076 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#!/bin/sh -eux | ||
|
||
# https://github.com/kubernetes/kubernetes/releases | ||
./generation/sources/builtin.sh v1.30.4 | ||
./generation/sources/builtin.sh v1.32.0 | ||
|
||
# https://github.com/argoproj/argo-cd/releases | ||
./generation/sources/argo-cd.sh v2.12.3 | ||
./generation/sources/argo-cd.sh v2.13.3 | ||
|
||
# https://github.com/cert-manager/cert-manager/releases | ||
./generation/sources/cert-manager.sh v1.15.3 | ||
./generation/sources/cert-manager.sh v1.16.2 | ||
|
||
# https://github.com/kubernetes-sigs/external-dns/releases | ||
./generation/sources/external-dns.sh v0.15.0 | ||
./generation/sources/external-dns.sh v0.15.1 | ||
|
||
# https://github.com/kubernetes/autoscaler/releases?q=vertical | ||
./generation/sources/vpa.sh 1.2.1 |
This file contains 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,21 @@ | ||
|
||
export const knownOptsForward = { | ||
GetListOpts: 'continue,fieldSelector,labelSelector,limit,resourceVersion,resourceVersionMatch,sendInitialEvents,timeoutSeconds', | ||
WatchListOpts: 'allowWatchBookmarks,fieldSelector,labelSelector,resourceVersion,resourceVersionMatch,sendInitialEvents,timeoutSeconds', | ||
PutOpts: 'dryRun,fieldManager,fieldValidation', // both CreateOpts and ReplaceOpts | ||
DeleteListOpts: 'continue,dryRun,fieldSelector,gracePeriodSeconds,ignoreStoreReadErrorWithClusterBreakingPotential,labelSelector,limit,orphanDependents,propagationPolicy,resourceVersion,resourceVersionMatch,sendInitialEvents,timeoutSeconds', | ||
PatchOpts: 'dryRun,fieldManager,fieldValidation,force', | ||
GetOpts: '', | ||
DeleteOpts: 'dryRun,gracePeriodSeconds,ignoreStoreReadErrorWithClusterBreakingPotential,orphanDependents,propagationPolicy', | ||
}; | ||
|
||
export const knownOptsReverse: Record<string,string|undefined> = { | ||
'': 'NoOpts', | ||
[knownOptsForward.GetListOpts]: 'GetListOpts', | ||
[knownOptsForward.WatchListOpts]: 'WatchListOpts', | ||
[knownOptsForward.PutOpts]: 'PutOpts', // both CreateOpts and ReplaceOpts | ||
[knownOptsForward.DeleteListOpts]: 'DeleteListOpts', | ||
[knownOptsForward.PatchOpts]: 'PatchOpts', | ||
'exact,export': 'GetOpts', | ||
[knownOptsForward.DeleteOpts]: 'DeleteOpts', | ||
}; |
This file contains 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 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 |
---|---|---|
|
@@ -14,7 +14,7 @@ Here's a basic request, listing all Pods in the `default` namespace. | |
It uses the `autoDetectClient()` entrypoint which returns the first usable client. | ||
|
||
```ts | ||
import { autoDetectClient } from 'https://deno.land/x/[email protected].0/mod.ts'; | ||
import { autoDetectClient } from 'https://deno.land/x/[email protected].3/mod.ts'; | ||
import { CoreV1Api } from 'https://deno.land/x/kubernetes_apis/builtin/core@v1/mod.ts'; | ||
|
||
const kubernetes = await autoDetectClient(); | ||
|
@@ -30,8 +30,31 @@ When running locally (with `kubectl` set up), you probably just to add `--allow- | |
For a container being deployed onto a cluster, there's more flags to provide instead; | ||
see `/x/kubernetes_client` for more information. | ||
|
||
|
||
### Usage with JSR Imports | ||
Note that there is no default export, so you will need to | ||
import the particular Kubernetes API groups that you want to work with. | ||
This layout keeps program size smaller. | ||
|
||
```ts | ||
import { autoDetectClient } from "jsr:@cloudydeno/[email protected]"; | ||
import { CoreV1Api } from "jsr:@cloudydeno/kubernetes-apis/core/v1"; | ||
|
||
const kubernetes = await autoDetectClient(); | ||
const coreApi = new CoreV1Api(kubernetes).namespace("default"); | ||
|
||
const podList = await coreApi.getPodList(); | ||
console.log(podList); | ||
``` | ||
|
||
## Changelog | ||
|
||
* `v0.5.4` on `2025-01-18`: | ||
* Includes 'builtin' APIs generated from K8s `v1.32.0`. | ||
* Several API versions were changed, removed, or added. | ||
* You may need to update imports if you used a non-stable API version which has been moved. | ||
* `cert-manager` and `argo-cd` CRDs have been updated. | ||
|
||
* `v0.5.3` on `2024-10-16`: | ||
* Fix CRD codegen issues with particular definitions and when using JSR import paths. | ||
|
||
|
Oops, something went wrong.