forked from validatedpatterns/patterns-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
104 lines (90 loc) · 2.51 KB
/
Copy pathtypes.ts
File metadata and controls
104 lines (90 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
export interface Catalog {
generated_at: string;
generator_version: string;
catalog_description?: string;
catalog_logo?: string;
patterns: string[];
}
export interface ExtraFeatures {
hypershift_support?: boolean;
spoke_support?: boolean;
}
export interface NodeRequirement {
replicas: number;
type: string;
}
export type CloudRequirements = Record<string, NodeRequirement>;
export interface ClusterRoleRequirements {
compute?: CloudRequirements;
controlPlane?: CloudRequirements;
}
export type PatternRequirements = Record<string, ClusterRoleRequirements>;
export interface ExternalRequirements {
cluster_sizing_note?: string;
}
export interface Pattern {
metadata_version: string;
name: string;
pattern_version: string;
display_name: string;
repo_url: string;
issues_url: string;
docs_url: string;
ci_url: string;
tier: string;
owners: string[];
org: string;
clustergroupname: string;
description?: string;
docs_repo_url?: string;
spoke?: unknown;
requirements?: PatternRequirements;
extra_features?: ExtraFeatures;
external_requirements?: ExternalRequirements;
/** The catalog directory key used to fetch this pattern. */
catalogKey?: string;
}
export interface SecretTemplate {
version: string;
backingStore?: string;
vaultPolicies?: Record<string, string>;
secrets: SecretDefinition[];
}
export interface SecretDefinition {
name: string;
vaultMount?: string;
vaultPrefixes?: string[];
fields: SecretField[];
}
export interface SecretField {
name: string;
onMissingValue?: 'generate' | 'prompt' | 'error';
vaultPolicy?: string;
value?: string | null;
description?: string;
path?: string;
base64?: boolean;
ini_file?: string;
ini_section?: string;
ini_key?: string;
prompt?: string;
override?: boolean;
}
export interface SecretFormData {
[secretName: string]: {
[fieldName: string]: string | null;
};
}
/** One user-uploaded file; becomes a dedicated Secret mounted under {@link VAULT_UPLOADS_MOUNT_PREFIX}. */
export interface VaultInjectionFileArtifact {
/** Path segment under the uploads mount (unique per secret+field). */
slug: string;
/** Raw file bytes, base64-encoded (valid for Kubernetes Secret `data`). */
dataBase64: string;
}
export interface VaultInjectionPayload {
valuesSecretYaml: string;
fileArtifacts: VaultInjectionFileArtifact[];
}
/** Mount path in the vault injection Job pod; must match paths emitted in values-secret.yaml for file fields. */
export const VAULT_UPLOADS_MOUNT_PREFIX = '/vault-uploads';