@firestartr/cli 2.7.0-snapshot-19 → 2.7.0-snapshot-20

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.
@@ -39,5 +39,11 @@ export declare enum envVars {
39
39
  operatorDeploymentName = "OPERATOR_DEPLOYMENT_NAME",
40
40
  operatorNumberOfMaxSlots = "OPERATOR_NUMBER_OF_MAX_SLOTS",
41
41
  kubernetesServiceHost = "KUBERNETES_SERVICE_HOST",
42
- kubernetesServicePort = "KUBERNETES_SERVICE_PORT"
42
+ kubernetesServicePort = "KUBERNETES_SERVICE_PORT",
43
+ crsStatusTombstoneTtl = "CRS_STATUS_TOMBSTONE_TTL",
44
+ crsStatusPort = "CRS_STATUS_PORT",
45
+ crsStatusKindList = "CRS_STATUS_KIND_LIST",
46
+ crsStatusNamespace = "CRS_STATUS_NAMESPACE",
47
+ crsStatusApiGroup = "CRS_STATUS_API_GROUP",
48
+ crsStatusApiVersion = "CRS_STATUS_API_VERSION"
43
49
  }
@@ -0,0 +1,2 @@
1
+ import { Subcommand } from '../types';
2
+ export declare const crsStatusSubcommand: Subcommand;
@@ -0,0 +1 @@
1
+ export declare function runService(): Promise<void>;
@@ -0,0 +1,19 @@
1
+ import type { StatusProjection } from './types';
2
+ export declare class StatusCache {
3
+ private live;
4
+ private tombstones;
5
+ private claimRefIndex;
6
+ private cacheKey;
7
+ private claimRefKey;
8
+ private indexClaimRef;
9
+ private unindexClaimRef;
10
+ upsert(kind: string, name: string, projection: StatusProjection): void;
11
+ delete(kind: string, name: string, tombstoneTtlMs: number): void;
12
+ getByClaimRef(claimKind: string, claimName: string): StatusProjection[];
13
+ getAll(): StatusProjection[];
14
+ getSize(): {
15
+ live: number;
16
+ tombstones: number;
17
+ };
18
+ private evictExpiredTombstones;
19
+ }
@@ -0,0 +1,9 @@
1
+ export interface ServiceConfig {
2
+ port: number;
3
+ kindList: string[];
4
+ namespace: string;
5
+ apiGroup: string;
6
+ apiVersion: string;
7
+ tombstoneTtlMs: number;
8
+ }
9
+ export declare function loadConfig(): ServiceConfig;
@@ -0,0 +1,22 @@
1
+ import type { StatusCache } from './cache';
2
+ import type { ServiceConfig } from './config';
3
+ export declare class KindInformer {
4
+ private config;
5
+ private plural;
6
+ private cache;
7
+ private kc;
8
+ private api;
9
+ private watch;
10
+ private watchRequest;
11
+ private shouldReconnect;
12
+ private reconnectTimer;
13
+ private resourceVersion;
14
+ constructor(config: ServiceConfig, plural: string, cache: StatusCache);
15
+ private watchPath;
16
+ start(): Promise<void>;
17
+ stop(): void;
18
+ private listExisting;
19
+ private startWatch;
20
+ private handleEvent;
21
+ private scheduleReconnect;
22
+ }
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ error: (...args: any) => void;
3
+ warn: (...args: any) => void;
4
+ info: (...args: any) => void;
5
+ debug: (...args: any) => void;
6
+ verbose: (...args: any) => void;
7
+ silly: (...args: any) => void;
8
+ enableFileLogging: typeof import("../../catalog_common/src/logger/logger").enableFileLogging;
9
+ disableFileLogging: typeof import("../../catalog_common/src/logger/logger").disableFileLogging;
10
+ };
11
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export declare function derivePhase(conditions: {
2
+ type: string;
3
+ status: string;
4
+ }[]): string;
@@ -0,0 +1,2 @@
1
+ import type { StatusCache } from './cache';
2
+ export declare function createServer(cache: StatusCache, port: number): Promise<void>;
@@ -0,0 +1,17 @@
1
+ export interface Condition {
2
+ type: string;
3
+ status: string;
4
+ reason: string;
5
+ message: string;
6
+ lastTransitionTime: string;
7
+ }
8
+ export interface StatusProjection {
9
+ kind: string;
10
+ name: string;
11
+ namespace: string;
12
+ claimKind: string | null;
13
+ claimName: string | null;
14
+ phase: string;
15
+ conditions: Condition[];
16
+ observedAt: string;
17
+ }
@@ -1,2 +1,2 @@
1
- export { provisionManagedFiles, seedForMigrationReiimport, } from './managed_files';
1
+ export { provisionManagedFiles, seedForMigrationReimport, } from './managed_files';
2
2
  export type { ManagedFilesResult } from './managed_files';
@@ -11,5 +11,5 @@ export interface ManagedFilesResult {
11
11
  * Seeds `installed_managed_files` from ALL `userManaged: true` addresses in the
12
12
  * current CR spec so the TFM input is ready for the next regular apply cycle.
13
13
  */
14
- export declare function seedForMigrationReiimport(ghFeature: EntityGHFeature): Promise<void>;
14
+ export declare function seedForMigrationReimport(ghFeature: EntityGHFeature): Promise<void>;
15
15
  export declare function provisionManagedFiles(ghFeature: EntityGHFeature): Promise<ManagedFilesResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firestartr/cli",
3
- "version": "2.7.0-snapshot-19",
3
+ "version": "2.7.0-snapshot-20",
4
4
  "private": false,
5
5
  "description": "Commandline tool",
6
6
  "main": "build/main.js",
@@ -28,6 +28,7 @@
28
28
  "cdk8s_renderer": "file:../cdk8s_renderer",
29
29
  "command-line-args": "^5.2.1",
30
30
  "crs_analyzer": "file:../crs_analyzer",
31
+ "crs_status_service": "file:../crs_status_service",
31
32
  "importer": "file:../importer",
32
33
  "operator": "file:../operator",
33
34
  "scaffolder": "file:../scaffolder"