From d542641e4dfd78b4e292c18c6d80c9a422ca8948 Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Sun, 19 May 2024 22:43:24 +0900 Subject: [PATCH] refactor: update nginx controller chore: When a leader is lost, it is now immediately aborted. chore: When the NginxCluster spec is changed, the pod is restarted. --- .../package.json | 7 +- .../src/coordination-v1.ts | 67 +- .../src/core-v1.ts | 873 ++++++------------ .../src/kubekit-v1.ts | 54 +- .../src/leaderElection.ts | 113 ++- .../src/main.ts | 9 +- .../src/nginxClusterController.ts | 288 ++---- .../src/reconcileNginxCluster.ts | 138 +++ .../src/type.ts | 26 +- .../yarn.lock | 208 ++--- 10 files changed, 725 insertions(+), 1058 deletions(-) create mode 100644 examples/nginx-cluster-controller-with-kubekit-sync/src/reconcileNginxCluster.ts diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/package.json b/examples/nginx-cluster-controller-with-kubekit-sync/package.json index 1afb1e03..4fde7dc8 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/package.json +++ b/examples/nginx-cluster-controller-with-kubekit-sync/package.json @@ -18,11 +18,14 @@ "author": "", "license": "MIT", "dependencies": { - "@kubekit/client": "0.1.18" + "@kubekit/client": "0.2.10", + "object-hash": "^3.0.0" }, "devDependencies": { - "@kubekit/client-gen": "^0.1.0", + "@kubekit/client-gen": "0.1.4", "@kubekit/sync": "0.1.3", + "@types/node": "^20.12.12", + "@types/object-hash": "^3.0.6", "esbuild": "^0.20.2", "esbuild-runner": "^2.2.2", "npm-run-all": "^4.1.5" diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/coordination-v1.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/coordination-v1.ts index dc3404d3..0f6906f2 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/src/coordination-v1.ts +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/coordination-v1.ts @@ -3,7 +3,7 @@ import { type Options, type WatchExtraOptions, } from '@kubekit/client' -type Id = { +export type Id = { [K in keyof T]: T[K] } & {} type NoWatch = Omit & { @@ -12,10 +12,10 @@ type NoWatch = Omit & { type RequiredAndDefined = { [P in keyof T]-?: Exclude } -type PartialRequired = Id< +export type PartialRequired = Id< RequiredAndDefined> & Omit > -type MinimumRequiredGet = Id< +export type Strict = Id< T extends { metadata?: any apiVersion?: any @@ -27,12 +27,12 @@ type MinimumRequiredGet = Id< > & { metadata: PartialRequired< RequiredAndDefined['metadata'], - 'name' | 'namespace' | 'creationTimestamp' | 'resourceVersion' + 'name' | 'namespace' | 'creationTimestamp' | 'resourceVersion' | 'uid' > } : T > -type MinimumRequiredList = Id< +type StrictList = Id< T extends { items: { metadata?: any @@ -41,28 +41,27 @@ type MinimumRequiredList = Id< }[] } ? Omit & { - items: MinimumRequiredGet[] + items: Strict[] } : T > export const getCoordinationV1ApiResources = (options?: Options) => { - return apiClient< - MinimumRequiredGet - >({ path: `/apis/coordination.k8s.io/v1/` }, options) + return apiClient>( + { path: `/apis/coordination.k8s.io/v1/` }, + options + ) } export function listCoordinationV1LeaseForAllNamespaces( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listCoordinationV1LeaseForAllNamespaces( args: ListCoordinationV1LeaseForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoordinationV1LeaseForAllNamespaces( @@ -70,7 +69,7 @@ export function listCoordinationV1LeaseForAllNamespaces( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/apis/coordination.k8s.io/v1/leases`, @@ -94,23 +93,19 @@ export function listCoordinationV1LeaseForAllNamespaces( export function listCoordinationV1NamespacedLease( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoordinationV1NamespacedLease( args: ListCoordinationV1NamespacedLeaseApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoordinationV1NamespacedLease( args: any, options: any ): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/apis/coordination.k8s.io/v1/namespaces/${args['namespace']}/leases`, params: { @@ -134,9 +129,7 @@ export const createCoordinationV1NamespacedLease = ( args: CreateCoordinationV1NamespacedLeaseApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/coordination.k8s.io/v1/namespaces/${args['namespace']}/leases`, method: 'POST', @@ -157,7 +150,7 @@ export const deleteCoordinationV1CollectionNamespacedLease = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/apis/coordination.k8s.io/v1/namespaces/${args['namespace']}/leases`, @@ -187,9 +180,7 @@ export const readCoordinationV1NamespacedLease = ( args: ReadCoordinationV1NamespacedLeaseApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/coordination.k8s.io/v1/namespaces/${args['namespace']}/leases/${args.name}`, params: { pretty: args.pretty }, @@ -201,9 +192,7 @@ export const replaceCoordinationV1NamespacedLease = ( args: ReplaceCoordinationV1NamespacedLeaseApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/coordination.k8s.io/v1/namespaces/${args['namespace']}/leases/${args.name}`, method: 'PUT', @@ -223,9 +212,7 @@ export const deleteCoordinationV1NamespacedLease = ( args: DeleteCoordinationV1NamespacedLeaseApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/coordination.k8s.io/v1/namespaces/${args['namespace']}/leases/${args.name}`, method: 'DELETE', @@ -246,9 +233,7 @@ export const patchCoordinationV1NamespacedLease = ( args: PatchCoordinationV1NamespacedLeaseApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/coordination.k8s.io/v1/namespaces/${args['namespace']}/leases/${args.name}`, method: 'PATCH', @@ -270,7 +255,7 @@ export const watchCoordinationV1LeaseListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/apis/coordination.k8s.io/v1/watch/leases`, @@ -296,7 +281,7 @@ export const watchCoordinationV1NamespacedLeaseList = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/apis/coordination.k8s.io/v1/watch/namespaces/${args['namespace']}/leases`, @@ -321,9 +306,7 @@ export const watchCoordinationV1NamespacedLease = ( args: WatchCoordinationV1NamespacedLeaseApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/apis/coordination.k8s.io/v1/watch/namespaces/${args['namespace']}/leases/${args.name}`, params: { diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/core-v1.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/core-v1.ts index 5cad8428..52477b3a 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/src/core-v1.ts +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/core-v1.ts @@ -3,7 +3,7 @@ import { type Options, type WatchExtraOptions, } from '@kubekit/client' -type Id = { +export type Id = { [K in keyof T]: T[K] } & {} type NoWatch = Omit & { @@ -12,10 +12,10 @@ type NoWatch = Omit & { type RequiredAndDefined = { [P in keyof T]-?: Exclude } -type PartialRequired = Id< +export type PartialRequired = Id< RequiredAndDefined> & Omit > -type MinimumRequiredGet = Id< +export type Strict = Id< T extends { metadata?: any apiVersion?: any @@ -27,12 +27,12 @@ type MinimumRequiredGet = Id< > & { metadata: PartialRequired< RequiredAndDefined['metadata'], - 'name' | 'namespace' | 'creationTimestamp' | 'resourceVersion' + 'name' | 'namespace' | 'creationTimestamp' | 'resourceVersion' | 'uid' > } : T > -type MinimumRequiredList = Id< +type StrictList = Id< T extends { items: { metadata?: any @@ -41,12 +41,12 @@ type MinimumRequiredList = Id< }[] } ? Omit & { - items: MinimumRequiredGet[] + items: Strict[] } : T > export const getCoreV1ApiResources = (options?: Options) => { - return apiClient>( + return apiClient>( { path: `/api/v1/` }, options ) @@ -54,16 +54,16 @@ export const getCoreV1ApiResources = (options?: Options) => { export function listCoreV1ComponentStatus( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1ComponentStatus( args: ListCoreV1ComponentStatusApiArg & { watch: true }, options: Options & - WatchExtraOptions> + WatchExtraOptions> ): Promise export function listCoreV1ComponentStatus(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/componentstatuses`, params: { @@ -87,7 +87,7 @@ export const readCoreV1ComponentStatus = ( args: ReadCoreV1ComponentStatusApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/componentstatuses/${args.name}`, params: { pretty: args.pretty }, @@ -98,23 +98,21 @@ export const readCoreV1ComponentStatus = ( export function listCoreV1ConfigMapForAllNamespaces( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1ConfigMapForAllNamespaces( args: ListCoreV1ConfigMapForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1ConfigMapForAllNamespaces( args: any, options: any ): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/configmaps`, params: { @@ -137,23 +135,21 @@ export function listCoreV1ConfigMapForAllNamespaces( export function listCoreV1EndpointsForAllNamespaces( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1EndpointsForAllNamespaces( args: ListCoreV1EndpointsForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1EndpointsForAllNamespaces( args: any, options: any ): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/endpoints`, params: { @@ -176,20 +172,16 @@ export function listCoreV1EndpointsForAllNamespaces( export function listCoreV1EventForAllNamespaces( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1EventForAllNamespaces( args: ListCoreV1EventForAllNamespacesApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1EventForAllNamespaces(args: any, options: any): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/events`, params: { @@ -212,23 +204,21 @@ export function listCoreV1EventForAllNamespaces(args: any, options: any): any { export function listCoreV1LimitRangeForAllNamespaces( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1LimitRangeForAllNamespaces( args: ListCoreV1LimitRangeForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1LimitRangeForAllNamespaces( args: any, options: any ): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/limitranges`, params: { @@ -251,16 +241,16 @@ export function listCoreV1LimitRangeForAllNamespaces( export function listCoreV1Namespace( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1Namespace( args: ListCoreV1NamespaceApiArg & { watch: true }, options: Options & - WatchExtraOptions> + WatchExtraOptions> ): Promise export function listCoreV1Namespace(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces`, params: { @@ -284,7 +274,7 @@ export const createCoreV1Namespace = ( args: CreateCoreV1NamespaceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces`, method: 'POST', @@ -304,9 +294,7 @@ export const createCoreV1NamespacedBinding = ( args: CreateCoreV1NamespacedBindingApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/bindings`, method: 'POST', @@ -325,20 +313,16 @@ export const createCoreV1NamespacedBinding = ( export function listCoreV1NamespacedConfigMap( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedConfigMap( args: ListCoreV1NamespacedConfigMapApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedConfigMap(args: any, options: any): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/configmaps`, params: { @@ -362,9 +346,7 @@ export const createCoreV1NamespacedConfigMap = ( args: CreateCoreV1NamespacedConfigMapApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/configmaps`, method: 'POST', @@ -385,7 +367,7 @@ export const deleteCoreV1CollectionNamespacedConfigMap = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/configmaps`, @@ -415,9 +397,7 @@ export const readCoreV1NamespacedConfigMap = ( args: ReadCoreV1NamespacedConfigMapApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/configmaps/${args.name}`, params: { pretty: args.pretty }, @@ -429,9 +409,7 @@ export const replaceCoreV1NamespacedConfigMap = ( args: ReplaceCoreV1NamespacedConfigMapApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/configmaps/${args.name}`, method: 'PUT', @@ -451,9 +429,7 @@ export const deleteCoreV1NamespacedConfigMap = ( args: DeleteCoreV1NamespacedConfigMapApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/configmaps/${args.name}`, method: 'DELETE', @@ -474,9 +450,7 @@ export const patchCoreV1NamespacedConfigMap = ( args: PatchCoreV1NamespacedConfigMapApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/configmaps/${args.name}`, method: 'PATCH', @@ -496,20 +470,16 @@ export const patchCoreV1NamespacedConfigMap = ( export function listCoreV1NamespacedEndpoints( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedEndpoints( args: ListCoreV1NamespacedEndpointsApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedEndpoints(args: any, options: any): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/endpoints`, params: { @@ -533,9 +503,7 @@ export const createCoreV1NamespacedEndpoints = ( args: CreateCoreV1NamespacedEndpointsApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/endpoints`, method: 'POST', @@ -556,7 +524,7 @@ export const deleteCoreV1CollectionNamespacedEndpoints = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/endpoints`, @@ -586,9 +554,7 @@ export const readCoreV1NamespacedEndpoints = ( args: ReadCoreV1NamespacedEndpointsApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/endpoints/${args.name}`, params: { pretty: args.pretty }, @@ -600,9 +566,7 @@ export const replaceCoreV1NamespacedEndpoints = ( args: ReplaceCoreV1NamespacedEndpointsApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/endpoints/${args.name}`, method: 'PUT', @@ -622,9 +586,7 @@ export const deleteCoreV1NamespacedEndpoints = ( args: DeleteCoreV1NamespacedEndpointsApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/endpoints/${args.name}`, method: 'DELETE', @@ -645,9 +607,7 @@ export const patchCoreV1NamespacedEndpoints = ( args: PatchCoreV1NamespacedEndpointsApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/endpoints/${args.name}`, method: 'PATCH', @@ -667,16 +627,16 @@ export const patchCoreV1NamespacedEndpoints = ( export function listCoreV1NamespacedEvent( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedEvent( args: ListCoreV1NamespacedEventApiArg & { watch: true }, options: Options & - WatchExtraOptions> + WatchExtraOptions> ): Promise export function listCoreV1NamespacedEvent(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/events`, params: { @@ -700,7 +660,7 @@ export const createCoreV1NamespacedEvent = ( args: CreateCoreV1NamespacedEventApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/events`, method: 'POST', @@ -720,9 +680,7 @@ export const deleteCoreV1CollectionNamespacedEvent = ( args: DeleteCoreV1CollectionNamespacedEventApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/events`, method: 'DELETE', @@ -751,7 +709,7 @@ export const readCoreV1NamespacedEvent = ( args: ReadCoreV1NamespacedEventApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/events/${args.name}`, params: { pretty: args.pretty }, @@ -763,7 +721,7 @@ export const replaceCoreV1NamespacedEvent = ( args: ReplaceCoreV1NamespacedEventApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/events/${args.name}`, method: 'PUT', @@ -783,7 +741,7 @@ export const deleteCoreV1NamespacedEvent = ( args: DeleteCoreV1NamespacedEventApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/events/${args.name}`, method: 'DELETE', @@ -804,7 +762,7 @@ export const patchCoreV1NamespacedEvent = ( args: PatchCoreV1NamespacedEventApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/events/${args.name}`, method: 'PATCH', @@ -824,20 +782,16 @@ export const patchCoreV1NamespacedEvent = ( export function listCoreV1NamespacedLimitRange( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedLimitRange( args: ListCoreV1NamespacedLimitRangeApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedLimitRange(args: any, options: any): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/limitranges`, params: { @@ -861,9 +815,7 @@ export const createCoreV1NamespacedLimitRange = ( args: CreateCoreV1NamespacedLimitRangeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/limitranges`, method: 'POST', @@ -884,7 +836,7 @@ export const deleteCoreV1CollectionNamespacedLimitRange = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/limitranges`, @@ -914,9 +866,7 @@ export const readCoreV1NamespacedLimitRange = ( args: ReadCoreV1NamespacedLimitRangeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/limitranges/${args.name}`, params: { pretty: args.pretty }, @@ -928,9 +878,7 @@ export const replaceCoreV1NamespacedLimitRange = ( args: ReplaceCoreV1NamespacedLimitRangeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/limitranges/${args.name}`, method: 'PUT', @@ -950,9 +898,7 @@ export const deleteCoreV1NamespacedLimitRange = ( args: DeleteCoreV1NamespacedLimitRangeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/limitranges/${args.name}`, method: 'DELETE', @@ -973,9 +919,7 @@ export const patchCoreV1NamespacedLimitRange = ( args: PatchCoreV1NamespacedLimitRangeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/limitranges/${args.name}`, method: 'PATCH', @@ -995,16 +939,14 @@ export const patchCoreV1NamespacedLimitRange = ( export function listCoreV1NamespacedPersistentVolumeClaim( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listCoreV1NamespacedPersistentVolumeClaim( args: ListCoreV1NamespacedPersistentVolumeClaimApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1NamespacedPersistentVolumeClaim( @@ -1012,7 +954,7 @@ export function listCoreV1NamespacedPersistentVolumeClaim( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims`, @@ -1038,7 +980,7 @@ export const createCoreV1NamespacedPersistentVolumeClaim = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims`, @@ -1060,7 +1002,7 @@ export const deleteCoreV1CollectionNamespacedPersistentVolumeClaim = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims`, @@ -1091,7 +1033,7 @@ export const readCoreV1NamespacedPersistentVolumeClaim = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}`, @@ -1105,7 +1047,7 @@ export const replaceCoreV1NamespacedPersistentVolumeClaim = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}`, @@ -1127,7 +1069,7 @@ export const deleteCoreV1NamespacedPersistentVolumeClaim = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}`, @@ -1150,7 +1092,7 @@ export const patchCoreV1NamespacedPersistentVolumeClaim = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}`, @@ -1173,7 +1115,7 @@ export const readCoreV1NamespacedPersistentVolumeClaimStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}/status`, @@ -1187,7 +1129,7 @@ export const replaceCoreV1NamespacedPersistentVolumeClaimStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}/status`, @@ -1209,7 +1151,7 @@ export const patchCoreV1NamespacedPersistentVolumeClaimStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}/status`, @@ -1230,16 +1172,16 @@ export const patchCoreV1NamespacedPersistentVolumeClaimStatus = ( export function listCoreV1NamespacedPod( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedPod( args: ListCoreV1NamespacedPodApiArg & { watch: true }, options: Options & - WatchExtraOptions> + WatchExtraOptions> ): Promise export function listCoreV1NamespacedPod(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods`, params: { @@ -1263,7 +1205,7 @@ export const createCoreV1NamespacedPod = ( args: CreateCoreV1NamespacedPodApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods`, method: 'POST', @@ -1283,9 +1225,7 @@ export const deleteCoreV1CollectionNamespacedPod = ( args: DeleteCoreV1CollectionNamespacedPodApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods`, method: 'DELETE', @@ -1314,7 +1254,7 @@ export const readCoreV1NamespacedPod = ( args: ReadCoreV1NamespacedPodApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}`, params: { pretty: args.pretty }, @@ -1326,7 +1266,7 @@ export const replaceCoreV1NamespacedPod = ( args: ReplaceCoreV1NamespacedPodApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}`, method: 'PUT', @@ -1346,7 +1286,7 @@ export const deleteCoreV1NamespacedPod = ( args: DeleteCoreV1NamespacedPodApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}`, method: 'DELETE', @@ -1367,7 +1307,7 @@ export const patchCoreV1NamespacedPod = ( args: PatchCoreV1NamespacedPodApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}`, method: 'PATCH', @@ -1388,9 +1328,7 @@ export const connectCoreV1GetNamespacedPodAttach = ( args: ConnectCoreV1GetNamespacedPodAttachApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/attach`, params: { @@ -1408,9 +1346,7 @@ export const connectCoreV1PostNamespacedPodAttach = ( args: ConnectCoreV1PostNamespacedPodAttachApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/attach`, method: 'POST', @@ -1429,9 +1365,7 @@ export const createCoreV1NamespacedPodBinding = ( args: CreateCoreV1NamespacedPodBindingApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/binding`, method: 'POST', @@ -1452,7 +1386,7 @@ export const readCoreV1NamespacedPodEphemeralcontainers = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/ephemeralcontainers`, @@ -1466,7 +1400,7 @@ export const replaceCoreV1NamespacedPodEphemeralcontainers = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/ephemeralcontainers`, @@ -1488,7 +1422,7 @@ export const patchCoreV1NamespacedPodEphemeralcontainers = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/ephemeralcontainers`, @@ -1510,9 +1444,7 @@ export const createCoreV1NamespacedPodEviction = ( args: CreateCoreV1NamespacedPodEvictionApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/eviction`, method: 'POST', @@ -1532,9 +1464,7 @@ export const connectCoreV1GetNamespacedPodExec = ( args: ConnectCoreV1GetNamespacedPodExecApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/exec`, params: { @@ -1553,9 +1483,7 @@ export const connectCoreV1PostNamespacedPodExec = ( args: ConnectCoreV1PostNamespacedPodExecApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/exec`, method: 'POST', @@ -1575,7 +1503,7 @@ export const readCoreV1NamespacedPodLog = ( args: ReadCoreV1NamespacedPodLogApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/log`, params: { @@ -1597,9 +1525,7 @@ export const connectCoreV1GetNamespacedPodPortforward = ( args: ConnectCoreV1GetNamespacedPodPortforwardApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/portforward`, params: { ports: args.ports }, @@ -1612,7 +1538,7 @@ export const connectCoreV1PostNamespacedPodPortforward = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/portforward`, @@ -1626,9 +1552,7 @@ export const connectCoreV1GetNamespacedPodProxy = ( args: ConnectCoreV1GetNamespacedPodProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy`, params: { path: args.path }, @@ -1640,9 +1564,7 @@ export const connectCoreV1PutNamespacedPodProxy = ( args: ConnectCoreV1PutNamespacedPodProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy`, method: 'PUT', @@ -1655,9 +1577,7 @@ export const connectCoreV1PostNamespacedPodProxy = ( args: ConnectCoreV1PostNamespacedPodProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy`, method: 'POST', @@ -1670,9 +1590,7 @@ export const connectCoreV1DeleteNamespacedPodProxy = ( args: ConnectCoreV1DeleteNamespacedPodProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy`, method: 'DELETE', @@ -1685,9 +1603,7 @@ export const connectCoreV1OptionsNamespacedPodProxy = ( args: ConnectCoreV1OptionsNamespacedPodProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy`, method: 'OPTIONS', @@ -1700,9 +1616,7 @@ export const connectCoreV1HeadNamespacedPodProxy = ( args: ConnectCoreV1HeadNamespacedPodProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy`, method: 'HEAD', @@ -1715,9 +1629,7 @@ export const connectCoreV1PatchNamespacedPodProxy = ( args: ConnectCoreV1PatchNamespacedPodProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy`, method: 'PATCH', @@ -1731,7 +1643,7 @@ export const connectCoreV1GetNamespacedPodProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy/${args.pathPath}`, @@ -1745,7 +1657,7 @@ export const connectCoreV1PutNamespacedPodProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy/${args.pathPath}`, @@ -1760,7 +1672,7 @@ export const connectCoreV1PostNamespacedPodProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy/${args.pathPath}`, @@ -1775,7 +1687,7 @@ export const connectCoreV1DeleteNamespacedPodProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy/${args.pathPath}`, @@ -1790,7 +1702,7 @@ export const connectCoreV1OptionsNamespacedPodProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy/${args.pathPath}`, @@ -1805,7 +1717,7 @@ export const connectCoreV1HeadNamespacedPodProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy/${args.pathPath}`, @@ -1820,7 +1732,7 @@ export const connectCoreV1PatchNamespacedPodProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/proxy/${args.pathPath}`, @@ -1834,9 +1746,7 @@ export const readCoreV1NamespacedPodStatus = ( args: ReadCoreV1NamespacedPodStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/status`, params: { pretty: args.pretty }, @@ -1848,9 +1758,7 @@ export const replaceCoreV1NamespacedPodStatus = ( args: ReplaceCoreV1NamespacedPodStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/status`, method: 'PUT', @@ -1870,9 +1778,7 @@ export const patchCoreV1NamespacedPodStatus = ( args: PatchCoreV1NamespacedPodStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/pods/${args.name}/status`, method: 'PATCH', @@ -1892,20 +1798,16 @@ export const patchCoreV1NamespacedPodStatus = ( export function listCoreV1NamespacedPodTemplate( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedPodTemplate( args: ListCoreV1NamespacedPodTemplateApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedPodTemplate(args: any, options: any): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/podtemplates`, params: { @@ -1929,9 +1831,7 @@ export const createCoreV1NamespacedPodTemplate = ( args: CreateCoreV1NamespacedPodTemplateApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/podtemplates`, method: 'POST', @@ -1952,7 +1852,7 @@ export const deleteCoreV1CollectionNamespacedPodTemplate = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/podtemplates`, @@ -1982,9 +1882,7 @@ export const readCoreV1NamespacedPodTemplate = ( args: ReadCoreV1NamespacedPodTemplateApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/podtemplates/${args.name}`, params: { pretty: args.pretty }, @@ -1996,9 +1894,7 @@ export const replaceCoreV1NamespacedPodTemplate = ( args: ReplaceCoreV1NamespacedPodTemplateApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/podtemplates/${args.name}`, method: 'PUT', @@ -2018,9 +1914,7 @@ export const deleteCoreV1NamespacedPodTemplate = ( args: DeleteCoreV1NamespacedPodTemplateApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/podtemplates/${args.name}`, method: 'DELETE', @@ -2041,9 +1935,7 @@ export const patchCoreV1NamespacedPodTemplate = ( args: PatchCoreV1NamespacedPodTemplateApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/podtemplates/${args.name}`, method: 'PATCH', @@ -2063,16 +1955,14 @@ export const patchCoreV1NamespacedPodTemplate = ( export function listCoreV1NamespacedReplicationController( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listCoreV1NamespacedReplicationController( args: ListCoreV1NamespacedReplicationControllerApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1NamespacedReplicationController( @@ -2080,7 +1970,7 @@ export function listCoreV1NamespacedReplicationController( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers`, @@ -2106,7 +1996,7 @@ export const createCoreV1NamespacedReplicationController = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers`, @@ -2128,7 +2018,7 @@ export const deleteCoreV1CollectionNamespacedReplicationController = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers`, @@ -2159,7 +2049,7 @@ export const readCoreV1NamespacedReplicationController = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}`, @@ -2173,7 +2063,7 @@ export const replaceCoreV1NamespacedReplicationController = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}`, @@ -2195,7 +2085,7 @@ export const deleteCoreV1NamespacedReplicationController = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}`, @@ -2218,7 +2108,7 @@ export const patchCoreV1NamespacedReplicationController = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}`, @@ -2241,7 +2131,7 @@ export const readCoreV1NamespacedReplicationControllerScale = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}/scale`, @@ -2255,7 +2145,7 @@ export const replaceCoreV1NamespacedReplicationControllerScale = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}/scale`, @@ -2277,7 +2167,7 @@ export const patchCoreV1NamespacedReplicationControllerScale = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}/scale`, @@ -2300,7 +2190,7 @@ export const readCoreV1NamespacedReplicationControllerStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}/status`, @@ -2314,7 +2204,7 @@ export const replaceCoreV1NamespacedReplicationControllerStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}/status`, @@ -2336,7 +2226,7 @@ export const patchCoreV1NamespacedReplicationControllerStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/replicationcontrollers/${args.name}/status`, @@ -2357,23 +2247,19 @@ export const patchCoreV1NamespacedReplicationControllerStatus = ( export function listCoreV1NamespacedResourceQuota( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedResourceQuota( args: ListCoreV1NamespacedResourceQuotaApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedResourceQuota( args: any, options: any ): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas`, params: { @@ -2397,9 +2283,7 @@ export const createCoreV1NamespacedResourceQuota = ( args: CreateCoreV1NamespacedResourceQuotaApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas`, method: 'POST', @@ -2420,7 +2304,7 @@ export const deleteCoreV1CollectionNamespacedResourceQuota = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas`, @@ -2450,9 +2334,7 @@ export const readCoreV1NamespacedResourceQuota = ( args: ReadCoreV1NamespacedResourceQuotaApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas/${args.name}`, params: { pretty: args.pretty }, @@ -2464,9 +2346,7 @@ export const replaceCoreV1NamespacedResourceQuota = ( args: ReplaceCoreV1NamespacedResourceQuotaApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas/${args.name}`, method: 'PUT', @@ -2486,9 +2366,7 @@ export const deleteCoreV1NamespacedResourceQuota = ( args: DeleteCoreV1NamespacedResourceQuotaApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas/${args.name}`, method: 'DELETE', @@ -2509,9 +2387,7 @@ export const patchCoreV1NamespacedResourceQuota = ( args: PatchCoreV1NamespacedResourceQuotaApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas/${args.name}`, method: 'PATCH', @@ -2532,9 +2408,7 @@ export const readCoreV1NamespacedResourceQuotaStatus = ( args: ReadCoreV1NamespacedResourceQuotaStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas/${args.name}/status`, params: { pretty: args.pretty }, @@ -2547,7 +2421,7 @@ export const replaceCoreV1NamespacedResourceQuotaStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas/${args.name}/status`, @@ -2568,9 +2442,7 @@ export const patchCoreV1NamespacedResourceQuotaStatus = ( args: PatchCoreV1NamespacedResourceQuotaStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/resourcequotas/${args.name}/status`, method: 'PATCH', @@ -2590,18 +2462,16 @@ export const patchCoreV1NamespacedResourceQuotaStatus = ( export function listCoreV1NamespacedSecret( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedSecret( args: ListCoreV1NamespacedSecretApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedSecret(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/secrets`, params: { @@ -2625,7 +2495,7 @@ export const createCoreV1NamespacedSecret = ( args: CreateCoreV1NamespacedSecretApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/secrets`, method: 'POST', @@ -2645,9 +2515,7 @@ export const deleteCoreV1CollectionNamespacedSecret = ( args: DeleteCoreV1CollectionNamespacedSecretApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/secrets`, method: 'DELETE', @@ -2676,7 +2544,7 @@ export const readCoreV1NamespacedSecret = ( args: ReadCoreV1NamespacedSecretApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/secrets/${args.name}`, params: { pretty: args.pretty }, @@ -2688,9 +2556,7 @@ export const replaceCoreV1NamespacedSecret = ( args: ReplaceCoreV1NamespacedSecretApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/secrets/${args.name}`, method: 'PUT', @@ -2710,7 +2576,7 @@ export const deleteCoreV1NamespacedSecret = ( args: DeleteCoreV1NamespacedSecretApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/secrets/${args.name}`, method: 'DELETE', @@ -2731,7 +2597,7 @@ export const patchCoreV1NamespacedSecret = ( args: PatchCoreV1NamespacedSecretApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/secrets/${args.name}`, method: 'PATCH', @@ -2751,23 +2617,19 @@ export const patchCoreV1NamespacedSecret = ( export function listCoreV1NamespacedServiceAccount( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedServiceAccount( args: ListCoreV1NamespacedServiceAccountApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedServiceAccount( args: any, options: any ): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts`, params: { @@ -2791,9 +2653,7 @@ export const createCoreV1NamespacedServiceAccount = ( args: CreateCoreV1NamespacedServiceAccountApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts`, method: 'POST', @@ -2814,7 +2674,7 @@ export const deleteCoreV1CollectionNamespacedServiceAccount = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts`, @@ -2844,9 +2704,7 @@ export const readCoreV1NamespacedServiceAccount = ( args: ReadCoreV1NamespacedServiceAccountApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts/${args.name}`, params: { pretty: args.pretty }, @@ -2858,9 +2716,7 @@ export const replaceCoreV1NamespacedServiceAccount = ( args: ReplaceCoreV1NamespacedServiceAccountApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts/${args.name}`, method: 'PUT', @@ -2880,9 +2736,7 @@ export const deleteCoreV1NamespacedServiceAccount = ( args: DeleteCoreV1NamespacedServiceAccountApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts/${args.name}`, method: 'DELETE', @@ -2903,9 +2757,7 @@ export const patchCoreV1NamespacedServiceAccount = ( args: PatchCoreV1NamespacedServiceAccountApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts/${args.name}`, method: 'PATCH', @@ -2927,7 +2779,7 @@ export const createCoreV1NamespacedServiceAccountToken = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/serviceaccounts/${args.name}/token`, @@ -2947,18 +2799,16 @@ export const createCoreV1NamespacedServiceAccountToken = ( export function listCoreV1NamespacedService( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1NamespacedService( args: ListCoreV1NamespacedServiceApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1NamespacedService(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services`, params: { @@ -2982,9 +2832,7 @@ export const createCoreV1NamespacedService = ( args: CreateCoreV1NamespacedServiceApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services`, method: 'POST', @@ -3004,9 +2852,7 @@ export const deleteCoreV1CollectionNamespacedService = ( args: DeleteCoreV1CollectionNamespacedServiceApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services`, method: 'DELETE', @@ -3035,7 +2881,7 @@ export const readCoreV1NamespacedService = ( args: ReadCoreV1NamespacedServiceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}`, params: { pretty: args.pretty }, @@ -3047,9 +2893,7 @@ export const replaceCoreV1NamespacedService = ( args: ReplaceCoreV1NamespacedServiceApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}`, method: 'PUT', @@ -3069,9 +2913,7 @@ export const deleteCoreV1NamespacedService = ( args: DeleteCoreV1NamespacedServiceApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}`, method: 'DELETE', @@ -3092,7 +2934,7 @@ export const patchCoreV1NamespacedService = ( args: PatchCoreV1NamespacedServiceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}`, method: 'PATCH', @@ -3113,9 +2955,7 @@ export const connectCoreV1GetNamespacedServiceProxy = ( args: ConnectCoreV1GetNamespacedServiceProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy`, params: { path: args.path }, @@ -3127,9 +2967,7 @@ export const connectCoreV1PutNamespacedServiceProxy = ( args: ConnectCoreV1PutNamespacedServiceProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy`, method: 'PUT', @@ -3142,9 +2980,7 @@ export const connectCoreV1PostNamespacedServiceProxy = ( args: ConnectCoreV1PostNamespacedServiceProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy`, method: 'POST', @@ -3158,7 +2994,7 @@ export const connectCoreV1DeleteNamespacedServiceProxy = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy`, @@ -3173,7 +3009,7 @@ export const connectCoreV1OptionsNamespacedServiceProxy = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy`, @@ -3187,9 +3023,7 @@ export const connectCoreV1HeadNamespacedServiceProxy = ( args: ConnectCoreV1HeadNamespacedServiceProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy`, method: 'HEAD', @@ -3202,9 +3036,7 @@ export const connectCoreV1PatchNamespacedServiceProxy = ( args: ConnectCoreV1PatchNamespacedServiceProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy`, method: 'PATCH', @@ -3218,7 +3050,7 @@ export const connectCoreV1GetNamespacedServiceProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy/${args.pathPath}`, @@ -3232,7 +3064,7 @@ export const connectCoreV1PutNamespacedServiceProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy/${args.pathPath}`, @@ -3247,7 +3079,7 @@ export const connectCoreV1PostNamespacedServiceProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy/${args.pathPath}`, @@ -3262,7 +3094,7 @@ export const connectCoreV1DeleteNamespacedServiceProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy/${args.pathPath}`, @@ -3277,7 +3109,7 @@ export const connectCoreV1OptionsNamespacedServiceProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy/${args.pathPath}`, @@ -3292,7 +3124,7 @@ export const connectCoreV1HeadNamespacedServiceProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy/${args.pathPath}`, @@ -3307,7 +3139,7 @@ export const connectCoreV1PatchNamespacedServiceProxyWithPath = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/proxy/${args.pathPath}`, @@ -3321,9 +3153,7 @@ export const readCoreV1NamespacedServiceStatus = ( args: ReadCoreV1NamespacedServiceStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/status`, params: { pretty: args.pretty }, @@ -3335,9 +3165,7 @@ export const replaceCoreV1NamespacedServiceStatus = ( args: ReplaceCoreV1NamespacedServiceStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/status`, method: 'PUT', @@ -3357,9 +3185,7 @@ export const patchCoreV1NamespacedServiceStatus = ( args: PatchCoreV1NamespacedServiceStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args['namespace']}/services/${args.name}/status`, method: 'PATCH', @@ -3380,7 +3206,7 @@ export const readCoreV1Namespace = ( args: ReadCoreV1NamespaceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args.name}`, params: { pretty: args.pretty }, @@ -3392,7 +3218,7 @@ export const replaceCoreV1Namespace = ( args: ReplaceCoreV1NamespaceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args.name}`, method: 'PUT', @@ -3412,7 +3238,7 @@ export const deleteCoreV1Namespace = ( args: DeleteCoreV1NamespaceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args.name}`, method: 'DELETE', @@ -3433,7 +3259,7 @@ export const patchCoreV1Namespace = ( args: PatchCoreV1NamespaceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args.name}`, method: 'PATCH', @@ -3454,9 +3280,7 @@ export const replaceCoreV1NamespaceFinalize = ( args: ReplaceCoreV1NamespaceFinalizeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/namespaces/${args.name}/finalize`, method: 'PUT', @@ -3476,7 +3300,7 @@ export const readCoreV1NamespaceStatus = ( args: ReadCoreV1NamespaceStatusApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args.name}/status`, params: { pretty: args.pretty }, @@ -3488,7 +3312,7 @@ export const replaceCoreV1NamespaceStatus = ( args: ReplaceCoreV1NamespaceStatusApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args.name}/status`, method: 'PUT', @@ -3508,7 +3332,7 @@ export const patchCoreV1NamespaceStatus = ( args: PatchCoreV1NamespaceStatusApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/namespaces/${args.name}/status`, method: 'PATCH', @@ -3528,16 +3352,15 @@ export const patchCoreV1NamespaceStatus = ( export function listCoreV1Node( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1Node( args: ListCoreV1NodeApiArg & { watch: true }, - options: Options & - WatchExtraOptions> + options: Options & WatchExtraOptions> ): Promise export function listCoreV1Node(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes`, params: { @@ -3561,7 +3384,7 @@ export const createCoreV1Node = ( args: CreateCoreV1NodeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes`, method: 'POST', @@ -3581,7 +3404,7 @@ export const deleteCoreV1CollectionNode = ( args: DeleteCoreV1CollectionNodeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes`, method: 'DELETE', @@ -3610,7 +3433,7 @@ export const readCoreV1Node = ( args: ReadCoreV1NodeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}`, params: { pretty: args.pretty } }, options ) @@ -3619,7 +3442,7 @@ export const replaceCoreV1Node = ( args: ReplaceCoreV1NodeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}`, method: 'PUT', @@ -3639,7 +3462,7 @@ export const deleteCoreV1Node = ( args: DeleteCoreV1NodeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}`, method: 'DELETE', @@ -3660,7 +3483,7 @@ export const patchCoreV1Node = ( args: PatchCoreV1NodeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}`, method: 'PATCH', @@ -3681,7 +3504,7 @@ export const connectCoreV1GetNodeProxy = ( args: ConnectCoreV1GetNodeProxyApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy`, params: { path: args.path } }, options ) @@ -3690,7 +3513,7 @@ export const connectCoreV1PutNodeProxy = ( args: ConnectCoreV1PutNodeProxyApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy`, method: 'PUT', @@ -3703,7 +3526,7 @@ export const connectCoreV1PostNodeProxy = ( args: ConnectCoreV1PostNodeProxyApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy`, method: 'POST', @@ -3716,7 +3539,7 @@ export const connectCoreV1DeleteNodeProxy = ( args: ConnectCoreV1DeleteNodeProxyApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy`, method: 'DELETE', @@ -3729,9 +3552,7 @@ export const connectCoreV1OptionsNodeProxy = ( args: ConnectCoreV1OptionsNodeProxyApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy`, method: 'OPTIONS', @@ -3744,7 +3565,7 @@ export const connectCoreV1HeadNodeProxy = ( args: ConnectCoreV1HeadNodeProxyApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy`, method: 'HEAD', @@ -3757,7 +3578,7 @@ export const connectCoreV1PatchNodeProxy = ( args: ConnectCoreV1PatchNodeProxyApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy`, method: 'PATCH', @@ -3770,9 +3591,7 @@ export const connectCoreV1GetNodeProxyWithPath = ( args: ConnectCoreV1GetNodeProxyWithPathApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy/${args.pathPath}`, params: { path: args.queryPath }, @@ -3784,9 +3603,7 @@ export const connectCoreV1PutNodeProxyWithPath = ( args: ConnectCoreV1PutNodeProxyWithPathApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy/${args.pathPath}`, method: 'PUT', @@ -3799,9 +3616,7 @@ export const connectCoreV1PostNodeProxyWithPath = ( args: ConnectCoreV1PostNodeProxyWithPathApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy/${args.pathPath}`, method: 'POST', @@ -3814,9 +3629,7 @@ export const connectCoreV1DeleteNodeProxyWithPath = ( args: ConnectCoreV1DeleteNodeProxyWithPathApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy/${args.pathPath}`, method: 'DELETE', @@ -3829,9 +3642,7 @@ export const connectCoreV1OptionsNodeProxyWithPath = ( args: ConnectCoreV1OptionsNodeProxyWithPathApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy/${args.pathPath}`, method: 'OPTIONS', @@ -3844,9 +3655,7 @@ export const connectCoreV1HeadNodeProxyWithPath = ( args: ConnectCoreV1HeadNodeProxyWithPathApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy/${args.pathPath}`, method: 'HEAD', @@ -3859,9 +3668,7 @@ export const connectCoreV1PatchNodeProxyWithPath = ( args: ConnectCoreV1PatchNodeProxyWithPathApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/nodes/${args.name}/proxy/${args.pathPath}`, method: 'PATCH', @@ -3874,7 +3681,7 @@ export const readCoreV1NodeStatus = ( args: ReadCoreV1NodeStatusApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/status`, params: { pretty: args.pretty }, @@ -3886,7 +3693,7 @@ export const replaceCoreV1NodeStatus = ( args: ReplaceCoreV1NodeStatusApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/status`, method: 'PUT', @@ -3906,7 +3713,7 @@ export const patchCoreV1NodeStatus = ( args: PatchCoreV1NodeStatusApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/nodes/${args.name}/status`, method: 'PATCH', @@ -3927,7 +3734,7 @@ export function listCoreV1PersistentVolumeClaimForAllNamespaces( args: NoWatch, options?: Options ): Promise< - MinimumRequiredList + StrictList > export function listCoreV1PersistentVolumeClaimForAllNamespaces( args: ListCoreV1PersistentVolumeClaimForAllNamespacesApiArg & { @@ -3935,7 +3742,7 @@ export function listCoreV1PersistentVolumeClaimForAllNamespaces( }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1PersistentVolumeClaimForAllNamespaces( @@ -3943,7 +3750,7 @@ export function listCoreV1PersistentVolumeClaimForAllNamespaces( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/persistentvolumeclaims`, @@ -3967,18 +3774,16 @@ export function listCoreV1PersistentVolumeClaimForAllNamespaces( export function listCoreV1PersistentVolume( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1PersistentVolume( args: ListCoreV1PersistentVolumeApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1PersistentVolume(args: any, options: any): any { - return apiClient>( + return apiClient>( { path: `/api/v1/persistentvolumes`, params: { @@ -4002,7 +3807,7 @@ export const createCoreV1PersistentVolume = ( args: CreateCoreV1PersistentVolumeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/persistentvolumes`, method: 'POST', @@ -4022,9 +3827,7 @@ export const deleteCoreV1CollectionPersistentVolume = ( args: DeleteCoreV1CollectionPersistentVolumeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/persistentvolumes`, method: 'DELETE', @@ -4053,7 +3856,7 @@ export const readCoreV1PersistentVolume = ( args: ReadCoreV1PersistentVolumeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/persistentvolumes/${args.name}`, params: { pretty: args.pretty }, @@ -4065,9 +3868,7 @@ export const replaceCoreV1PersistentVolume = ( args: ReplaceCoreV1PersistentVolumeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/persistentvolumes/${args.name}`, method: 'PUT', @@ -4087,7 +3888,7 @@ export const deleteCoreV1PersistentVolume = ( args: DeleteCoreV1PersistentVolumeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/persistentvolumes/${args.name}`, method: 'DELETE', @@ -4108,7 +3909,7 @@ export const patchCoreV1PersistentVolume = ( args: PatchCoreV1PersistentVolumeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/persistentvolumes/${args.name}`, method: 'PATCH', @@ -4129,9 +3930,7 @@ export const readCoreV1PersistentVolumeStatus = ( args: ReadCoreV1PersistentVolumeStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/persistentvolumes/${args.name}/status`, params: { pretty: args.pretty }, @@ -4143,9 +3942,7 @@ export const replaceCoreV1PersistentVolumeStatus = ( args: ReplaceCoreV1PersistentVolumeStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/persistentvolumes/${args.name}/status`, method: 'PUT', @@ -4165,9 +3962,7 @@ export const patchCoreV1PersistentVolumeStatus = ( args: PatchCoreV1PersistentVolumeStatusApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/api/v1/persistentvolumes/${args.name}/status`, method: 'PATCH', @@ -4187,20 +3982,16 @@ export const patchCoreV1PersistentVolumeStatus = ( export function listCoreV1PodForAllNamespaces( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1PodForAllNamespaces( args: ListCoreV1PodForAllNamespacesApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1PodForAllNamespaces(args: any, options: any): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/pods`, params: { @@ -4223,16 +4014,14 @@ export function listCoreV1PodForAllNamespaces(args: any, options: any): any { export function listCoreV1PodTemplateForAllNamespaces( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listCoreV1PodTemplateForAllNamespaces( args: ListCoreV1PodTemplateForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1PodTemplateForAllNamespaces( @@ -4240,7 +4029,7 @@ export function listCoreV1PodTemplateForAllNamespaces( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/podtemplates`, @@ -4265,7 +4054,7 @@ export function listCoreV1ReplicationControllerForAllNamespaces( args: NoWatch, options?: Options ): Promise< - MinimumRequiredList + StrictList > export function listCoreV1ReplicationControllerForAllNamespaces( args: ListCoreV1ReplicationControllerForAllNamespacesApiArg & { @@ -4273,7 +4062,7 @@ export function listCoreV1ReplicationControllerForAllNamespaces( }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1ReplicationControllerForAllNamespaces( @@ -4281,7 +4070,7 @@ export function listCoreV1ReplicationControllerForAllNamespaces( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/replicationcontrollers`, @@ -4305,16 +4094,14 @@ export function listCoreV1ReplicationControllerForAllNamespaces( export function listCoreV1ResourceQuotaForAllNamespaces( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listCoreV1ResourceQuotaForAllNamespaces( args: ListCoreV1ResourceQuotaForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1ResourceQuotaForAllNamespaces( @@ -4322,7 +4109,7 @@ export function listCoreV1ResourceQuotaForAllNamespaces( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/resourcequotas`, @@ -4346,20 +4133,16 @@ export function listCoreV1ResourceQuotaForAllNamespaces( export function listCoreV1SecretForAllNamespaces( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1SecretForAllNamespaces( args: ListCoreV1SecretForAllNamespacesApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1SecretForAllNamespaces(args: any, options: any): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/secrets`, params: { @@ -4382,16 +4165,14 @@ export function listCoreV1SecretForAllNamespaces(args: any, options: any): any { export function listCoreV1ServiceAccountForAllNamespaces( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listCoreV1ServiceAccountForAllNamespaces( args: ListCoreV1ServiceAccountForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listCoreV1ServiceAccountForAllNamespaces( @@ -4399,7 +4180,7 @@ export function listCoreV1ServiceAccountForAllNamespaces( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/serviceaccounts`, @@ -4423,23 +4204,19 @@ export function listCoreV1ServiceAccountForAllNamespaces( export function listCoreV1ServiceForAllNamespaces( args: NoWatch, options?: Options -): Promise> +): Promise> export function listCoreV1ServiceForAllNamespaces( args: ListCoreV1ServiceForAllNamespacesApiArg & { watch: true }, options: Options & - WatchExtraOptions< - MinimumRequiredList - > + WatchExtraOptions> ): Promise export function listCoreV1ServiceForAllNamespaces( args: any, options: any ): any { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/services`, params: { @@ -4464,7 +4241,7 @@ export const watchCoreV1ConfigMapListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/configmaps`, @@ -4490,7 +4267,7 @@ export const watchCoreV1EndpointsListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/endpoints`, @@ -4515,9 +4292,7 @@ export const watchCoreV1EventListForAllNamespaces = ( args: WatchCoreV1EventListForAllNamespacesApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/events`, params: { @@ -4542,7 +4317,7 @@ export const watchCoreV1LimitRangeListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/limitranges`, @@ -4567,7 +4342,7 @@ export const watchCoreV1NamespaceList = ( args: WatchCoreV1NamespaceListApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/namespaces`, params: { @@ -4591,9 +4366,7 @@ export const watchCoreV1NamespacedConfigMapList = ( args: WatchCoreV1NamespacedConfigMapListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/configmaps`, params: { @@ -4617,9 +4390,7 @@ export const watchCoreV1NamespacedConfigMap = ( args: WatchCoreV1NamespacedConfigMapApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/configmaps/${args.name}`, params: { @@ -4643,9 +4414,7 @@ export const watchCoreV1NamespacedEndpointsList = ( args: WatchCoreV1NamespacedEndpointsListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/endpoints`, params: { @@ -4669,9 +4438,7 @@ export const watchCoreV1NamespacedEndpoints = ( args: WatchCoreV1NamespacedEndpointsApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/endpoints/${args.name}`, params: { @@ -4695,9 +4462,7 @@ export const watchCoreV1NamespacedEventList = ( args: WatchCoreV1NamespacedEventListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/events`, params: { @@ -4721,7 +4486,7 @@ export const watchCoreV1NamespacedEvent = ( args: WatchCoreV1NamespacedEventApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/events/${args.name}`, params: { @@ -4745,9 +4510,7 @@ export const watchCoreV1NamespacedLimitRangeList = ( args: WatchCoreV1NamespacedLimitRangeListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/limitranges`, params: { @@ -4771,9 +4534,7 @@ export const watchCoreV1NamespacedLimitRange = ( args: WatchCoreV1NamespacedLimitRangeApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/limitranges/${args.name}`, params: { @@ -4798,7 +4559,7 @@ export const watchCoreV1NamespacedPersistentVolumeClaimList = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/namespaces/${args['namespace']}/persistentvolumeclaims`, @@ -4824,7 +4585,7 @@ export const watchCoreV1NamespacedPersistentVolumeClaim = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/namespaces/${args['namespace']}/persistentvolumeclaims/${args.name}`, @@ -4849,9 +4610,7 @@ export const watchCoreV1NamespacedPodList = ( args: WatchCoreV1NamespacedPodListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/pods`, params: { @@ -4875,7 +4634,7 @@ export const watchCoreV1NamespacedPod = ( args: WatchCoreV1NamespacedPodApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/pods/${args.name}`, params: { @@ -4899,9 +4658,7 @@ export const watchCoreV1NamespacedPodTemplateList = ( args: WatchCoreV1NamespacedPodTemplateListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/podtemplates`, params: { @@ -4925,9 +4682,7 @@ export const watchCoreV1NamespacedPodTemplate = ( args: WatchCoreV1NamespacedPodTemplateApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/podtemplates/${args.name}`, params: { @@ -4952,7 +4707,7 @@ export const watchCoreV1NamespacedReplicationControllerList = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/namespaces/${args['namespace']}/replicationcontrollers`, @@ -4978,7 +4733,7 @@ export const watchCoreV1NamespacedReplicationController = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/namespaces/${args['namespace']}/replicationcontrollers/${args.name}`, @@ -5004,7 +4759,7 @@ export const watchCoreV1NamespacedResourceQuotaList = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/namespaces/${args['namespace']}/resourcequotas`, @@ -5029,9 +4784,7 @@ export const watchCoreV1NamespacedResourceQuota = ( args: WatchCoreV1NamespacedResourceQuotaApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/resourcequotas/${args.name}`, params: { @@ -5055,9 +4808,7 @@ export const watchCoreV1NamespacedSecretList = ( args: WatchCoreV1NamespacedSecretListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/secrets`, params: { @@ -5081,7 +4832,7 @@ export const watchCoreV1NamespacedSecret = ( args: WatchCoreV1NamespacedSecretApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/secrets/${args.name}`, params: { @@ -5106,7 +4857,7 @@ export const watchCoreV1NamespacedServiceAccountList = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/namespaces/${args['namespace']}/serviceaccounts`, @@ -5131,9 +4882,7 @@ export const watchCoreV1NamespacedServiceAccount = ( args: WatchCoreV1NamespacedServiceAccountApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/serviceaccounts/${args.name}`, params: { @@ -5157,9 +4906,7 @@ export const watchCoreV1NamespacedServiceList = ( args: WatchCoreV1NamespacedServiceListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/services`, params: { @@ -5183,9 +4930,7 @@ export const watchCoreV1NamespacedService = ( args: WatchCoreV1NamespacedServiceApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/namespaces/${args['namespace']}/services/${args.name}`, params: { @@ -5209,7 +4954,7 @@ export const watchCoreV1Namespace = ( args: WatchCoreV1NamespaceApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/namespaces/${args.name}`, params: { @@ -5233,7 +4978,7 @@ export const watchCoreV1NodeList = ( args: WatchCoreV1NodeListApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/nodes`, params: { @@ -5257,7 +5002,7 @@ export const watchCoreV1Node = ( args: WatchCoreV1NodeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/nodes/${args.name}`, params: { @@ -5282,7 +5027,7 @@ export const watchCoreV1PersistentVolumeClaimListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/persistentvolumeclaims`, @@ -5307,9 +5052,7 @@ export const watchCoreV1PersistentVolumeList = ( args: WatchCoreV1PersistentVolumeListApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/persistentvolumes`, params: { @@ -5333,7 +5076,7 @@ export const watchCoreV1PersistentVolume = ( args: WatchCoreV1PersistentVolumeApiArg, options?: Options ) => { - return apiClient>( + return apiClient>( { path: `/api/v1/watch/persistentvolumes/${args.name}`, params: { @@ -5357,9 +5100,7 @@ export const watchCoreV1PodListForAllNamespaces = ( args: WatchCoreV1PodListForAllNamespacesApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredList - >( + return apiClient>( { path: `/api/v1/watch/pods`, params: { @@ -5384,7 +5125,7 @@ export const watchCoreV1PodTemplateListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/podtemplates`, @@ -5410,7 +5151,7 @@ export const watchCoreV1ReplicationControllerListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/replicationcontrollers`, @@ -5436,7 +5177,7 @@ export const watchCoreV1ResourceQuotaListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/resourcequotas`, @@ -5462,7 +5203,7 @@ export const watchCoreV1SecretListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/secrets`, @@ -5488,7 +5229,7 @@ export const watchCoreV1ServiceAccountListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/serviceaccounts`, @@ -5514,7 +5255,7 @@ export const watchCoreV1ServiceListForAllNamespaces = ( options?: Options ) => { return apiClient< - MinimumRequiredList + StrictList >( { path: `/api/v1/watch/services`, diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/kubekit-v1.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/kubekit-v1.ts index d6c0e775..cd615bac 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/src/kubekit-v1.ts +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/kubekit-v1.ts @@ -3,7 +3,7 @@ import { type Options, type WatchExtraOptions, } from '@kubekit/client' -type Id = { +export type Id = { [K in keyof T]: T[K] } & {} type NoWatch = Omit & { @@ -12,10 +12,10 @@ type NoWatch = Omit & { type RequiredAndDefined = { [P in keyof T]-?: Exclude } -type PartialRequired = Id< +export type PartialRequired = Id< RequiredAndDefined> & Omit > -type MinimumRequiredGet = Id< +export type Strict = Id< T extends { metadata?: any apiVersion?: any @@ -27,12 +27,12 @@ type MinimumRequiredGet = Id< > & { metadata: PartialRequired< RequiredAndDefined['metadata'], - 'name' | 'namespace' | 'creationTimestamp' | 'resourceVersion' + 'name' | 'namespace' | 'creationTimestamp' | 'resourceVersion' | 'uid' > } : T > -type MinimumRequiredList = Id< +type StrictList = Id< T extends { items: { metadata?: any @@ -41,23 +41,21 @@ type MinimumRequiredList = Id< }[] } ? Omit & { - items: MinimumRequiredGet[] + items: Strict[] } : T > export function listKubekitComV1NamespacedNginxCluster( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listKubekitComV1NamespacedNginxCluster( args: ListKubekitComV1NamespacedNginxClusterApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listKubekitComV1NamespacedNginxCluster( @@ -65,7 +63,7 @@ export function listKubekitComV1NamespacedNginxCluster( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters`, @@ -90,9 +88,7 @@ export const createKubekitComV1NamespacedNginxCluster = ( args: CreateKubekitComV1NamespacedNginxClusterApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters`, method: 'POST', @@ -113,7 +109,7 @@ export const deleteKubekitComV1CollectionNamespacedNginxCluster = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters`, @@ -139,9 +135,7 @@ export const readKubekitComV1NamespacedNginxCluster = ( args: ReadKubekitComV1NamespacedNginxClusterApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters/${args.name}`, params: { pretty: args.pretty, resourceVersion: args.resourceVersion }, @@ -154,7 +148,7 @@ export const replaceKubekitComV1NamespacedNginxCluster = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters/${args.name}`, @@ -175,9 +169,7 @@ export const deleteKubekitComV1NamespacedNginxCluster = ( args: DeleteKubekitComV1NamespacedNginxClusterApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters/${args.name}`, method: 'DELETE', @@ -198,9 +190,7 @@ export const patchKubekitComV1NamespacedNginxCluster = ( args: PatchKubekitComV1NamespacedNginxClusterApiArg, options?: Options ) => { - return apiClient< - MinimumRequiredGet - >( + return apiClient>( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters/${args.name}`, method: 'PATCH', @@ -222,7 +212,7 @@ export const readKubekitComV1NamespacedNginxClusterStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters/${args.name}/status`, @@ -236,7 +226,7 @@ export const replaceKubekitComV1NamespacedNginxClusterStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters/${args.name}/status`, @@ -258,7 +248,7 @@ export const patchKubekitComV1NamespacedNginxClusterStatus = ( options?: Options ) => { return apiClient< - MinimumRequiredGet + Strict >( { path: `/apis/kubekit.com/v1/namespaces/${args['namespace']}/nginxclusters/${args.name}/status`, @@ -279,16 +269,14 @@ export const patchKubekitComV1NamespacedNginxClusterStatus = ( export function listKubekitComV1NginxClusterForAllNamespaces( args: NoWatch, options?: Options -): Promise< - MinimumRequiredList -> +): Promise> export function listKubekitComV1NginxClusterForAllNamespaces( args: ListKubekitComV1NginxClusterForAllNamespacesApiArg & { watch: true }, options: Options & WatchExtraOptions< - MinimumRequiredList + StrictList > ): Promise export function listKubekitComV1NginxClusterForAllNamespaces( @@ -296,7 +284,7 @@ export function listKubekitComV1NginxClusterForAllNamespaces( options: any ): any { return apiClient< - MinimumRequiredList + StrictList >( { path: `/apis/kubekit.com/v1/nginxclusters`, diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/leaderElection.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/leaderElection.ts index 49314b1e..d3709b40 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/src/leaderElection.ts +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/leaderElection.ts @@ -12,6 +12,7 @@ import { const leaseDurationSeconds = 15 const renewPeriodSeconds = 10 +const checkPeriodSeconds = 3 function renewTime() { return getISODateWithMicroseconds( @@ -30,7 +31,7 @@ async function renewLease( name, contentType: 'application/apply-patch+yaml', fieldManager: controllerName, - fieldValidation: "Strict", + fieldValidation: 'Strict', body: { apiVersion: 'coordination.k8s.io/v1', kind: 'Lease', @@ -39,8 +40,8 @@ async function renewLease( name, namespace, labels: { - [controllerName]: "true" - } + [controllerName]: 'true', + }, }, spec: { holderIdentity, @@ -79,46 +80,39 @@ async function leaderElection( ) if (currentHolderIdentity === holderIdentity) { - if (nowMillSeconds > renewTimeMillSeconds) { - await renewLease( - namespace, - name, - holderIdentity, - lease.metadata.resourceVersion - ) - return { - type: 'success', - } - } + await renewLease( + namespace, + name, + holderIdentity, + lease.metadata.resourceVersion + ) return { - type: 'failed', - waitMillSeconds: Math.min( - renewTimeMillSeconds - nowMillSeconds, - leaseDurationSeconds * 1000 - ), - } - } else { - const leaseDurationTimeMillSeconds = - renewTimeMillSeconds + (lease.spec?.leaseDurationSeconds || 0) * 1000 - if (leaseDurationTimeMillSeconds <= nowMillSeconds) { - await renewLease( - namespace, - name, - holderIdentity, - lease.metadata.resourceVersion - ) - return { - type: 'success', - } + type: 'success', } + } + + const leaseDurationTimeMillSeconds = + renewTimeMillSeconds + (lease.spec?.leaseDurationSeconds || 0) * 1000 + if (leaseDurationTimeMillSeconds <= nowMillSeconds) { + await renewLease( + namespace, + name, + holderIdentity, + lease.metadata.resourceVersion + ) return { - type: 'failed', - waitMillSeconds: Math.min( - leaseDurationTimeMillSeconds - nowMillSeconds, - leaseDurationSeconds * 1000 - ), + type: 'success', } } + return { + type: 'failed', + // The lease should be checked 1 millisecond after the lease expires. + // However, we do not wait longer than checkPeriodSeconds because the leased resource itself may have been deleted due to external factors. + waitMillSeconds: Math.min( + leaseDurationTimeMillSeconds - nowMillSeconds + 1, + checkPeriodSeconds * 1000 + ), + } } else { try { await renewLease(namespace, name, holderIdentity) @@ -128,7 +122,7 @@ async function leaderElection( } catch (e) { return { type: 'failed', - waitMillSeconds: 1000, + waitMillSeconds: checkPeriodSeconds, } } } @@ -136,7 +130,7 @@ async function leaderElection( console.log(`Failed to acquire lease, attempting to renew: ${e}`) return { type: 'failed', - waitMillSeconds: 1000, + waitMillSeconds: checkPeriodSeconds, } } } @@ -144,8 +138,11 @@ async function leaderElection( export function leaderElector(signal: AbortSignal) { let hasBecameLeaderOnce = false let becameLeaderHandler: (value: void) => void + const becameReaderPromise = new Promise((resolver, reject) => { - becameLeaderHandler = resolver + becameLeaderHandler = () => { + resolver() + } signal.addEventListener('abort', () => { reject(new DOMException('The operation was aborted', 'AbortError')) }) @@ -159,6 +156,7 @@ export function leaderElector(signal: AbortSignal) { }) }) + const controller = new AbortController() let stop = false signal.addEventListener('abort', () => { stop = true @@ -166,6 +164,33 @@ export function leaderElector(signal: AbortSignal) { let waitMillSeconds = 0 + listCoordinationV1NamespacedLease( + { + namespace: controllerNamespace, + labelSelector: `${controllerName}=true`, + watch: true, + }, + { + signal: controller.signal, + watchHandler: ({ object: lease, type }) => { + if (!hasBecameLeaderOnce) { + return + } + if (type === 'DELETED') { + lostLeaderHandler() + controller.abort() + console.info('Lost leadership') + return + } + if (lease.spec?.holderIdentity !== holderIdentity) { + lostLeaderHandler() + controller.abort() + console.info('Lost leadership') + } + }, + } + ).catch(() => {}) + async function startElectLeaderLoop(): Promise { while (true) { if (stop) { @@ -181,7 +206,11 @@ export function leaderElector(signal: AbortSignal) { ) switch (result.type) { case 'success': - console.info('Successfully elected as leader') + if (hasBecameLeaderOnce) { + console.info('Successfully maintained leadership') + } else { + console.info('Successfully elected as leader') + } hasBecameLeaderOnce = true becameLeaderHandler() waitMillSeconds = renewPeriodSeconds * 1000 diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/main.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/main.ts index 372e9bff..81331c2f 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/src/main.ts +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/main.ts @@ -1,7 +1,11 @@ import { leaderElector } from './leaderElection' -import { nginxClusterController } from './nginxClusterController' +import { + nginxClusterController, + getInitialState, +} from './nginxClusterController' async function main() { + let state = getInitialState() let stop = false while (!stop) { const controller = new AbortController() @@ -20,6 +24,7 @@ async function main() { lostLeadershipPromise .then(() => controller.abort()) .catch(abortErrorHandler) + startElectLeaderLoop().catch(abortErrorHandler) try { @@ -27,7 +32,7 @@ async function main() { await becameReaderPromise console.debug('[main] Became leader') - await nginxClusterController(controller.signal) + await nginxClusterController(state, controller.signal) } catch (e: any) { abortErrorHandler(e) } diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/nginxClusterController.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/nginxClusterController.ts index 06057796..26185eb6 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/src/nginxClusterController.ts +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/nginxClusterController.ts @@ -1,51 +1,43 @@ +import { TaskQueue } from '@kubekit/client' import { - createCoreV1NamespacedPod, deleteCoreV1CollectionNamespacedPod, - deleteCoreV1NamespacedPod, listCoreV1PodForAllNamespaces, - type IoK8SApiCoreV1Pod, } from './core-v1' import { - type ComKubekitV1NginxCluster, listKubekitComV1NginxClusterForAllNamespaces, patchKubekitComV1NamespacedNginxCluster, - patchKubekitComV1NamespacedNginxClusterStatus, } from './kubekit-v1' -import { controllerName } from './type' +import { + type NginxCluster, + type Pods, + type ReconcileNginxClusterContext, + controllerName, + labelKey, +} from './type' +import { reconcileNginxCluster } from './reconcileNginxCluster' -type Id = { - [K in keyof T]: T[K] -} & {} -type RequiredAndDefined = { - [P in keyof T]-?: Exclude +type NginxClusters = Map +type ControllerState = { + podResourceVersion: string + nginxClusterResourceVersion: string + nginxClusters: NginxClusters + pods: Pods } -type PartialRequired = Id< - RequiredAndDefined> & Omit -> -type MinimumRequiredGet = Id< - T extends { - metadata?: any - apiVersion?: any - kind?: any +export function getInitialState(): ControllerState { + return { + podResourceVersion: '', + nginxClusterResourceVersion: '', + nginxClusters: new Map(), + pods: new Map(), } - ? Omit< - PartialRequired, - 'metadata' - > & { - metadata: PartialRequired< - RequiredAndDefined['metadata'], - 'name' | 'namespace' | 'creationTimestamp' | 'resourceVersion' - > - } - : T -> +} -const labelKey = 'nginx-cluster-name' -type Pods = Map> -type NginxCluster = MinimumRequiredGet -type NginxClusters = Map -export async function nginxClusterController(signal: AbortSignal) { +export async function nginxClusterController( + state: ControllerState, + signal: AbortSignal +) { const controllerCtx: Record = {} + const { nginxClusters, pods } = state const getControllerCtx = (key: string) => { if (!controllerCtx[key]) { controllerCtx[key] = { @@ -57,11 +49,6 @@ export async function nginxClusterController(signal: AbortSignal) { const deleteControllerCtx = (key: string) => { delete controllerCtx[key] } - let podResourceVersion = '' - const pods: Pods = new Map() - - let nginxClusterResourceVersion = '' - const nginxClusters: NginxClusters = new Map() async function finalizeNginxCluster(nginxCluster: NginxCluster) { console.debug('[DEBUG] finalize NginxCluster', nginxCluster.metadata.name) @@ -77,27 +64,19 @@ export async function nginxClusterController(signal: AbortSignal) { await Promise.all(tasks) } - async function reconcileNginxClusters() { - await Promise.all( - [...nginxClusters.values()].map((nginxCluster) => { - reconcileNginxCluster( - nginxCluster, - pods, - getControllerCtx( - `${nginxCluster.metadata.namespace}/${nginxCluster.metadata.name}` - ) - ) - }) - ) - } + const taskQueue = new TaskQueue() + taskQueue.pause() - const initializedState = { + const syncedState = { nginxClusters: false, pods: false, } - const isAllInitialized = () => - initializedState.nginxClusters && initializedState.pods + signal.addEventListener('abort', () => { + taskQueue.pause() + }) + + const isAllSynced = () => syncedState.nginxClusters && syncedState.pods await Promise.all([ listKubekitComV1NginxClusterForAllNamespaces( @@ -105,21 +84,16 @@ export async function nginxClusterController(signal: AbortSignal) { watch: true, sendInitialEvents: true, resourceVersionMatch: 'NotOlderThan', - resourceVersion: nginxClusterResourceVersion, + resourceVersion: state.nginxClusterResourceVersion, }, { - initializedHandler: async (ctx) => { - initializedState.nginxClusters = true - if (isAllInitialized()) { - console.debug('[NginxCluster] Initializing') - await reconcileNginxClusters() - nginxClusterResourceVersion = ctx.resourceVersion - console.debug('[NginxCluster] Initialized') + syncedHandler: async () => { + syncedState.nginxClusters = true + if (isAllSynced()) { + taskQueue.resume() } }, - watchHandler: async ({ object: nginxCluster, type }, ctx) => { - initializedState.nginxClusters = ctx.isInitialized - + watchHandler: async ({ object: nginxCluster, type }) => { const key = `${nginxCluster.metadata.namespace}/${nginxCluster.metadata.name}` if (type === 'DELETED') { nginxClusters.delete(key) @@ -131,18 +105,17 @@ export async function nginxClusterController(signal: AbortSignal) { nginxClusters.set(key, nginxCluster) - if (!isAllInitialized()) { - return - } - - await reconcileNginxCluster( - nginxCluster, - pods, - getControllerCtx( - `${nginxCluster.metadata.namespace}/${nginxCluster.metadata.name}` - ) - ) - nginxClusterResourceVersion = ctx.resourceVersion + taskQueue.addTask({ + key: TaskQueue.getKey(nginxCluster), + task: () => + reconcileNginxCluster( + nginxCluster, + pods, + getControllerCtx( + `${nginxCluster.metadata.namespace}/${nginxCluster.metadata.name}` + ) + ), + }) }, finalizeHandler: async ({ object: nginxCluster }, ctx) => { const i = nginxCluster.metadata.finalizers.findIndex( @@ -160,12 +133,13 @@ export async function nginxClusterController(signal: AbortSignal) { body: [{ op: 'remove', path: `/metadata/finalizers/${i}` }], }) - nginxClusterResourceVersion = ctx.resourceVersion + state.nginxClusterResourceVersion = ctx.resourceVersion }, signal, - wait: 0, - maxWait: 0, - concurrency: 4, + maxRetries: Infinity, + onError: () => { + syncedState.nginxClusters = false + }, } ), listCoreV1PodForAllNamespaces( @@ -173,20 +147,18 @@ export async function nginxClusterController(signal: AbortSignal) { watch: true, sendInitialEvents: true, resourceVersionMatch: 'NotOlderThan', - resourceVersion: podResourceVersion, + resourceVersion: state.podResourceVersion, labelSelector: labelKey, }, { - initializedHandler: async (ctx) => { - initializedState.pods = true - if (isAllInitialized()) { - await reconcileNginxClusters() - nginxClusterResourceVersion = ctx.resourceVersion + syncedHandler: async () => { + syncedState.pods = true + if (isAllSynced()) { + taskQueue.resume() } }, watchHandler: async ({ object: pod, type }, ctx) => { - initializedState.pods = ctx.isInitialized - podResourceVersion = ctx.resourceVersion + state.podResourceVersion = ctx.resourceVersion const nginxClusterName = pod.metadata.labels?.[labelKey] if (!nginxClusterName) { @@ -213,126 +185,38 @@ export async function nginxClusterController(signal: AbortSignal) { } } case 'MODIFIED': - pods.set(podKey, pod) + pods.set(podKey, { + metadata: pod.metadata, + }) break } - if (!isAllInitialized()) { - return - } if (!nginxCluster) { - console.warn( - `[WARN] nginxCluster with name ${nginxClusterName} does not exist.` - ) + if (syncedState.nginxClusters) { + console.warn( + `[WARN] nginxCluster with name ${nginxClusterName} does not exist.` + ) + } return } - console.debug('[Pod] kick reconcile nginx cluster', type) - await reconcileNginxCluster( - nginxCluster, - pods, - getControllerCtx( - `${nginxCluster.metadata.namespace}/${nginxCluster.metadata.name}` - ) - ) - console.debug('[Pod] done reconcile nginx cluster', type) + taskQueue.addTask({ + key: TaskQueue.getKey(nginxCluster), + task: () => + reconcileNginxCluster( + nginxCluster, + pods, + getControllerCtx( + `${nginxCluster.metadata.namespace}/${nginxCluster.metadata.name}` + ) + ), + }) }, signal, - wait: 0, - maxWait: 0, - concurrency: 4, + maxRetries: Infinity, + onError: () => { + syncedState.pods = false + }, } ), ]) } - -type ReconcileNginxClusterContext = { pendingCreate: number } -async function reconcileNginxCluster( - nginxCluster: NginxCluster, - pods: Pods, - ctx: ReconcileNginxClusterContext -) { - console.debug('[Reconcile] Start Reconcile', ctx) - const activePods = [...pods.values()].filter( - (pod) => - pod.metadata.labels?.[labelKey] === nginxCluster.metadata.name && - !pod.metadata.deletionTimestamp - ) - const currentPodNum = activePods.length + ctx.pendingCreate - let createPodNum = nginxCluster.spec!.replicas! - currentPodNum - const tasks: Promise[] = [] - const namespace = nginxCluster.metadata.namespace - if (createPodNum > 0) { - for (let i = 0; i < createPodNum; i++) { - ctx.pendingCreate++ - tasks.push( - createCoreV1NamespacedPod({ - namespace, - fieldManager: controllerName, - fieldValidation: 'Strict', - body: { - apiVersion: 'v1', - kind: 'Pod', - metadata: { - generateName: nginxCluster.metadata.name, - labels: { - ...nginxCluster.metadata.labels, - [labelKey]: nginxCluster.metadata.name, - }, - namespace, - }, - spec: { - containers: [ - { - image: 'nginx', - name: 'nginx', - resources: nginxCluster.spec!.resources, - }, - ], - dnsPolicy: 'ClusterFirst', - restartPolicy: 'Never', - }, - status: {}, - }, - }) - ) - } - } else if (createPodNum < 0) { - const deletePods = activePods.slice(0, Math.abs(createPodNum)) - console.debug( - `[Reconcile] deletePods`, - deletePods.map((p) => p.metadata.name) - ) - for (const pod of deletePods) { - pods.delete(`${namespace}/${pod.metadata.name}`) - tasks.push( - deleteCoreV1NamespacedPod({ - name: pod.metadata.name, - namespace, - contentType: 'application/json', - body: { - propagationPolicy: 'Foreground', - }, - }) - ) - } - } - - await Promise.all(tasks) - if (!nginxCluster.status?.ready) { - await patchKubekitComV1NamespacedNginxClusterStatus({ - namespace: nginxCluster.metadata.namespace, - name: nginxCluster.metadata.name, - contentType: 'application/apply-patch+yaml', - fieldManager: controllerName, - body: { - apiVersion: 'kubekit.com/v1', - kind: 'NginxCluster', - status: { - ready: true, - }, - }, - }) - } - - console.debug('[DEBUG] Successful Reconcile') -} diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/reconcileNginxCluster.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/reconcileNginxCluster.ts new file mode 100644 index 00000000..edd8c25d --- /dev/null +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/reconcileNginxCluster.ts @@ -0,0 +1,138 @@ +import { createCoreV1NamespacedPod, deleteCoreV1NamespacedPod } from './core-v1' +import { patchKubekitComV1NamespacedNginxClusterStatus } from './kubekit-v1' +import { + type NginxCluster, + type Pods, + type ReconcileNginxClusterContext, + controllerName, + labelKey, +} from './type' +import hash from 'object-hash' + +export async function reconcileNginxCluster( + nginxCluster: NginxCluster, + pods: Pods, + ctx: ReconcileNginxClusterContext +) { + console.debug({ + message: '[Reconcile] Start Reconcile', + name: nginxCluster.metadata.name, + namespace: nginxCluster.metadata.namespace, + }) + const nginxClusterHash = hash(nginxCluster.spec!.resources!) + const managedPods = [...pods.values()].filter( + (pod) => + pod.metadata.labels?.[labelKey] === nginxCluster.metadata.name && + !pod.metadata.deletionTimestamp + ) + const validPods = managedPods.filter( + (pod) => + pod.metadata.annotations?.['nginx-cluster-hash'] === nginxClusterHash + ) + const invalidPods = managedPods.filter( + (pod) => + pod.metadata.annotations?.['nginx-cluster-hash'] !== nginxClusterHash + ) + let createPodNum = + nginxCluster.spec!.replicas! - + validPods.length + + ctx.pendingCreate - + invalidPods.length + const tasks: Promise[] = [] + const namespace = nginxCluster.metadata.namespace + if (createPodNum > 0) { + for (let i = 0; i < createPodNum; i++) { + ctx.pendingCreate++ + tasks.push( + createCoreV1NamespacedPod({ + namespace, + fieldManager: controllerName, + fieldValidation: 'Strict', + body: { + apiVersion: 'v1', + kind: 'Pod', + metadata: { + generateName: nginxCluster.metadata.name, + ownerReferences: [ + { + apiVersion: nginxCluster.apiVersion, + kind: nginxCluster.kind, + blockOwnerDeletion: true, + controller: true, + name: nginxCluster.metadata.name, + uid: nginxCluster.metadata.uid, + }, + ], + annotations: { + 'nginx-cluster-hash': nginxClusterHash, + }, + labels: { + ...nginxCluster.metadata.labels, + [labelKey]: nginxCluster.metadata.name, + }, + namespace, + }, + spec: { + containers: [ + { + image: 'nginx', + name: 'nginx', + resources: nginxCluster.spec!.resources, + }, + ], + dnsPolicy: 'ClusterFirst', + restartPolicy: 'Never', + }, + status: {}, + }, + }) + ) + } + } + if (createPodNum < 0 || invalidPods.length > 0) { + const deletePods = [ + ...invalidPods, + ...managedPods.slice(0, Math.abs(createPodNum) - invalidPods.length), + ] + console.debug({ + message: '[Reconcile] deletePods', + podNames: deletePods.map((p) => p.metadata.name), + }) + for (const pod of deletePods) { + pods.delete(`${namespace}/${pod.metadata.name}`) + tasks.push( + deleteCoreV1NamespacedPod({ + name: pod.metadata.name, + namespace, + contentType: 'application/json', + body: { + propagationPolicy: 'Foreground', + }, + }).catch((e) => { + if (e['code'] !== 404) { + pods.set(`${namespace}/${pod.metadata.name}`, pod) + } + }) + ) + } + } + + await Promise.all(tasks) + if (!nginxCluster.status?.ready) { + await patchKubekitComV1NamespacedNginxClusterStatus({ + namespace: nginxCluster.metadata.namespace, + name: nginxCluster.metadata.name, + contentType: 'application/apply-patch+yaml', + fieldManager: controllerName, + body: { + apiVersion: 'kubekit.com/v1', + kind: 'NginxCluster', + status: { + ready: true, + }, + }, + }) + } + + console.debug('[DEBUG] Successful Reconcile') +} diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/src/type.ts b/examples/nginx-cluster-controller-with-kubekit-sync/src/type.ts index 362b3509..f2c1428f 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/src/type.ts +++ b/examples/nginx-cluster-controller-with-kubekit-sync/src/type.ts @@ -1,19 +1,19 @@ +import { type IoK8SApiCoreV1Pod, type Strict } from './core-v1' + +import { type ComKubekitV1NginxCluster } from './kubekit-v1' + export const controllerName = 'kubekit.com/nginx-cluster' export const leaderName = process.env['LEADER_NAME'] || 'kubekit-com-nginx-cluster' export const holderIdentity = process.env['POD_NAME'] || crypto.randomUUID() export const controllerNamespace = process.env['POD_NAMESPACE'] || 'default' -console.info( - '[CONFIG]', - JSON.stringify( - { - controllerName, - leaderName, - holderIdentity, - controllerNamespace, - }, - null, - 2 - ) -) +export const labelKey = 'nginx-cluster-name' +export type Pods = Map< + string, + { + metadata: Strict['metadata'] + } +> +export type NginxCluster = Strict +export type ReconcileNginxClusterContext = { pendingCreate: number } diff --git a/examples/nginx-cluster-controller-with-kubekit-sync/yarn.lock b/examples/nginx-cluster-controller-with-kubekit-sync/yarn.lock index 8a4fc41c..e1a19741 100644 --- a/examples/nginx-cluster-controller-with-kubekit-sync/yarn.lock +++ b/examples/nginx-cluster-controller-with-kubekit-sync/yarn.lock @@ -164,6 +164,16 @@ resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@jsep-plugin/assignment@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jsep-plugin/assignment/-/assignment-1.2.1.tgz#07277bdd7862451a865d391e2142efba33f46c9b" + integrity sha512-gaHqbubTi29aZpVbBlECRpmdia+L5/lh2BwtIJTmtxdbecEyyX/ejAOg7eQDGNvGOUmPY7Z2Yxdy9ioyH/VJeA== + +"@jsep-plugin/regex@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@jsep-plugin/regex/-/regex-1.0.3.tgz#3aeaa2e5fa45d89de116aeafbfa41c95935b7f6d" + integrity sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug== + "@kahirokunn/oazapfts-patched@^0.0.1": version "0.0.1" resolved "https://registry.yarnpkg.com/@kahirokunn/oazapfts-patched/-/oazapfts-patched-0.0.1.tgz#b045605c466cdc99451175072d1af33bd22dca49" @@ -175,10 +185,10 @@ swagger2openapi "^7.0.8" typescript "^5.2.2" -"@kubekit/client-gen@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@kubekit/client-gen/-/client-gen-0.1.0.tgz#1ca6fed356bebc89b28bdd712ddda737ec4c615a" - integrity sha512-ew5s+Mm4mCPDi9GraFOsizDBBs3qW3Bps7ae67o2JnVVNAABaAfUwSW1VVT3OSNatsaWECQmBxOSIepkSFK19Q== +"@kubekit/client-gen@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@kubekit/client-gen/-/client-gen-0.1.4.tgz#412450770a5b47fa6e93eaee323924db86fed162" + integrity sha512-czjtFvcqdNN2c1BdpLdX3WE/iGa9IaZje9T5SbTXYpijaFIA4YoGwmgNk6wIr5g24e3xIFxcRmGhv2hP/nq3yw== dependencies: "@apidevtools/swagger-parser" "^10.0.2" "@kahirokunn/oazapfts-patched" "^0.0.1" @@ -188,12 +198,16 @@ semver "^7.3.5" swagger2openapi "^7.0.4" -"@kubekit/client@0.1.18": - version "0.1.18" - resolved "https://registry.yarnpkg.com/@kubekit/client/-/client-0.1.18.tgz#3828204f291a8731d318eb1d76bcb01465048d7d" - integrity sha512-0WUBoZSaDmN2HxS0DLXAu3JBhU1cLcwPrG78c/7VdVKRF/rzap3gmuHyqWaQ8JuNdTuWzDwics9SX9NOUMxbpg== +"@kubekit/client@0.2.10": + version "0.2.10" + resolved "https://registry.yarnpkg.com/@kubekit/client/-/client-0.2.10.tgz#63cb24a29f1a37d37866ccc6c35849d92010c0e0" + integrity sha512-pz5hHMJCidEjZ2reFvgOBgJR0A20Qo8RKzE9QAzUhkI+vVJi30wBKWhFgNG4HkUdDRhiQ3qJmoctC02PE8GADQ== dependencies: - "@kubernetes/client-node" "^0.20.0" + js-yaml "^4.1.0" + jsonpath-plus "^9.0.0" + openid-client "^5.6.5" + request "^2.88.2" + rfc4648 "^1.5.3" undici "^5.28.3" "@kubekit/sync@0.1.3": @@ -203,66 +217,17 @@ dependencies: ts-retry-promise "^0.8.0" -"@kubernetes/client-node@^0.20.0": - version "0.20.0" - resolved "https://registry.yarnpkg.com/@kubernetes/client-node/-/client-node-0.20.0.tgz#4447ae27fd6eef3d4830a5a039f3b84ffd5c5913" - integrity sha512-xxlv5GLX4FVR/dDKEsmi4SPeuB49aRc35stndyxcC73XnUEEwF39vXbROpHOirmDse8WE9vxOjABnSVS+jb7EA== - dependencies: - "@types/js-yaml" "^4.0.1" - "@types/node" "^20.1.1" - "@types/request" "^2.47.1" - "@types/ws" "^8.5.3" - byline "^5.0.0" - isomorphic-ws "^5.0.0" - js-yaml "^4.1.0" - jsonpath-plus "^7.2.0" - request "^2.88.0" - rfc4648 "^1.3.0" - stream-buffers "^3.0.2" - tar "^6.1.11" - tslib "^2.4.1" - ws "^8.11.0" - optionalDependencies: - openid-client "^5.3.0" - -"@types/caseless@*": - version "0.12.5" - resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.5.tgz#db9468cb1b1b5a925b8f34822f1669df0c5472f5" - integrity sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg== - -"@types/js-yaml@^4.0.1": - version "4.0.9" - resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2" - integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg== - -"@types/node@*", "@types/node@^20.1.1": - version "20.11.30" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.30.tgz#9c33467fc23167a347e73834f788f4b9f399d66f" - integrity sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw== +"@types/node@^20.12.12": + version "20.12.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.12.tgz#7cbecdf902085cec634fdb362172dfe12b8f2050" + integrity sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw== dependencies: undici-types "~5.26.4" -"@types/request@^2.47.1": - version "2.48.12" - resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.12.tgz#0f590f615a10f87da18e9790ac94c29ec4c5ef30" - integrity sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw== - dependencies: - "@types/caseless" "*" - "@types/node" "*" - "@types/tough-cookie" "*" - form-data "^2.5.0" - -"@types/tough-cookie@*": - version "4.0.5" - resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" - integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA== - -"@types/ws@^8.5.3": - version "8.5.10" - resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787" - integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A== - dependencies: - "@types/node" "*" +"@types/object-hash@^3.0.6": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@types/object-hash/-/object-hash-3.0.6.tgz#25c052428199d374ef723b7b0ed44b5bfe1b3029" + integrity sha512-fOBV8C1FIu2ELinoILQ+ApxcUKz4ngq+IWUYrxSGjXzzjUALijilampwkMgEtJ+h2njAW3pi853QpzNVCHB73w== ajv-draft-04@^1.0.0: version "1.0.0" @@ -401,11 +366,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -byline@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" - integrity sha512-s6webAy+R4SR8XVuJWt2V2rGvhnrhxN+9S15GNuTK3wKPOXFF6RNc+8ug2XhH+2s4f+uudG4kUVYmYOQWL2g0Q== - call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" @@ -436,11 +396,6 @@ chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -777,15 +732,6 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== -form-data@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" - integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -795,13 +741,6 @@ form-data@~2.3.2: combined-stream "^1.0.6" mime-types "^2.1.12" -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" @@ -1085,11 +1024,6 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isomorphic-ws@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" - integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -1120,6 +1054,11 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== +jsep@^1.3.8: + version "1.3.8" + resolved "https://registry.yarnpkg.com/jsep/-/jsep-1.3.8.tgz#facb6eb908d085d71d950bd2b24b757c7b8a46d7" + integrity sha512-qofGylTGgYj9gZFsHuyWAN4jr35eJ66qJCK4eKDnldohuUoQFbU3iZn2zjvEbd9wOAhP9Wx5DsAAduTyE1PSWQ== + json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -1145,10 +1084,14 @@ json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== -jsonpath-plus@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899" - integrity sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA== +jsonpath-plus@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-9.0.0.tgz#bb8703ee481531142bca8dee9a42fe72b8358a7f" + integrity sha512-bqE77VIDStrOTV/czspZhTn+o27Xx9ZJRGVkdVShEtPoqsIx5yALv3lWVU6y+PqYvWPJNWE7ORCQheQkEe0DDA== + dependencies: + "@jsep-plugin/assignment" "^1.2.1" + "@jsep-plugin/regex" "^1.0.3" + jsep "^1.3.8" jsprim@^1.2.2: version "1.4.2" @@ -1211,31 +1154,6 @@ minimist@^1.2.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass@^3.0.0: - version "3.3.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - -minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mkdirp@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" @@ -1343,6 +1261,11 @@ object-hash@^2.2.0: resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + object-inspect@^1.13.1: version "1.13.1" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" @@ -1368,7 +1291,7 @@ oidc-token-hash@^5.0.3: resolved "https://registry.yarnpkg.com/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz#9a229f0a1ce9d4fc89bcaee5478c97a889e7b7b6" integrity sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw== -openid-client@^5.3.0: +openid-client@^5.6.5: version "5.6.5" resolved "https://registry.yarnpkg.com/openid-client/-/openid-client-5.6.5.tgz#c149ad07b9c399476dc347097e297bbe288b8b00" integrity sha512-5P4qO9nGJzB5PI0LFlhj4Dzg3m4odt0qsJTfyEtZyOlkgpILwEioOhVVJOrS1iVH494S4Ee5OCjjg6Bf5WOj3w== @@ -1467,7 +1390,7 @@ regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.1" -request@^2.88.0: +request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -1512,7 +1435,7 @@ resolve@^1.10.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -rfc4648@^1.3.0: +rfc4648@^1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/rfc4648/-/rfc4648-1.5.3.tgz#e62b81736c10361ca614efe618a566e93d0b41c0" integrity sha512-MjOWxM065+WswwnmNONOT+bD1nXzY9Km6u3kzvnx8F8/HXGZdz3T6e6vZJ8Q/RIMUSp/nxqjH3GwvJDy8ijeQQ== @@ -1708,11 +1631,6 @@ sshpk@^1.7.0: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -stream-buffers@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-3.0.2.tgz#5249005a8d5c2d00b3a32e6e0a6ea209dc4f3521" - integrity sha512-DQi1h8VEBA/lURbSwFtEHnSTb9s2/pwLEaFuNhXwy1Dx3Sa0lOuYT2yNUr4/j2fs8oCAMANtrZ5OrPZtyVs3MQ== - string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" @@ -1801,18 +1719,6 @@ swagger2openapi@^7.0.4, swagger2openapi@^7.0.8: yaml "^1.10.0" yargs "^17.0.1" -tar@^6.1.11: - version "6.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" - integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^5.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" @@ -1836,11 +1742,6 @@ tslib@2.4.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== -tslib@^2.4.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -2004,11 +1905,6 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" -ws@^8.11.0: - version "8.16.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" - integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"