Skip to content

Commit 39bc867

Browse files
authored
Regenerate clients from Kubernetes v1.30, etc (#10)
* Regenerate clients from Kubernetes v1.30, etc * Update available APIs * Update README * Update JSR package version
1 parent 3c127fc commit 39bc867

File tree

23 files changed

+2681
-256
lines changed

23 files changed

+2681
-256
lines changed

generation/generate-all.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/sh -eux
22

33
# https://github.com/kubernetes/kubernetes/releases
4-
./generation/sources/builtin.sh v1.28.0
4+
./generation/sources/builtin.sh v1.30.4
55

66
# https://github.com/argoproj/argo-cd/releases
7-
./generation/sources/argo-cd.sh v2.8.0
7+
./generation/sources/argo-cd.sh v2.12.3
88

99
# https://github.com/cert-manager/cert-manager/releases
10-
./generation/sources/cert-manager.sh v1.12.3
10+
./generation/sources/cert-manager.sh v1.15.3
1111

1212
# https://github.com/kubernetes-sigs/external-dns/releases
13-
./generation/sources/external-dns.sh v0.13.5
13+
./generation/sources/external-dns.sh v0.15.0
1414

1515
# https://github.com/kubernetes/autoscaler/releases?q=vertical
16-
./generation/sources/vpa.sh 0.14.0
16+
./generation/sources/vpa.sh 1.2.1

lib/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ see `/x/kubernetes_client` for more information.
3232

3333
## Changelog
3434

35+
* `v0.5.2` on `2024-09-28`:
36+
* Includes 'builtin' APIs generated from K8s `v1.30.4`.
37+
* New kinds `ValidatingAdmissionPolicy`, `ServiceCIDR`, `ResourceSlice`
38+
* Several API versions changed. You may need to update imports if you used one.
39+
* Further API changes are detailed in Github Releases.
40+
* `cert-manager`, `argo-cd`, `external-dns`, and `vpa` CRDs have been updated.
41+
3542
* `v0.5.1` on `2024-09-18`:
3643
* Updating `/x/kubernetes_client` API contract to `v0.7.3`.
3744
* Add [JSR publication](https://jsr.io/@cloudydeno/kubernetes-apis) of the module.

lib/argo-cd/argoproj.io@v1alpha1/structs.ts

+118-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ type ListOf<T> = {
77
items: Array<T>;
88
};
99

10-
/** Source overrides the source definition set in the application. This is typically set in a Rollback operation and is nil during a Sync operation */
10+
/** Source overrides the source definition set in the application.
11+
This is typically set in a Rollback operation and is nil during a Sync operation */
1112
export interface ApplicationSource {
1213
chart?: string | null;
1314
directory?: {
@@ -51,12 +52,28 @@ export interface ApplicationSource {
5152
commonAnnotations?: Record<string,string> | null;
5253
commonAnnotationsEnvsubst?: boolean | null;
5354
commonLabels?: Record<string,string> | null;
55+
components?: Array<string> | null;
5456
forceCommonAnnotations?: boolean | null;
5557
forceCommonLabels?: boolean | null;
5658
images?: Array<string> | null;
59+
labelWithoutSelector?: boolean | null;
5760
namePrefix?: string | null;
5861
nameSuffix?: string | null;
5962
namespace?: string | null;
63+
patches?: Array<{
64+
options?: Record<string,boolean> | null;
65+
patch?: string | null;
66+
path?: string | null;
67+
target?: {
68+
annotationSelector?: string | null;
69+
group?: string | null;
70+
kind?: string | null;
71+
labelSelector?: string | null;
72+
name?: string | null;
73+
namespace?: string | null;
74+
version?: string | null;
75+
} | null;
76+
}> | null;
6077
replicas?: Array<{
6178
count: c.IntOrString;
6279
name: string;
@@ -126,12 +143,15 @@ function toApplicationSource_kustomize(input: c.JSONValue) {
126143
commonAnnotations: c.readOpt(obj["commonAnnotations"], x => c.readMap(x, c.checkStr)),
127144
commonAnnotationsEnvsubst: c.readOpt(obj["commonAnnotationsEnvsubst"], c.checkBool),
128145
commonLabels: c.readOpt(obj["commonLabels"], x => c.readMap(x, c.checkStr)),
146+
components: c.readOpt(obj["components"], x => c.readList(x, c.checkStr)),
129147
forceCommonAnnotations: c.readOpt(obj["forceCommonAnnotations"], c.checkBool),
130148
forceCommonLabels: c.readOpt(obj["forceCommonLabels"], c.checkBool),
131149
images: c.readOpt(obj["images"], x => c.readList(x, c.checkStr)),
150+
labelWithoutSelector: c.readOpt(obj["labelWithoutSelector"], c.checkBool),
132151
namePrefix: c.readOpt(obj["namePrefix"], c.checkStr),
133152
nameSuffix: c.readOpt(obj["nameSuffix"], c.checkStr),
134153
namespace: c.readOpt(obj["namespace"], c.checkStr),
154+
patches: c.readOpt(obj["patches"], x => c.readList(x, toApplicationSource_kustomize_patches)),
135155
replicas: c.readOpt(obj["replicas"], x => c.readList(x, toApplicationSource_kustomize_replicas)),
136156
version: c.readOpt(obj["version"], c.checkStr),
137157
}}
@@ -162,6 +182,14 @@ function toApplicationSource_helm_parameters(input: c.JSONValue) {
162182
name: c.readOpt(obj["name"], c.checkStr),
163183
value: c.readOpt(obj["value"], c.checkStr),
164184
}}
185+
function toApplicationSource_kustomize_patches(input: c.JSONValue) {
186+
const obj = c.checkObj(input);
187+
return {
188+
options: c.readOpt(obj["options"], x => c.readMap(x, c.checkBool)),
189+
patch: c.readOpt(obj["patch"], c.checkStr),
190+
path: c.readOpt(obj["path"], c.checkStr),
191+
target: c.readOpt(obj["target"], toApplicationSource_kustomize_patches_target),
192+
}}
165193
function toApplicationSource_kustomize_replicas(input: c.JSONValue) {
166194
const obj = c.checkObj(input);
167195
return {
@@ -196,6 +224,17 @@ function toApplicationSource_directory_jsonnet_tlas(input: c.JSONValue) {
196224
name: c.checkStr(obj["name"]),
197225
value: c.checkStr(obj["value"]),
198226
}}
227+
function toApplicationSource_kustomize_patches_target(input: c.JSONValue) {
228+
const obj = c.checkObj(input);
229+
return {
230+
annotationSelector: c.readOpt(obj["annotationSelector"], c.checkStr),
231+
group: c.readOpt(obj["group"], c.checkStr),
232+
kind: c.readOpt(obj["kind"], c.checkStr),
233+
labelSelector: c.readOpt(obj["labelSelector"], c.checkStr),
234+
name: c.readOpt(obj["name"], c.checkStr),
235+
namespace: c.readOpt(obj["namespace"], c.checkStr),
236+
version: c.readOpt(obj["version"], c.checkStr),
237+
}}
199238

200239
/** Application is a definition of Application resource. */
201240
export interface Application {
@@ -303,6 +342,10 @@ export interface Application {
303342
deployStartedAt?: c.Time | null;
304343
deployedAt: c.Time;
305344
id: number;
345+
initiatedBy?: {
346+
automated?: boolean | null;
347+
username?: string | null;
348+
} | null;
306349
revision?: string | null;
307350
revisions?: Array<string> | null;
308351
source?: ApplicationSource | null;
@@ -618,6 +661,7 @@ function toApplication_status_history(input: c.JSONValue) {
618661
deployStartedAt: c.readOpt(obj["deployStartedAt"], c.toTime),
619662
deployedAt: c.toTime(obj["deployedAt"]),
620663
id: c.checkNum(obj["id"]),
664+
initiatedBy: c.readOpt(obj["initiatedBy"], toApplication_status_history_initiatedBy),
621665
revision: c.readOpt(obj["revision"], c.checkStr),
622666
revisions: c.readOpt(obj["revisions"], x => c.readList(x, c.checkStr)),
623667
source: c.readOpt(obj["source"], toApplicationSource),
@@ -702,6 +746,12 @@ function toApplication_spec_syncPolicy_retry(input: c.JSONValue) {
702746
backoff: c.readOpt(obj["backoff"], toApplication_spec_syncPolicy_retry_backoff),
703747
limit: c.readOpt(obj["limit"], c.checkNum),
704748
}}
749+
function toApplication_status_history_initiatedBy(input: c.JSONValue) {
750+
const obj = c.checkObj(input);
751+
return {
752+
automated: c.readOpt(obj["automated"], c.checkBool),
753+
username: c.readOpt(obj["username"], c.checkStr),
754+
}}
705755
function toApplication_status_operationState_operation(input: c.JSONValue) {
706756
const obj = c.checkObj(input);
707757
return {
@@ -895,7 +945,7 @@ export interface ApplicationSetGenerator {
895945
values?: Record<string,string> | null;
896946
} | null;
897947
list?: {
898-
elements: Array<c.JSONValue>;
948+
elements?: Array<c.JSONValue> | null;
899949
elementsYaml?: string | null;
900950
template?: ApplicationTemplate | null;
901951
} | null;
@@ -1073,12 +1123,14 @@ export interface ApplicationSetGenerator {
10731123
allBranches?: boolean | null;
10741124
api?: string | null;
10751125
group: string;
1126+
includeSharedProjects?: boolean | null;
10761127
includeSubgroups?: boolean | null;
10771128
insecure?: boolean | null;
10781129
tokenRef?: {
10791130
key: string;
10801131
secretName: string;
10811132
} | null;
1133+
topic?: string | null;
10821134
} | null;
10831135
requeueAfterSeconds?: number | null;
10841136
template?: ApplicationTemplate | null;
@@ -1177,7 +1229,7 @@ function toApplicationSetGenerator_git(input: c.JSONValue) {
11771229
function toApplicationSetGenerator_list(input: c.JSONValue) {
11781230
const obj = c.checkObj(input);
11791231
return {
1180-
elements: c.readList(obj["elements"], c.identity),
1232+
elements: c.readOpt(obj["elements"], x => c.readList(x, c.identity)),
11811233
elementsYaml: c.readOpt(obj["elementsYaml"], c.checkStr),
11821234
template: c.readOpt(obj["template"], toApplicationTemplate),
11831235
}}
@@ -1381,9 +1433,11 @@ function toApplicationSetGenerator_scmProvider_gitlab(input: c.JSONValue) {
13811433
allBranches: c.readOpt(obj["allBranches"], c.checkBool),
13821434
api: c.readOpt(obj["api"], c.checkStr),
13831435
group: c.checkStr(obj["group"]),
1436+
includeSharedProjects: c.readOpt(obj["includeSharedProjects"], c.checkBool),
13841437
includeSubgroups: c.readOpt(obj["includeSubgroups"], c.checkBool),
13851438
insecure: c.readOpt(obj["insecure"], c.checkBool),
13861439
tokenRef: c.readOpt(obj["tokenRef"], toApplicationSetGenerator_scmProvider_gitlab_tokenRef),
1440+
topic: c.readOpt(obj["topic"], c.checkStr),
13871441
}}
13881442
function toApplicationSetGenerator_pullRequest_azuredevops_tokenRef(input: c.JSONValue) {
13891443
const obj = c.checkObj(input);
@@ -1650,8 +1704,14 @@ export interface ApplicationSet {
16501704
generators: Array<ApplicationSetGenerator>;
16511705
goTemplate?: boolean | null;
16521706
goTemplateOptions?: Array<string> | null;
1707+
ignoreApplicationDifferences?: Array<{
1708+
jqPathExpressions?: Array<string> | null;
1709+
jsonPointers?: Array<string> | null;
1710+
name?: string | null;
1711+
}> | null;
16531712
preservedFields?: {
16541713
annotations?: Array<string> | null;
1714+
labels?: Array<string> | null;
16551715
} | null;
16561716
strategy?: {
16571717
rollingSync?: {
@@ -1671,6 +1731,7 @@ export interface ApplicationSet {
16711731
preserveResourcesOnDeletion?: boolean | null;
16721732
} | null;
16731733
template: ApplicationTemplate;
1734+
templatePatch?: string | null;
16741735
};
16751736
status?: {
16761737
applicationStatus?: Array<{
@@ -1679,6 +1740,7 @@ export interface ApplicationSet {
16791740
message: string;
16801741
status: string;
16811742
step: string;
1743+
targetRevisions: Array<string>;
16821744
}> | null;
16831745
conditions?: Array<{
16841746
lastTransitionTime?: c.Time | null;
@@ -1687,6 +1749,21 @@ export interface ApplicationSet {
16871749
status: string;
16881750
type: string;
16891751
}> | null;
1752+
resources?: Array<{
1753+
group?: string | null;
1754+
health?: {
1755+
message?: string | null;
1756+
status?: string | null;
1757+
} | null;
1758+
hook?: boolean | null;
1759+
kind?: string | null;
1760+
name?: string | null;
1761+
namespace?: string | null;
1762+
requiresPruning?: boolean | null;
1763+
status?: string | null;
1764+
syncWave?: number | null;
1765+
version?: string | null;
1766+
}> | null;
16901767
} | null;
16911768
}
16921769
export function toApplicationSet(input: c.JSONValue): ApplicationSet & c.ApiKind {
@@ -1726,21 +1803,32 @@ function toApplicationSet_spec(input: c.JSONValue) {
17261803
generators: c.readList(obj["generators"], toApplicationSetGenerator),
17271804
goTemplate: c.readOpt(obj["goTemplate"], c.checkBool),
17281805
goTemplateOptions: c.readOpt(obj["goTemplateOptions"], x => c.readList(x, c.checkStr)),
1806+
ignoreApplicationDifferences: c.readOpt(obj["ignoreApplicationDifferences"], x => c.readList(x, toApplicationSet_spec_ignoreApplicationDifferences)),
17291807
preservedFields: c.readOpt(obj["preservedFields"], toApplicationSet_spec_preservedFields),
17301808
strategy: c.readOpt(obj["strategy"], toApplicationSet_spec_strategy),
17311809
syncPolicy: c.readOpt(obj["syncPolicy"], toApplicationSet_spec_syncPolicy),
17321810
template: toApplicationTemplate(obj["template"]),
1811+
templatePatch: c.readOpt(obj["templatePatch"], c.checkStr),
17331812
}}
17341813
function toApplicationSet_status(input: c.JSONValue) {
17351814
const obj = c.checkObj(input);
17361815
return {
17371816
applicationStatus: c.readOpt(obj["applicationStatus"], x => c.readList(x, toApplicationSet_status_applicationStatus)),
17381817
conditions: c.readOpt(obj["conditions"], x => c.readList(x, toApplicationSet_status_conditions)),
1818+
resources: c.readOpt(obj["resources"], x => c.readList(x, toApplicationSet_status_resources)),
1819+
}}
1820+
function toApplicationSet_spec_ignoreApplicationDifferences(input: c.JSONValue) {
1821+
const obj = c.checkObj(input);
1822+
return {
1823+
jqPathExpressions: c.readOpt(obj["jqPathExpressions"], x => c.readList(x, c.checkStr)),
1824+
jsonPointers: c.readOpt(obj["jsonPointers"], x => c.readList(x, c.checkStr)),
1825+
name: c.readOpt(obj["name"], c.checkStr),
17391826
}}
17401827
function toApplicationSet_spec_preservedFields(input: c.JSONValue) {
17411828
const obj = c.checkObj(input);
17421829
return {
17431830
annotations: c.readOpt(obj["annotations"], x => c.readList(x, c.checkStr)),
1831+
labels: c.readOpt(obj["labels"], x => c.readList(x, c.checkStr)),
17441832
}}
17451833
function toApplicationSet_spec_strategy(input: c.JSONValue) {
17461834
const obj = c.checkObj(input);
@@ -1762,6 +1850,7 @@ function toApplicationSet_status_applicationStatus(input: c.JSONValue) {
17621850
message: c.checkStr(obj["message"]),
17631851
status: c.checkStr(obj["status"]),
17641852
step: c.checkStr(obj["step"]),
1853+
targetRevisions: c.readList(obj["targetRevisions"], c.checkStr),
17651854
}}
17661855
function toApplicationSet_status_conditions(input: c.JSONValue) {
17671856
const obj = c.checkObj(input);
@@ -1772,11 +1861,31 @@ function toApplicationSet_status_conditions(input: c.JSONValue) {
17721861
status: c.checkStr(obj["status"]),
17731862
type: c.checkStr(obj["type"]),
17741863
}}
1864+
function toApplicationSet_status_resources(input: c.JSONValue) {
1865+
const obj = c.checkObj(input);
1866+
return {
1867+
group: c.readOpt(obj["group"], c.checkStr),
1868+
health: c.readOpt(obj["health"], toApplicationSet_status_resources_health),
1869+
hook: c.readOpt(obj["hook"], c.checkBool),
1870+
kind: c.readOpt(obj["kind"], c.checkStr),
1871+
name: c.readOpt(obj["name"], c.checkStr),
1872+
namespace: c.readOpt(obj["namespace"], c.checkStr),
1873+
requiresPruning: c.readOpt(obj["requiresPruning"], c.checkBool),
1874+
status: c.readOpt(obj["status"], c.checkStr),
1875+
syncWave: c.readOpt(obj["syncWave"], c.checkNum),
1876+
version: c.readOpt(obj["version"], c.checkStr),
1877+
}}
17751878
function toApplicationSet_spec_strategy_rollingSync(input: c.JSONValue) {
17761879
const obj = c.checkObj(input);
17771880
return {
17781881
steps: c.readOpt(obj["steps"], x => c.readList(x, toApplicationSet_spec_strategy_rollingSync_steps)),
17791882
}}
1883+
function toApplicationSet_status_resources_health(input: c.JSONValue) {
1884+
const obj = c.checkObj(input);
1885+
return {
1886+
message: c.readOpt(obj["message"], c.checkStr),
1887+
status: c.readOpt(obj["status"], c.checkStr),
1888+
}}
17801889
function toApplicationSet_spec_strategy_rollingSync_steps(input: c.JSONValue) {
17811890
const obj = c.checkObj(input);
17821891
return {
@@ -1803,7 +1912,12 @@ export function toApplicationSetList(input: c.JSONValue): ApplicationSetList & c
18031912
items: c.readList(obj.items, toApplicationSet),
18041913
}}
18051914

1806-
/** AppProject provides a logical grouping of applications, providing controls for: * where the apps may deploy to (cluster whitelist) * what may be deployed (repository whitelist, resource whitelist/blacklist) * who can access these applications (roles, OIDC group claims bindings) * and what they can do (RBAC policies) * automation access to these roles (JWT tokens) */
1915+
/** AppProject provides a logical grouping of applications, providing controls for:
1916+
* where the apps may deploy to (cluster whitelist)
1917+
* what may be deployed (repository whitelist, resource whitelist/blacklist)
1918+
* who can access these applications (roles, OIDC group claims bindings)
1919+
* and what they can do (RBAC policies)
1920+
* automation access to these roles (JWT tokens) */
18071921
export interface AppProject {
18081922
apiVersion?: "argoproj.io/v1alpha1";
18091923
kind?: "AppProject";

0 commit comments

Comments
 (0)