forked from renovatebot/renovate
/
types.ts
84 lines (74 loc) · 1.65 KB
/
types.ts
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
export type FluxManagerData = {
components: string;
};
export interface KubernetesResource {
apiVersion: string;
metadata: {
name: string;
// For Flux, the namespace property is optional, but matching HelmReleases to HelmRepositories would be
// much more difficult without it (we'd have to examine the parent Kustomizations to discover the value),
// so we require it for renovation.
namespace: string;
};
}
export interface HelmRelease extends KubernetesResource {
kind: 'HelmRelease';
spec: {
chart: {
spec: {
chart: string;
sourceRef: {
kind: string;
name: string;
namespace?: string;
};
version?: string;
};
};
};
}
export interface HelmRepository extends KubernetesResource {
kind: 'HelmRepository';
spec: {
url: string;
type: string;
};
}
export interface GitRepository extends KubernetesResource {
kind: 'GitRepository';
spec: {
ref: {
tag?: string;
commit?: string;
};
url: string;
};
}
export interface OciRepository extends KubernetesResource {
kind: 'OCIRepository';
spec: {
ref: {
digest?: string;
tag?: string;
};
url: string;
};
}
export type FluxResource =
| HelmRelease
| HelmRepository
| GitRepository
| OciRepository;
export interface FluxFile {
file: string;
}
export interface ResourceFluxManifest extends FluxFile {
kind: 'resource';
resources: FluxResource[];
}
export interface SystemFluxManifest extends FluxFile {
kind: 'system';
version: string;
components: string;
}
export type FluxManifest = ResourceFluxManifest | SystemFluxManifest;