kubernetes-fluent-client 3.4.6 → 3.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../src/kinds.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAqkBzD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAErE;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,YAAY,EAAE,kBAAkB,gBAAgB,SAUnF,CAAC"}
1
+ {"version":3,"file":"kinds.d.ts","sourceRoot":"","sources":["../src/kinds.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAwkBzD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAErE;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,YAAY,EAAE,kBAAkB,gBAAgB,SAUnF,CAAC"}
package/dist/kinds.js CHANGED
@@ -94,12 +94,15 @@ const gvkMap = {
94
94
  *
95
95
  * @see {@link https://kubernetes.io/docs/concepts/services-networking/service/#endpoints}
96
96
  */
97
- V1Endpoint: {
98
- kind: "Endpoints",
99
- version: "v1",
100
- group: "",
101
- plural: "endpoints",
102
- },
97
+ // https://github.com/defenseunicorns/kubernetes-fluent-client/issues/618
98
+ // The endpoint generated type is not correct and is registered elsewhere
99
+ // Keep this commented out until the generated type is fixed in the upstream
100
+ // V1Endpoint: {
101
+ // kind: "Endpoints",
102
+ // version: "v1",
103
+ // group: "",
104
+ // plural: "endpoints",
105
+ // },
103
106
  /**
104
107
  * Represents a K8s LimitRange resource.
105
108
  * LimitRange enforces constraints on the resource consumption of objects in a namespace.
@@ -1,4 +1,22 @@
1
1
  /** a is a collection of K8s types to be used within an action: `When(a.Configmap)` */
2
- export { CoreV1Event as CoreEvent, EventsV1Event as Event, V1APIService as APIService, V1CertificateSigningRequest as CertificateSigningRequest, V1ClusterRole as ClusterRole, V1ClusterRoleBinding as ClusterRoleBinding, V1ConfigMap as ConfigMap, V1ControllerRevision as ControllerRevision, V1CronJob as CronJob, V1CSIDriver as CSIDriver, V1CustomResourceDefinition as CustomResourceDefinition, V1DaemonSet as DaemonSet, V1Deployment as Deployment, V1EndpointSlice as EndpointSlice, V1HorizontalPodAutoscaler as HorizontalPodAutoscaler, V1Ingress as Ingress, V1IngressClass as IngressClass, V1Job as Job, V1LimitRange as LimitRange, V1LocalSubjectAccessReview as LocalSubjectAccessReview, V1MutatingWebhookConfiguration as MutatingWebhookConfiguration, V1Namespace as Namespace, V1NetworkPolicy as NetworkPolicy, V1Node as Node, V1PersistentVolume as PersistentVolume, V1PersistentVolumeClaim as PersistentVolumeClaim, V1Pod as Pod, V1PodDisruptionBudget as PodDisruptionBudget, V1PodTemplate as PodTemplate, V1ReplicaSet as ReplicaSet, V1ReplicationController as ReplicationController, V1ResourceQuota as ResourceQuota, V1Role as Role, V1RoleBinding as RoleBinding, V1RuntimeClass as RuntimeClass, V1Secret as Secret, V1SelfSubjectAccessReview as SelfSubjectAccessReview, V1SelfSubjectRulesReview as SelfSubjectRulesReview, V1Service as Service, V1ServiceAccount as ServiceAccount, V1StatefulSet as StatefulSet, V1StorageClass as StorageClass, V1SubjectAccessReview as SubjectAccessReview, V1TokenReview as TokenReview, V1ValidatingWebhookConfiguration as ValidatingWebhookConfiguration, V1VolumeAttachment as VolumeAttachment, V1Endpoint as Endpoint, } from "@kubernetes/client-node";
2
+ import { V1Endpoint, V1ObjectMeta } from "@kubernetes/client-node";
3
+ export { CoreV1Event as CoreEvent, EventsV1Event as Event, V1APIService as APIService, V1CertificateSigningRequest as CertificateSigningRequest, V1ClusterRole as ClusterRole, V1ClusterRoleBinding as ClusterRoleBinding, V1ConfigMap as ConfigMap, V1ControllerRevision as ControllerRevision, V1CronJob as CronJob, V1CSIDriver as CSIDriver, V1CustomResourceDefinition as CustomResourceDefinition, V1DaemonSet as DaemonSet, V1Deployment as Deployment, V1EndpointSlice as EndpointSlice, V1HorizontalPodAutoscaler as HorizontalPodAutoscaler, V1Ingress as Ingress, V1IngressClass as IngressClass, V1Job as Job, V1LimitRange as LimitRange, V1LocalSubjectAccessReview as LocalSubjectAccessReview, V1MutatingWebhookConfiguration as MutatingWebhookConfiguration, V1Namespace as Namespace, V1NetworkPolicy as NetworkPolicy, V1Node as Node, V1PersistentVolume as PersistentVolume, V1PersistentVolumeClaim as PersistentVolumeClaim, V1Pod as Pod, V1PodDisruptionBudget as PodDisruptionBudget, V1PodTemplate as PodTemplate, V1ReplicaSet as ReplicaSet, V1ReplicationController as ReplicationController, V1ResourceQuota as ResourceQuota, V1Role as Role, V1RoleBinding as RoleBinding, V1RuntimeClass as RuntimeClass, V1Secret as Secret, V1SelfSubjectAccessReview as SelfSubjectAccessReview, V1SelfSubjectRulesReview as SelfSubjectRulesReview, V1Service as Service, V1ServiceAccount as ServiceAccount, V1StatefulSet as StatefulSet, V1StorageClass as StorageClass, V1SubjectAccessReview as SubjectAccessReview, V1TokenReview as TokenReview, V1ValidatingWebhookConfiguration as ValidatingWebhookConfiguration, V1VolumeAttachment as VolumeAttachment, } from "@kubernetes/client-node";
3
4
  export { GenericKind } from "./types";
5
+ export declare class Endpoint {
6
+ /**
7
+ * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
8
+ */
9
+ apiVersion: string;
10
+ /**
11
+ * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
12
+ */
13
+ kind: string;
14
+ metadata?: V1ObjectMeta;
15
+ /**
16
+ * The generated type only contains a single subnet, should should be an array
17
+ * > kubectl explain ep # to see actual endpoint type
18
+ */
19
+ subnets?: V1Endpoint[];
20
+ constructor(init?: Partial<Endpoint>);
21
+ }
4
22
  //# sourceMappingURL=upstream.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"upstream.d.ts","sourceRoot":"","sources":["../src/upstream.ts"],"names":[],"mappings":"AAGA,sFAAsF;AACtF,OAAO,EACL,WAAW,IAAI,SAAS,EACxB,aAAa,IAAI,KAAK,EACtB,YAAY,IAAI,UAAU,EAC1B,2BAA2B,IAAI,yBAAyB,EACxD,aAAa,IAAI,WAAW,EAC5B,oBAAoB,IAAI,kBAAkB,EAC1C,WAAW,IAAI,SAAS,EACxB,oBAAoB,IAAI,kBAAkB,EAC1C,SAAS,IAAI,OAAO,EACpB,WAAW,IAAI,SAAS,EACxB,0BAA0B,IAAI,wBAAwB,EACtD,WAAW,IAAI,SAAS,EACxB,YAAY,IAAI,UAAU,EAC1B,eAAe,IAAI,aAAa,EAChC,yBAAyB,IAAI,uBAAuB,EACpD,SAAS,IAAI,OAAO,EACpB,cAAc,IAAI,YAAY,EAC9B,KAAK,IAAI,GAAG,EACZ,YAAY,IAAI,UAAU,EAC1B,0BAA0B,IAAI,wBAAwB,EACtD,8BAA8B,IAAI,4BAA4B,EAC9D,WAAW,IAAI,SAAS,EACxB,eAAe,IAAI,aAAa,EAChC,MAAM,IAAI,IAAI,EACd,kBAAkB,IAAI,gBAAgB,EACtC,uBAAuB,IAAI,qBAAqB,EAChD,KAAK,IAAI,GAAG,EACZ,qBAAqB,IAAI,mBAAmB,EAC5C,aAAa,IAAI,WAAW,EAC5B,YAAY,IAAI,UAAU,EAC1B,uBAAuB,IAAI,qBAAqB,EAChD,eAAe,IAAI,aAAa,EAChC,MAAM,IAAI,IAAI,EACd,aAAa,IAAI,WAAW,EAC5B,cAAc,IAAI,YAAY,EAC9B,QAAQ,IAAI,MAAM,EAClB,yBAAyB,IAA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IAAI,mBAAmB,EAC5C,aAAa,IAAI,WAAW,EAC5B,YAAY,IAAI,UAAU,EAC1B,uBAAuB,IAAI,qBAAqB,EAChD,eAAe,IAAI,aAAa,EAChC,MAAM,IAAI,IAAI,EACd,aAAa,IAAI,WAAW,EAC5B,cAAc,IAAI,YAAY,EAC9B,QAAQ,IAAI,MAAM,EAClB,yBAAyB,IAAI,uBAAuB,EACpD,wBAAwB,IAAI,sBAAsB,EAClD,SAAS,IAAI,OAAO,EACpB,gBAAgB,IAAI,cAAc,EAClC,aAAa,IAAI,WAAW,EAC5B,cAAc,IAAI,YAAY,EAC9B,qBAAqB,IAAI,mBAAmB,EAC5C,aAAa,IAAI,WAAW,EAC5B,gCAAgC,IAAI,8BAA8B,EAClE,kBAAkB,IAAI,gBAAgB,GAEvC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,qBAAa,QAAQ;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAQ;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAc;IAE1B,QAAQ,CAAC,EAAE,YAAY,CAAC;IAExB;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;gBAEX,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC;CAGrC"}
package/dist/upstream.js CHANGED
@@ -2,8 +2,8 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  // SPDX-FileCopyrightText: 2023-Present The Kubernetes Fluent Client Authors
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.GenericKind = exports.Endpoint = exports.VolumeAttachment = exports.ValidatingWebhookConfiguration = exports.TokenReview = exports.SubjectAccessReview = exports.StorageClass = exports.StatefulSet = exports.ServiceAccount = exports.Service = exports.SelfSubjectRulesReview = exports.SelfSubjectAccessReview = exports.Secret = exports.RuntimeClass = exports.RoleBinding = exports.Role = exports.ResourceQuota = exports.ReplicationController = exports.ReplicaSet = exports.PodTemplate = exports.PodDisruptionBudget = exports.Pod = exports.PersistentVolumeClaim = exports.PersistentVolume = exports.Node = exports.NetworkPolicy = exports.Namespace = exports.MutatingWebhookConfiguration = exports.LocalSubjectAccessReview = exports.LimitRange = exports.Job = exports.IngressClass = exports.Ingress = exports.HorizontalPodAutoscaler = exports.EndpointSlice = exports.Deployment = exports.DaemonSet = exports.CustomResourceDefinition = exports.CSIDriver = exports.CronJob = exports.ControllerRevision = exports.ConfigMap = exports.ClusterRoleBinding = exports.ClusterRole = exports.CertificateSigningRequest = exports.APIService = exports.Event = exports.CoreEvent = void 0;
6
- /** a is a collection of K8s types to be used within an action: `When(a.Configmap)` */
5
+ exports.Endpoint = exports.GenericKind = exports.VolumeAttachment = exports.ValidatingWebhookConfiguration = exports.TokenReview = exports.SubjectAccessReview = exports.StorageClass = exports.StatefulSet = exports.ServiceAccount = exports.Service = exports.SelfSubjectRulesReview = exports.SelfSubjectAccessReview = exports.Secret = exports.RuntimeClass = exports.RoleBinding = exports.Role = exports.ResourceQuota = exports.ReplicationController = exports.ReplicaSet = exports.PodTemplate = exports.PodDisruptionBudget = exports.Pod = exports.PersistentVolumeClaim = exports.PersistentVolume = exports.Node = exports.NetworkPolicy = exports.Namespace = exports.MutatingWebhookConfiguration = exports.LocalSubjectAccessReview = exports.LimitRange = exports.Job = exports.IngressClass = exports.Ingress = exports.HorizontalPodAutoscaler = exports.EndpointSlice = exports.Deployment = exports.DaemonSet = exports.CustomResourceDefinition = exports.CSIDriver = exports.CronJob = exports.ControllerRevision = exports.ConfigMap = exports.ClusterRoleBinding = exports.ClusterRole = exports.CertificateSigningRequest = exports.APIService = exports.Event = exports.CoreEvent = void 0;
6
+ const kinds_1 = require("./kinds");
7
7
  var client_node_1 = require("@kubernetes/client-node");
8
8
  Object.defineProperty(exports, "CoreEvent", { enumerable: true, get: function () { return client_node_1.CoreV1Event; } });
9
9
  Object.defineProperty(exports, "Event", { enumerable: true, get: function () { return client_node_1.EventsV1Event; } });
@@ -51,6 +51,31 @@ Object.defineProperty(exports, "SubjectAccessReview", { enumerable: true, get: f
51
51
  Object.defineProperty(exports, "TokenReview", { enumerable: true, get: function () { return client_node_1.V1TokenReview; } });
52
52
  Object.defineProperty(exports, "ValidatingWebhookConfiguration", { enumerable: true, get: function () { return client_node_1.V1ValidatingWebhookConfiguration; } });
53
53
  Object.defineProperty(exports, "VolumeAttachment", { enumerable: true, get: function () { return client_node_1.V1VolumeAttachment; } });
54
- Object.defineProperty(exports, "Endpoint", { enumerable: true, get: function () { return client_node_1.V1Endpoint; } });
55
54
  var types_1 = require("./types");
56
55
  Object.defineProperty(exports, "GenericKind", { enumerable: true, get: function () { return types_1.GenericKind; } });
56
+ class Endpoint {
57
+ /**
58
+ * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
59
+ */
60
+ apiVersion = "v1";
61
+ /**
62
+ * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
63
+ */
64
+ kind = "Endpoint";
65
+ metadata;
66
+ /**
67
+ * The generated type only contains a single subnet, should should be an array
68
+ * > kubectl explain ep # to see actual endpoint type
69
+ */
70
+ subnets;
71
+ constructor(init) {
72
+ Object.assign(this, init);
73
+ }
74
+ }
75
+ exports.Endpoint = Endpoint;
76
+ (0, kinds_1.RegisterKind)(Endpoint, {
77
+ group: "",
78
+ version: "v1",
79
+ kind: "Endpoints",
80
+ plural: "endpoints",
81
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kubernetes-fluent-client",
3
- "version": "3.4.6",
3
+ "version": "3.4.8",
4
4
  "description": "A @kubernetes/client-node fluent API wrapper that leverages K8s Server Side Apply.",
5
5
  "bin": "./dist/cli.js",
6
6
  "main": "dist/index.js",
@@ -54,8 +54,8 @@
54
54
  "http-status-codes": "2.3.0",
55
55
  "node-fetch": "2.7.0",
56
56
  "quicktype-core": "23.0.171",
57
- "type-fest": "4.38.0",
58
- "undici": "7.6.0",
57
+ "type-fest": "^4.39.1",
58
+ "undici": "^7.7.0",
59
59
  "yargs": "17.7.2"
60
60
  },
61
61
  "devDependencies": {
@@ -68,8 +68,8 @@
68
68
  "@types/readable-stream": "4.0.18",
69
69
  "@types/urijs": "^1.19.25",
70
70
  "@types/yargs": "17.0.33",
71
- "@typescript-eslint/eslint-plugin": "8.29.0",
72
- "@typescript-eslint/parser": "8.29.0",
71
+ "@typescript-eslint/eslint-plugin": "8.29.1",
72
+ "@typescript-eslint/parser": "8.29.1",
73
73
  "eslint-plugin-jsdoc": "50.6.9",
74
74
  "globals": "^16.0.0",
75
75
  "husky": "^9.1.6",
@@ -78,7 +78,7 @@
78
78
  "prettier": "3.5.3",
79
79
  "semantic-release": "24.2.3",
80
80
  "ts-jest": "29.3.1",
81
- "typescript": "5.8.2"
81
+ "typescript": "5.8.3"
82
82
  },
83
83
  "overrides": {
84
84
  "semantic-release@24.2.0": {
package/src/kinds.ts CHANGED
@@ -94,12 +94,15 @@ const gvkMap: Record<string, GroupVersionKind> = {
94
94
  *
95
95
  * @see {@link https://kubernetes.io/docs/concepts/services-networking/service/#endpoints}
96
96
  */
97
- V1Endpoint: {
98
- kind: "Endpoints",
99
- version: "v1",
100
- group: "",
101
- plural: "endpoints",
102
- },
97
+ // https://github.com/defenseunicorns/kubernetes-fluent-client/issues/618
98
+ // The endpoint generated type is not correct and is registered elsewhere
99
+ // Keep this commented out until the generated type is fixed in the upstream
100
+ // V1Endpoint: {
101
+ // kind: "Endpoints",
102
+ // version: "v1",
103
+ // group: "",
104
+ // plural: "endpoints",
105
+ // },
103
106
 
104
107
  /**
105
108
  * Represents a K8s LimitRange resource.
package/src/upstream.ts CHANGED
@@ -2,6 +2,8 @@
2
2
  // SPDX-FileCopyrightText: 2023-Present The Kubernetes Fluent Client Authors
3
3
 
4
4
  /** a is a collection of K8s types to be used within an action: `When(a.Configmap)` */
5
+ import { V1Endpoint, V1ObjectMeta } from "@kubernetes/client-node";
6
+ import { RegisterKind } from "./kinds";
5
7
  export {
6
8
  CoreV1Event as CoreEvent,
7
9
  EventsV1Event as Event,
@@ -49,7 +51,37 @@ export {
49
51
  V1TokenReview as TokenReview,
50
52
  V1ValidatingWebhookConfiguration as ValidatingWebhookConfiguration,
51
53
  V1VolumeAttachment as VolumeAttachment,
52
- V1Endpoint as Endpoint,
54
+ // V1Endpoint as Endpoint, - keep this so we do not forget incase it is corrected
53
55
  } from "@kubernetes/client-node";
54
56
 
55
57
  export { GenericKind } from "./types";
58
+
59
+ export class Endpoint {
60
+ /**
61
+ * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
62
+ */
63
+ apiVersion: string = "v1";
64
+ /**
65
+ * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
66
+ */
67
+ kind: string = "Endpoint";
68
+
69
+ metadata?: V1ObjectMeta;
70
+
71
+ /**
72
+ * The generated type only contains a single subnet, should should be an array
73
+ * > kubectl explain ep # to see actual endpoint type
74
+ */
75
+ subnets?: V1Endpoint[];
76
+
77
+ constructor(init?: Partial<Endpoint>) {
78
+ Object.assign(this, init);
79
+ }
80
+ }
81
+
82
+ RegisterKind(Endpoint, {
83
+ group: "",
84
+ version: "v1",
85
+ kind: "Endpoints",
86
+ plural: "endpoints",
87
+ });