Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 46fe032

Browse files
committed
controller-runtime: export Context from top level
1 parent 30e17de commit 46fe032

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

controller-runtime/lib/index.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
declare namespace _default {
22
export { k8s };
33
export { apimachinery };
4+
export { Context };
45
export { controllerutil };
56
export { Manager };
67
export { newControllerManagedBy };
@@ -21,6 +22,7 @@ export namespace apimachinery {
2122
export { schema };
2223
export { types };
2324
}
25+
import { Context } from './context.js';
2426
import controllerutil from './controllerutil.js';
2527
import { Manager } from './manager.js';
2628
export const newControllerManagedBy: typeof Builder.controllerManagedBy;
@@ -40,4 +42,4 @@ import types from './apimachinery/types.js';
4042
import { Builder } from './builder.js';
4143
import admission from './webhook/admission.js';
4244
import { Server } from './webhook/server.js';
43-
export { k8s, controllerutil, Manager, Reconciler, Request, Result, Source, TerminalError };
45+
export { k8s, Context, controllerutil, Manager, Reconciler, Request, Result, Source, TerminalError };

controller-runtime/lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import metav1 from './apimachinery/meta/v1.js';
44
import schema from './apimachinery/schema.js';
55
import types from './apimachinery/types.js';
66
import { Builder } from './builder.js';
7+
import { Context } from './context.js';
78
import controllerutil from './controllerutil.js';
89
import { Manager } from './manager.js';
910
import {
@@ -33,6 +34,7 @@ const webhook = {
3334
export {
3435
k8s,
3536
apimachinery,
37+
Context,
3638
controllerutil,
3739
Manager,
3840
newControllerManagedBy,
@@ -47,6 +49,7 @@ export {
4749
export default {
4850
k8s,
4951
apimachinery,
52+
Context,
5053
controllerutil,
5154
Manager,
5255
newControllerManagedBy,

controller-runtime/test/context.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import assert from 'node:assert';
22
import { suite, test } from 'node:test';
3-
import { Context, ReconcileContext } from '../lib/context.js';
3+
import { Context } from '../lib/index.js';
4+
import { ReconcileContext } from '../lib/context.js';
45

56
suite('Context', () => {
67
suite('Context() constructor', () => {

controller-runtime/test/manager.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import assert from 'node:assert';
22
import { suite, test } from 'node:test';
3-
import { Manager } from '../lib/manager.js';
4-
import { Context } from '../lib/context.js';
3+
import { Context, Manager } from '../lib/index.js';
54
import { withResolvers } from '../lib/util.js';
65
import { getManagerOptions } from './test-utils.js';
76

0 commit comments

Comments
 (0)