Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/ops/scripts/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ if (intOrString && typeof intOrString === 'object') {
];
}

// The vendored spec is a snapshot of one cluster's CRDs, so a field a newer
// operator release added is missing until the spec is refetched from a cluster
// running it. Traefik's IngressRoute gained `spec.ingressClassName` in
// traefik/traefik#12313; keep it regardless of the snapshot's Traefik version.
const ingressRouteSpec =
patchedSchema?.definitions?.['io.traefik.v1alpha1.IngressRoute']?.properties?.spec;
if (ingressRouteSpec?.properties) {
ingressRouteSpec.properties.ingressClassName = {
description:
'Defines the IngressClass cluster resource to use. It replaces the deprecated kubernetes.io/ingress.class annotation.',
type: 'string',
};
}

const code = generateOpenApiClient(
{
...options,
Expand Down
6 changes: 6 additions & 0 deletions packages/ops/src/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* The transport lives once, in the core `kubernetesjs` package. This module
* only keeps the `@kubernetesjs/ops/client` entry point resolvable for
* consumers that import the client types from it.
*/
export * from 'kubernetesjs/client';
1 change: 1 addition & 0 deletions packages/ops/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35229,6 +35229,7 @@ export interface TraefikIoV1alpha1IngressRoute {
namespace?: string;
};
};
ingressClassName?: string;
};
}
/* io.traefik.v1alpha1.IngressRouteList */
Expand Down
Loading