typekro 0.27.1 → 0.28.0

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.
Files changed (181) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/core/containers/build.d.ts +2 -46
  3. package/dist/core/containers/build.d.ts.map +1 -1
  4. package/dist/core/containers/build.js +219 -134
  5. package/dist/core/containers/build.js.map +1 -1
  6. package/dist/core/containers/errors.d.ts +4 -0
  7. package/dist/core/containers/errors.d.ts.map +1 -1
  8. package/dist/core/containers/errors.js +14 -1
  9. package/dist/core/containers/errors.js.map +1 -1
  10. package/dist/core/containers/exec.d.ts +6 -23
  11. package/dist/core/containers/exec.d.ts.map +1 -1
  12. package/dist/core/containers/exec.js +94 -78
  13. package/dist/core/containers/exec.js.map +1 -1
  14. package/dist/core/containers/image.d.ts +11 -7
  15. package/dist/core/containers/image.d.ts.map +1 -1
  16. package/dist/core/containers/image.js +102 -13
  17. package/dist/core/containers/image.js.map +1 -1
  18. package/dist/core/containers/index.d.ts +5 -1
  19. package/dist/core/containers/index.d.ts.map +1 -1
  20. package/dist/core/containers/index.js +3 -0
  21. package/dist/core/containers/index.js.map +1 -1
  22. package/dist/core/containers/registries/credentials.d.ts +30 -0
  23. package/dist/core/containers/registries/credentials.d.ts.map +1 -0
  24. package/dist/core/containers/registries/credentials.js +87 -0
  25. package/dist/core/containers/registries/credentials.js.map +1 -0
  26. package/dist/core/containers/registries/docker-session.d.ts +14 -0
  27. package/dist/core/containers/registries/docker-session.d.ts.map +1 -0
  28. package/dist/core/containers/registries/docker-session.js +164 -0
  29. package/dist/core/containers/registries/docker-session.js.map +1 -0
  30. package/dist/core/containers/registries/ecr.d.ts +2 -3
  31. package/dist/core/containers/registries/ecr.d.ts.map +1 -1
  32. package/dist/core/containers/registries/ecr.js +13 -22
  33. package/dist/core/containers/registries/ecr.js.map +1 -1
  34. package/dist/core/containers/registries/harbor.d.ts +7 -0
  35. package/dist/core/containers/registries/harbor.d.ts.map +1 -0
  36. package/dist/core/containers/registries/harbor.js +9 -0
  37. package/dist/core/containers/registries/harbor.js.map +1 -0
  38. package/dist/core/containers/registries/index.d.ts.map +1 -1
  39. package/dist/core/containers/registries/index.js +5 -0
  40. package/dist/core/containers/registries/index.js.map +1 -1
  41. package/dist/core/containers/registries/oci.d.ts +13 -0
  42. package/dist/core/containers/registries/oci.d.ts.map +1 -0
  43. package/dist/core/containers/registries/oci.js +68 -0
  44. package/dist/core/containers/registries/oci.js.map +1 -0
  45. package/dist/core/containers/registries/orbstack.d.ts +2 -3
  46. package/dist/core/containers/registries/orbstack.d.ts.map +1 -1
  47. package/dist/core/containers/registries/orbstack.js +8 -8
  48. package/dist/core/containers/registries/orbstack.js.map +1 -1
  49. package/dist/core/containers/registries/types.d.ts +75 -49
  50. package/dist/core/containers/registries/types.d.ts.map +1 -1
  51. package/dist/core/containers/registries/types.js +1 -9
  52. package/dist/core/containers/registries/types.js.map +1 -1
  53. package/dist/core/deployment/direct-factory.d.ts.map +1 -1
  54. package/dist/core/deployment/direct-factory.js +15 -8
  55. package/dist/core/deployment/direct-factory.js.map +1 -1
  56. package/dist/core/deployment/engine.d.ts.map +1 -1
  57. package/dist/core/deployment/engine.js +46 -5
  58. package/dist/core/deployment/engine.js.map +1 -1
  59. package/dist/core/deployment/kro-factory.d.ts +7 -7
  60. package/dist/core/deployment/kro-factory.d.ts.map +1 -1
  61. package/dist/core/deployment/kro-factory.js +148 -60
  62. package/dist/core/deployment/kro-factory.js.map +1 -1
  63. package/dist/core/deployment/kro-instance-safety.d.ts +7 -0
  64. package/dist/core/deployment/kro-instance-safety.d.ts.map +1 -1
  65. package/dist/core/deployment/kro-instance-safety.js +15 -0
  66. package/dist/core/deployment/kro-instance-safety.js.map +1 -1
  67. package/dist/core/deployment/kro-namespace-teardown.d.ts +7 -5
  68. package/dist/core/deployment/kro-namespace-teardown.d.ts.map +1 -1
  69. package/dist/core/deployment/kro-namespace-teardown.js +29 -10
  70. package/dist/core/deployment/kro-namespace-teardown.js.map +1 -1
  71. package/dist/core/deployment/kro-readiness.d.ts +1 -0
  72. package/dist/core/deployment/kro-readiness.d.ts.map +1 -1
  73. package/dist/core/deployment/kro-readiness.js +22 -1
  74. package/dist/core/deployment/kro-readiness.js.map +1 -1
  75. package/dist/core/deployment/rollback-manager.d.ts +13 -0
  76. package/dist/core/deployment/rollback-manager.d.ts.map +1 -1
  77. package/dist/core/deployment/rollback-manager.js +8 -0
  78. package/dist/core/deployment/rollback-manager.js.map +1 -1
  79. package/dist/core/serialization/core.js +3 -1
  80. package/dist/core/serialization/core.js.map +1 -1
  81. package/dist/core/serialization/schema.d.ts +2 -2
  82. package/dist/core/serialization/schema.d.ts.map +1 -1
  83. package/dist/core/serialization/schema.js +57 -4
  84. package/dist/core/serialization/schema.js.map +1 -1
  85. package/dist/core/types/serialization.d.ts +9 -0
  86. package/dist/core/types/serialization.d.ts.map +1 -1
  87. package/dist/factories/harbor/compositions/harbor-installation.d.ts +610 -0
  88. package/dist/factories/harbor/compositions/harbor-installation.d.ts.map +1 -0
  89. package/dist/factories/harbor/compositions/harbor-installation.js +348 -0
  90. package/dist/factories/harbor/compositions/harbor-installation.js.map +1 -0
  91. package/dist/factories/harbor/compositions/index.d.ts +2 -0
  92. package/dist/factories/harbor/compositions/index.d.ts.map +1 -0
  93. package/dist/factories/harbor/compositions/index.js +2 -0
  94. package/dist/factories/harbor/compositions/index.js.map +1 -0
  95. package/dist/factories/harbor/index.d.ts +7 -0
  96. package/dist/factories/harbor/index.d.ts.map +1 -0
  97. package/dist/factories/harbor/index.js +7 -0
  98. package/dist/factories/harbor/index.js.map +1 -0
  99. package/dist/factories/harbor/provider/harbor-api.d.ts +123 -0
  100. package/dist/factories/harbor/provider/harbor-api.d.ts.map +1 -0
  101. package/dist/factories/harbor/provider/harbor-api.js +595 -0
  102. package/dist/factories/harbor/provider/harbor-api.js.map +1 -0
  103. package/dist/factories/harbor/provider/index.d.ts +4 -0
  104. package/dist/factories/harbor/provider/index.d.ts.map +1 -0
  105. package/dist/factories/harbor/provider/index.js +4 -0
  106. package/dist/factories/harbor/provider/index.js.map +1 -0
  107. package/dist/factories/harbor/provider/kubernetes-secret-store.d.ts +12 -0
  108. package/dist/factories/harbor/provider/kubernetes-secret-store.d.ts.map +1 -0
  109. package/dist/factories/harbor/provider/kubernetes-secret-store.js +81 -0
  110. package/dist/factories/harbor/provider/kubernetes-secret-store.js.map +1 -0
  111. package/dist/factories/harbor/provider/rook-s3-binding.d.ts +30 -0
  112. package/dist/factories/harbor/provider/rook-s3-binding.d.ts.map +1 -0
  113. package/dist/factories/harbor/provider/rook-s3-binding.js +74 -0
  114. package/dist/factories/harbor/provider/rook-s3-binding.js.map +1 -0
  115. package/dist/factories/harbor/resources/helm.d.ts +12 -0
  116. package/dist/factories/harbor/resources/helm.d.ts.map +1 -0
  117. package/dist/factories/harbor/resources/helm.js +46 -0
  118. package/dist/factories/harbor/resources/helm.js.map +1 -0
  119. package/dist/factories/harbor/resources/index.d.ts +2 -0
  120. package/dist/factories/harbor/resources/index.d.ts.map +1 -0
  121. package/dist/factories/harbor/resources/index.js +2 -0
  122. package/dist/factories/harbor/resources/index.js.map +1 -0
  123. package/dist/factories/harbor/types.d.ts +319 -0
  124. package/dist/factories/harbor/types.d.ts.map +1 -0
  125. package/dist/factories/harbor/types.js +252 -0
  126. package/dist/factories/harbor/types.js.map +1 -0
  127. package/dist/factories/harbor/utils/helm-values-mapper.d.ts +8 -0
  128. package/dist/factories/harbor/utils/helm-values-mapper.d.ts.map +1 -0
  129. package/dist/factories/harbor/utils/helm-values-mapper.js +322 -0
  130. package/dist/factories/harbor/utils/helm-values-mapper.js.map +1 -0
  131. package/dist/factories/harbor/utils/index.d.ts +2 -0
  132. package/dist/factories/harbor/utils/index.d.ts.map +1 -0
  133. package/dist/factories/harbor/utils/index.js +2 -0
  134. package/dist/factories/harbor/utils/index.js.map +1 -0
  135. package/dist/factories/helm/helm-release.d.ts +10 -0
  136. package/dist/factories/helm/helm-release.d.ts.map +1 -1
  137. package/dist/factories/helm/helm-release.js +30 -2
  138. package/dist/factories/helm/helm-release.js.map +1 -1
  139. package/dist/factories/helm/readiness-evaluators.d.ts.map +1 -1
  140. package/dist/factories/helm/readiness-evaluators.js +26 -1
  141. package/dist/factories/helm/readiness-evaluators.js.map +1 -1
  142. package/dist/factories/helm/types.d.ts +5 -0
  143. package/dist/factories/helm/types.d.ts.map +1 -1
  144. package/dist/factories/index.d.ts +1 -0
  145. package/dist/factories/index.d.ts.map +1 -1
  146. package/dist/factories/index.js +4 -0
  147. package/dist/factories/index.js.map +1 -1
  148. package/dist/factories/kubernetes/networking/network-policy.d.ts.map +1 -1
  149. package/dist/factories/kubernetes/networking/network-policy.js +34 -1
  150. package/dist/factories/kubernetes/networking/network-policy.js.map +1 -1
  151. package/dist/factories/rook/compositions/index.d.ts +1 -0
  152. package/dist/factories/rook/compositions/index.d.ts.map +1 -1
  153. package/dist/factories/rook/compositions/index.js +1 -0
  154. package/dist/factories/rook/compositions/index.js.map +1 -1
  155. package/dist/factories/rook/compositions/rook-ceph-operator-installation.d.ts +2 -0
  156. package/dist/factories/rook/compositions/rook-ceph-operator-installation.d.ts.map +1 -1
  157. package/dist/factories/rook/compositions/rook-ceph-operator-installation.js +17 -0
  158. package/dist/factories/rook/compositions/rook-ceph-operator-installation.js.map +1 -1
  159. package/dist/factories/rook/compositions/rook-ceph-platform.d.ts +181 -0
  160. package/dist/factories/rook/compositions/rook-ceph-platform.d.ts.map +1 -0
  161. package/dist/factories/rook/compositions/rook-ceph-platform.js +388 -0
  162. package/dist/factories/rook/compositions/rook-ceph-platform.js.map +1 -0
  163. package/dist/factories/rook/resources/bucket-storage-class.d.ts.map +1 -1
  164. package/dist/factories/rook/resources/bucket-storage-class.js +4 -1
  165. package/dist/factories/rook/resources/bucket-storage-class.js.map +1 -1
  166. package/dist/factories/rook/resources/ceph-object-store.d.ts.map +1 -1
  167. package/dist/factories/rook/resources/ceph-object-store.js +2 -0
  168. package/dist/factories/rook/resources/ceph-object-store.js.map +1 -1
  169. package/dist/factories/rook/resources/helm.d.ts +4 -0
  170. package/dist/factories/rook/resources/helm.d.ts.map +1 -1
  171. package/dist/factories/rook/resources/helm.js +22 -0
  172. package/dist/factories/rook/resources/helm.js.map +1 -1
  173. package/dist/factories/rook/types.d.ts +180 -1
  174. package/dist/factories/rook/types.d.ts.map +1 -1
  175. package/dist/factories/rook/types.js +93 -2
  176. package/dist/factories/rook/types.js.map +1 -1
  177. package/dist/factories/rook/utils/helm-values-mapper.d.ts +34 -1
  178. package/dist/factories/rook/utils/helm-values-mapper.d.ts.map +1 -1
  179. package/dist/factories/rook/utils/helm-values-mapper.js +207 -0
  180. package/dist/factories/rook/utils/helm-values-mapper.js.map +1 -1
  181. package/package.json +6 -1
@@ -0,0 +1,252 @@
1
+ import { type } from 'arktype';
2
+ const secretRefShape = {
3
+ name: 'string',
4
+ 'key?': 'string',
5
+ };
6
+ const resourceRequirementsShape = {
7
+ 'requests?': { 'cpu?': 'string', 'memory?': 'string' },
8
+ 'limits?': { 'cpu?': 'string', 'memory?': 'string' },
9
+ };
10
+ const exposureShape = {
11
+ type: '"ingress" | "clusterIP" | "nodePort" | "loadBalancer"',
12
+ externalUrl: 'string',
13
+ tls: {
14
+ enabled: 'boolean',
15
+ source: '"auto" | "secret" | "cert-manager" | "none"',
16
+ 'secretName?': 'string',
17
+ },
18
+ 'ingress?': {
19
+ host: 'string',
20
+ 'className?': 'string',
21
+ 'annotations?': 'Record<string, string>',
22
+ },
23
+ 'nodePort?': {
24
+ 'http?': '30000 <= number.integer <= 32767',
25
+ 'https?': '30000 <= number.integer <= 32767',
26
+ },
27
+ };
28
+ const certificateShape = {
29
+ secretName: 'string',
30
+ issuerRef: {
31
+ name: 'string',
32
+ 'kind?': '"Issuer" | "ClusterIssuer"',
33
+ 'group?': 'string',
34
+ },
35
+ 'duration?': 'string',
36
+ 'renewBefore?': 'string',
37
+ };
38
+ const s3StorageShape = {
39
+ bucket: 'string',
40
+ region: 'string',
41
+ regionEndpoint: 'string',
42
+ existingSecret: 'string',
43
+ 'rootDirectory?': 'string',
44
+ 'secure?': 'boolean',
45
+ 'skipVerify?': 'boolean',
46
+ 'disableRedirect?': 'boolean',
47
+ 'caBundleSecretName?': 'string',
48
+ };
49
+ const externalDatabaseShape = {
50
+ host: 'string',
51
+ 'port?': '1 <= number.integer <= 65535',
52
+ username: 'string',
53
+ database: 'string',
54
+ existingSecret: 'string',
55
+ 'sslMode?': '"disable" | "require" | "verify-ca" | "verify-full"',
56
+ };
57
+ const externalCacheShape = {
58
+ address: 'string',
59
+ existingSecret: 'string',
60
+ 'username?': 'string',
61
+ 'tls?': {
62
+ enabled: 'boolean',
63
+ 'caBundleSecretName?': 'string',
64
+ },
65
+ };
66
+ const componentSecretsShape = {
67
+ encryptionKey: 'string',
68
+ core: 'string',
69
+ jobservice: 'string',
70
+ registry: 'string',
71
+ registryCredentials: 'string',
72
+ 'xsrf?': 'string',
73
+ };
74
+ const internalTlsShape = {
75
+ enabled: 'boolean',
76
+ 'certSource?': '"auto" | "secret"',
77
+ 'caBundleSecretName?': 'string',
78
+ 'coreSecretName?': 'string',
79
+ 'jobserviceSecretName?': 'string',
80
+ 'registrySecretName?': 'string',
81
+ 'portalSecretName?': 'string',
82
+ 'trivySecretName?': 'string',
83
+ };
84
+ const networkPolicyShape = {
85
+ enabled: 'boolean',
86
+ 'ingressNamespaceLabels?': 'Record<string, string>',
87
+ 'egressNamespaceLabels?': 'Record<string, string>[]',
88
+ 'egressCidrs?': 'string[]',
89
+ };
90
+ const productionNetworkPolicyShape = {
91
+ enabled: 'true',
92
+ ingressNamespaceLabels: 'Record<string, string>',
93
+ egressNamespaceLabels: 'Record<string, string>[]',
94
+ 'egressCidrs?': 'string[]',
95
+ };
96
+ const productionExposureShape = {
97
+ ...exposureShape,
98
+ tls: {
99
+ enabled: 'true',
100
+ source: '"auto" | "secret" | "cert-manager"',
101
+ 'secretName?': 'string',
102
+ },
103
+ };
104
+ const { 'secure?': _optionalSecure, 'skipVerify?': _optionalSkipVerify, ...productionS3StorageBaseShape } = s3StorageShape;
105
+ const productionS3StorageShape = {
106
+ ...productionS3StorageBaseShape,
107
+ secure: 'true',
108
+ skipVerify: 'false',
109
+ };
110
+ const harborCommonShape = {
111
+ name: 'string',
112
+ 'namespace?': 'string',
113
+ 'chartVersion?': 'string',
114
+ 'harborVersion?': 'string',
115
+ 'repositoryName?': 'string',
116
+ 'repositoryNamespace?': 'string',
117
+ 'repositoryNamespaceOwnership?': '"owned" | "external"',
118
+ 'repositoryUrl?': 'string',
119
+ 'namespaceOwnership?': '"owned" | "external"',
120
+ exposure: exposureShape,
121
+ 'certificate?': certificateShape,
122
+ storage: s3StorageShape,
123
+ adminPasswordSecret: secretRefShape,
124
+ componentSecrets: componentSecretsShape,
125
+ 'internalTls?': internalTlsShape,
126
+ 'caBundleSecretName?': 'string',
127
+ 'pvcStorageClassName?': 'string',
128
+ 'trivyEnabled?': 'boolean',
129
+ 'metricsEnabled?': 'boolean',
130
+ 'values?': 'Record<string, unknown>',
131
+ };
132
+ /** Local Harbor profile. Internal DB/cache are explicit development conveniences. */
133
+ export const HarborLocalInstallationConfigSchema = type({
134
+ ...harborCommonShape,
135
+ profile: '"local-development"',
136
+ 'database?': externalDatabaseShape,
137
+ 'cache?': externalCacheShape,
138
+ 'networkPolicy?': networkPolicyShape,
139
+ }).narrow((config, ctx) => {
140
+ const collision = findChartOwnedSecretCollision(config);
141
+ return collision === undefined
142
+ ? true
143
+ : ctx.mustBe(`external Secret names distinct from chart-owned Secret ${collision}`);
144
+ });
145
+ const { exposure: _commonExposure, storage: _commonStorage, 'certificate?': _optionalCertificate, ...harborProductionCommonShape } = harborCommonShape;
146
+ /** Production Harbor profile requiring external durable database and cache providers. */
147
+ export const HarborProductionInstallationConfigSchema = type({
148
+ ...harborProductionCommonShape,
149
+ profile: '"production"',
150
+ exposure: productionExposureShape,
151
+ certificate: certificateShape,
152
+ storage: productionS3StorageShape,
153
+ database: externalDatabaseShape,
154
+ cache: externalCacheShape,
155
+ networkPolicy: productionNetworkPolicyShape,
156
+ replicas: {
157
+ core: 'number.integer >= 2',
158
+ portal: 'number.integer >= 2',
159
+ registry: 'number.integer >= 2',
160
+ jobservice: 'number.integer >= 2',
161
+ exporter: 'number.integer >= 2',
162
+ },
163
+ resources: {
164
+ core: resourceRequirementsShape,
165
+ portal: resourceRequirementsShape,
166
+ registry: resourceRequirementsShape,
167
+ jobservice: resourceRequirementsShape,
168
+ exporter: resourceRequirementsShape,
169
+ },
170
+ }).narrow((config, ctx) => {
171
+ const collision = findChartOwnedSecretCollision(config);
172
+ return collision === undefined
173
+ ? true
174
+ : ctx.mustBe(`external Secret names distinct from chart-owned Secret ${collision}`);
175
+ });
176
+ export const HarborInstallationStatusSchema = type({
177
+ ready: 'boolean',
178
+ failed: 'boolean',
179
+ phase: '"Installing" | "Ready" | "Failed"',
180
+ endpoint: 'string',
181
+ chartVersion: 'string',
182
+ harborVersion: 'string',
183
+ profile: '"local-development" | "production"',
184
+ /** Flux HelmRelease generation whose integration status is projected below. */
185
+ observedGeneration: 'number.integer >= 0',
186
+ tlsEnabled: 'boolean',
187
+ storageReady: 'boolean',
188
+ databaseReady: 'boolean',
189
+ cacheReady: 'boolean',
190
+ networkPolicyReady: 'boolean',
191
+ conditions: type({
192
+ type: 'string',
193
+ status: 'string',
194
+ 'reason?': 'string',
195
+ 'message?': 'string',
196
+ 'observedGeneration?': 'number.integer >= 0',
197
+ }).array(),
198
+ });
199
+ export const HarborHelmRepositoryConfigSchema = type({
200
+ 'name?': 'string',
201
+ 'namespace?': 'string',
202
+ 'url?': 'string',
203
+ 'interval?': 'string',
204
+ 'id?': 'string',
205
+ });
206
+ export const HarborHelmReleaseConfigSchema = type({
207
+ name: 'string',
208
+ 'namespace?': 'string',
209
+ 'version?': 'string',
210
+ 'repositoryName?': 'string',
211
+ 'repositoryNamespace?': 'string',
212
+ 'repositoryUrl?': 'string',
213
+ 'values?': 'Record<string, unknown>',
214
+ 'id?': 'string',
215
+ });
216
+ function findChartOwnedSecretCollision(config) {
217
+ const chartOwned = new Set([
218
+ 'core',
219
+ 'database',
220
+ 'exporter',
221
+ 'ingress',
222
+ 'jobservice',
223
+ 'nginx',
224
+ 'registry',
225
+ 'registryctl',
226
+ 'trivy',
227
+ ].map((suffix) => `${config.name}-${suffix}`));
228
+ const externalNames = [
229
+ config.storage.existingSecret,
230
+ config.storage.caBundleSecretName,
231
+ config.adminPasswordSecret.name,
232
+ config.componentSecrets.encryptionKey,
233
+ config.componentSecrets.core,
234
+ config.componentSecrets.jobservice,
235
+ config.componentSecrets.registry,
236
+ config.componentSecrets.registryCredentials,
237
+ config.componentSecrets.xsrf,
238
+ config.database?.existingSecret,
239
+ config.cache?.existingSecret,
240
+ config.cache?.tls?.caBundleSecretName,
241
+ config.certificate?.secretName,
242
+ config.caBundleSecretName,
243
+ config.internalTls?.caBundleSecretName,
244
+ config.internalTls?.coreSecretName,
245
+ config.internalTls?.jobserviceSecretName,
246
+ config.internalTls?.registrySecretName,
247
+ config.internalTls?.portalSecretName,
248
+ config.internalTls?.trivySecretName,
249
+ ];
250
+ return externalNames.find((name) => name !== undefined && chartOwned.has(name));
251
+ }
252
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/factories/harbor/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG/B,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,MAAM,yBAAyB,GAAG;IAChC,WAAW,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;IACtD,SAAS,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE;CAC5C,CAAC;AAEX,MAAM,aAAa,GAAG;IACp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AC/B,MAAM,CAAC,KAAK,EAAE,cAAc;QAC5B,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,kBAAkB;QACrC,MAAM,CAAC,WAAW,EAAE,UAAU;QAC9B,MAAM,CAAC,kBAAkB;QACzB,MAAM,CAAC,WAAW,EAAE,kBAAkB;QACtC,MAAM,CAAC,WAAW,EAAE,cAAc;QAClC,MAAM,CAAC,WAAW,EAAE,oBAAoB;QACxC,MAAM,CAAC,WAAW,EAAE,kBAAkB;QACtC,MAAM,CAAC,WAAW,EAAE,gBAAgB;QACpC,MAAM,CAAC,WAAW,EAAE,eAAe;KACpC,CAAC;IACF,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,IAAI,KAAK,SAAS,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAClG,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type ValuesMergeExpression } from '../../../core/aspects/values-merge.js';
2
+ import type { HarborLocalInstallationConfig, HarborProductionInstallationConfig } from '../types.js';
3
+ export type HarborMappedHelmValues = Record<string, unknown> | ValuesMergeExpression;
4
+ /** Official Harbor chart values for the bounded development profile. */
5
+ export declare function mapHarborLocalInstallationToHelmValues(config: HarborLocalInstallationConfig): HarborMappedHelmValues;
6
+ /** Official Harbor chart values for the HA-oriented production profile. */
7
+ export declare function mapHarborProductionInstallationToHelmValues(config: HarborProductionInstallationConfig): HarborMappedHelmValues;
8
+ //# sourceMappingURL=helm-values-mapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helm-values-mapper.d.ts","sourceRoot":"","sources":["../../../../src/factories/harbor/utils/helm-values-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,uCAAuC,CAAC;AAG/C,OAAO,KAAK,EACV,6BAA6B,EAC7B,kCAAkC,EACnC,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,qBAAqB,CAAC;AAErF,wEAAwE;AACxE,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,6BAA6B,GACpC,sBAAsB,CAExB;AAED,2EAA2E;AAC3E,wBAAgB,2CAA2C,CACzD,MAAM,EAAE,kCAAkC,GACzC,sBAAsB,CAgBxB"}
@@ -0,0 +1,322 @@
1
+ import { isValuesMergeExpression, mergeValuesExpression, } from '../../../core/aspects/values-merge.js';
2
+ import { Cel } from '../../../core/references/cel.js';
3
+ import { isCelExpression, isKubernetesRef } from '../../../utils/type-guards.js';
4
+ /** Official Harbor chart values for the bounded development profile. */
5
+ export function mapHarborLocalInstallationToHelmValues(config) {
6
+ return mergeValuesLast(mapCommonValues(config, 'local-development'), config.values);
7
+ }
8
+ /** Official Harbor chart values for the HA-oriented production profile. */
9
+ export function mapHarborProductionInstallationToHelmValues(config) {
10
+ const values = mapCommonValues(config, 'production');
11
+ values.database = mapExternalDatabase(config.database);
12
+ values.redis = mapExternalCache(config.cache);
13
+ const components = ['core', 'portal', 'registry', 'jobservice', 'exporter'];
14
+ for (const component of components) {
15
+ values[component] = {
16
+ ...asObject(values[component]),
17
+ replicas: config.replicas[component],
18
+ resources: config.resources[component],
19
+ podDisruptionBudget: { enabled: true, minAvailable: 1 },
20
+ };
21
+ }
22
+ return mergeProductionValues(values, config.values);
23
+ }
24
+ function mapCommonValues(config, profile) {
25
+ const graphMode = isKubernetesRef(config.name);
26
+ const exposureType = config.exposure.type;
27
+ const tlsSource = graphMode
28
+ ? Cel.expr('schema.spec.exposure.tls.source == "cert-manager" ? "secret" : schema.spec.exposure.tls.source')
29
+ : config.exposure.tls.source === 'cert-manager'
30
+ ? 'secret'
31
+ : config.exposure.tls.source;
32
+ const tlsSecretName = graphMode
33
+ ? Cel.expr('schema.spec.exposure.tls.source == "cert-manager" ? schema.spec.certificate.secretName : (has(schema.spec.exposure.tls.secretName) ? schema.spec.exposure.tls.secretName : "")')
34
+ : config.exposure.tls.source === 'cert-manager'
35
+ ? config.certificate?.secretName
36
+ : config.exposure.tls.secretName;
37
+ const storage = config.storage;
38
+ const storageSecure = graphMode
39
+ ? Cel.expr('has(schema.spec.storage.secure) ? schema.spec.storage.secure : true')
40
+ : (storage.secure ?? true);
41
+ const storageSkipVerify = graphMode
42
+ ? Cel.expr('has(schema.spec.storage.skipVerify) ? schema.spec.storage.skipVerify : false')
43
+ : (storage.skipVerify ?? false);
44
+ const disableRedirect = graphMode
45
+ ? Cel.expr('has(schema.spec.storage.disableRedirect) ? schema.spec.storage.disableRedirect : true')
46
+ : (storage.disableRedirect ?? true);
47
+ const trivyEnabled = graphMode
48
+ ? Cel.expr('has(schema.spec.trivyEnabled) ? schema.spec.trivyEnabled : true')
49
+ : (config.trivyEnabled ?? true);
50
+ const metricsEnabled = graphMode
51
+ ? Cel.expr('has(schema.spec.metricsEnabled) ? schema.spec.metricsEnabled : false')
52
+ : (config.metricsEnabled ?? false);
53
+ const pvcStorageClass = graphMode
54
+ ? Cel.expr('has(schema.spec.pvcStorageClassName) ? schema.spec.pvcStorageClassName : ""')
55
+ : (config.pvcStorageClassName ?? '');
56
+ validateHarborConfig(config, graphMode);
57
+ const values = {
58
+ expose: {
59
+ type: exposureType,
60
+ tls: {
61
+ enabled: config.exposure.tls.enabled,
62
+ certSource: tlsSource,
63
+ secret: { secretName: tlsSecretName ?? '' },
64
+ },
65
+ ingress: {
66
+ hosts: {
67
+ core: graphMode
68
+ ? Cel.expr('has(schema.spec.exposure.ingress) ? schema.spec.exposure.ingress.host : ""')
69
+ : (config.exposure.ingress?.host ?? ''),
70
+ },
71
+ className: graphMode
72
+ ? Cel.expr('has(schema.spec.exposure.ingress) && has(schema.spec.exposure.ingress.className) ? schema.spec.exposure.ingress.className : ""')
73
+ : (config.exposure.ingress?.className ?? ''),
74
+ annotations: graphMode
75
+ ? Cel.expr('has(schema.spec.exposure.ingress) && has(schema.spec.exposure.ingress.annotations) ? schema.spec.exposure.ingress.annotations : {}')
76
+ : (config.exposure.ingress?.annotations ?? {}),
77
+ },
78
+ nodePort: {
79
+ ports: {
80
+ http: {
81
+ port: 80,
82
+ nodePort: graphMode
83
+ ? Cel.expr('has(schema.spec.exposure.nodePort) && has(schema.spec.exposure.nodePort.http) ? schema.spec.exposure.nodePort.http : 30002')
84
+ : (config.exposure.nodePort?.http ?? 30002),
85
+ },
86
+ https: {
87
+ port: 443,
88
+ nodePort: graphMode
89
+ ? Cel.expr('has(schema.spec.exposure.nodePort) && has(schema.spec.exposure.nodePort.https) ? schema.spec.exposure.nodePort.https : 30003')
90
+ : (config.exposure.nodePort?.https ?? 30003),
91
+ },
92
+ },
93
+ },
94
+ },
95
+ externalURL: config.exposure.externalUrl,
96
+ persistence: {
97
+ enabled: true,
98
+ resourcePolicy: 'keep',
99
+ persistentVolumeClaim: {
100
+ database: { storageClass: pvcStorageClass },
101
+ redis: { storageClass: pvcStorageClass },
102
+ trivy: { storageClass: pvcStorageClass },
103
+ },
104
+ imageChartStorage: {
105
+ type: 's3',
106
+ disableredirect: disableRedirect,
107
+ ...(storage.caBundleSecretName ? { caBundleSecretName: storage.caBundleSecretName } : {}),
108
+ s3: {
109
+ existingSecret: storage.existingSecret,
110
+ region: storage.region,
111
+ regionendpoint: storage.regionEndpoint,
112
+ bucket: storage.bucket,
113
+ secure: storageSecure,
114
+ skipverify: storageSkipVerify,
115
+ v4auth: true,
116
+ ...(storage.rootDirectory ? { rootdirectory: storage.rootDirectory } : {}),
117
+ },
118
+ },
119
+ },
120
+ existingSecretAdminPassword: config.adminPasswordSecret.name,
121
+ existingSecretAdminPasswordKey: graphMode
122
+ ? Cel.expr('has(schema.spec.adminPasswordSecret.key) ? schema.spec.adminPasswordSecret.key : "HARBOR_ADMIN_PASSWORD"')
123
+ : (config.adminPasswordSecret.key ?? 'HARBOR_ADMIN_PASSWORD'),
124
+ existingSecretSecretKey: config.componentSecrets.encryptionKey,
125
+ core: {
126
+ existingSecret: config.componentSecrets.core,
127
+ ...(config.componentSecrets.xsrf ? { existingXsrfSecret: config.componentSecrets.xsrf } : {}),
128
+ },
129
+ jobservice: {
130
+ existingSecret: config.componentSecrets.jobservice,
131
+ jobLoggers: ['database'],
132
+ },
133
+ registry: {
134
+ existingSecret: config.componentSecrets.registry,
135
+ credentials: { existingSecret: config.componentSecrets.registryCredentials },
136
+ },
137
+ trivy: { enabled: trivyEnabled },
138
+ metrics: { enabled: metricsEnabled },
139
+ ...(config.caBundleSecretName ? { caBundleSecretName: config.caBundleSecretName } : {}),
140
+ internalTLS: mapInternalTls(config, graphMode),
141
+ };
142
+ if (profile === 'local-development') {
143
+ values.database = graphMode
144
+ ? {
145
+ type: Cel.expr('has(schema.spec.database) ? "external" : "internal"'),
146
+ external: mapExternalDatabase(config.database, graphMode).external,
147
+ }
148
+ : config.database
149
+ ? mapExternalDatabase(config.database)
150
+ : { type: 'internal' };
151
+ values.redis = graphMode
152
+ ? {
153
+ type: Cel.expr('has(schema.spec.cache) ? "external" : "internal"'),
154
+ external: mapExternalCache(config.cache, graphMode).external,
155
+ }
156
+ : config.cache
157
+ ? mapExternalCache(config.cache)
158
+ : { type: 'internal' };
159
+ }
160
+ return values;
161
+ }
162
+ function mapExternalDatabase(database, graphMode = false) {
163
+ if (!database && !graphMode)
164
+ return { type: 'internal' };
165
+ return {
166
+ type: 'external',
167
+ external: {
168
+ host: database?.host,
169
+ port: graphMode
170
+ ? Cel.expr('string(has(schema.spec.database) && has(schema.spec.database.port) ? schema.spec.database.port : 5432)')
171
+ : String(database?.port ?? 5432),
172
+ username: database?.username,
173
+ coreDatabase: database?.database,
174
+ existingSecret: database?.existingSecret,
175
+ sslmode: graphMode
176
+ ? Cel.expr('has(schema.spec.database) && has(schema.spec.database.sslMode) ? schema.spec.database.sslMode : "require"')
177
+ : (database?.sslMode ?? 'require'),
178
+ },
179
+ };
180
+ }
181
+ function mapExternalCache(cache, graphMode = false) {
182
+ if (!cache && !graphMode)
183
+ return { type: 'internal' };
184
+ return {
185
+ type: 'external',
186
+ external: {
187
+ addr: cache?.address,
188
+ username: graphMode
189
+ ? Cel.expr('has(schema.spec.cache) && has(schema.spec.cache.username) ? schema.spec.cache.username : ""')
190
+ : (cache?.username ?? ''),
191
+ existingSecret: cache?.existingSecret,
192
+ coreDatabaseIndex: '0',
193
+ jobserviceDatabaseIndex: '1',
194
+ registryDatabaseIndex: '2',
195
+ trivyAdapterIndex: '5',
196
+ tlsOptions: {
197
+ enable: graphMode
198
+ ? Cel.expr('has(schema.spec.cache) && has(schema.spec.cache.tls) ? schema.spec.cache.tls.enabled : false')
199
+ : (cache?.tls?.enabled ?? false),
200
+ ...(cache?.tls?.caBundleSecretName
201
+ ? { caBundleSecretName: cache.tls.caBundleSecretName }
202
+ : {}),
203
+ },
204
+ },
205
+ };
206
+ }
207
+ function mapInternalTls(config, graphMode) {
208
+ const internal = config.internalTls;
209
+ return {
210
+ enabled: graphMode
211
+ ? Cel.expr('has(schema.spec.internalTls) ? schema.spec.internalTls.enabled : false')
212
+ : (internal?.enabled ?? false),
213
+ certSource: graphMode
214
+ ? Cel.expr('has(schema.spec.internalTls) && has(schema.spec.internalTls.certSource) ? schema.spec.internalTls.certSource : "auto"')
215
+ : (internal?.certSource ?? 'auto'),
216
+ ...(internal?.coreSecretName ? { core: { secretName: internal.coreSecretName } } : {}),
217
+ ...(internal?.jobserviceSecretName
218
+ ? { jobservice: { secretName: internal.jobserviceSecretName } }
219
+ : {}),
220
+ ...(internal?.registrySecretName
221
+ ? { registry: { secretName: internal.registrySecretName } }
222
+ : {}),
223
+ ...(internal?.portalSecretName ? { portal: { secretName: internal.portalSecretName } } : {}),
224
+ ...(internal?.trivySecretName ? { trivy: { secretName: internal.trivySecretName } } : {}),
225
+ };
226
+ }
227
+ function validateHarborConfig(config, graphMode) {
228
+ if (graphMode)
229
+ return;
230
+ if (config.exposure.type === 'ingress' && !config.exposure.ingress?.host) {
231
+ throw new Error('Harbor ingress exposure requires exposure.ingress.host.');
232
+ }
233
+ if ((config.exposure.tls.source === 'secret' && !config.exposure.tls.secretName) ||
234
+ (config.exposure.tls.source === 'cert-manager' && !config.certificate?.secretName)) {
235
+ throw new Error('Harbor TLS source secret/cert-manager requires the corresponding Secret name.');
236
+ }
237
+ if (config.exposure.tls.enabled && config.exposure.tls.source === 'none') {
238
+ throw new Error('Harbor TLS cannot be enabled while its certificate source is none.');
239
+ }
240
+ if (config.profile === 'production') {
241
+ if (!config.exposure.tls.enabled) {
242
+ throw new Error('Production Harbor requires TLS exposure.');
243
+ }
244
+ if (config.storage.skipVerify) {
245
+ throw new Error('Production Harbor cannot skip S3 certificate verification.');
246
+ }
247
+ if (!config.networkPolicy.enabled) {
248
+ throw new Error('Production Harbor requires an enabled NetworkPolicy contract.');
249
+ }
250
+ if (Object.keys(config.networkPolicy.ingressNamespaceLabels).length === 0) {
251
+ throw new Error('Production Harbor NetworkPolicy requires ingress controller namespace labels.');
252
+ }
253
+ if (config.networkPolicy.egressNamespaceLabels.length === 0 &&
254
+ !config.networkPolicy.egressCidrs?.length) {
255
+ throw new Error('Production Harbor NetworkPolicy must declare provider namespaces or explicit egress CIDRs.');
256
+ }
257
+ }
258
+ }
259
+ function mergeValuesLast(base, overrides) {
260
+ if (overrides === undefined)
261
+ return base;
262
+ if (isKubernetesRef(overrides) ||
263
+ isCelExpression(overrides) ||
264
+ isValuesMergeExpression(overrides)) {
265
+ return mergeValuesExpression(base, overrides);
266
+ }
267
+ if (isPlainObject(overrides))
268
+ deepMerge(base, overrides);
269
+ return base;
270
+ }
271
+ /**
272
+ * Preserve production escape-hatch additions without allowing them to weaken
273
+ * the typed availability, credential, TLS, storage, or network contract.
274
+ * Local development intentionally retains chart-values-last behavior.
275
+ */
276
+ function mergeProductionValues(protectedValues, overrides) {
277
+ if (overrides === undefined)
278
+ return protectedValues;
279
+ if (isKubernetesRef(overrides) ||
280
+ isCelExpression(overrides) ||
281
+ isValuesMergeExpression(overrides)) {
282
+ return mergeValuesExpression(overrides, protectedValues);
283
+ }
284
+ if (!isPlainObject(overrides))
285
+ return protectedValues;
286
+ const merged = cloneValue(overrides);
287
+ deepMerge(merged, protectedValues);
288
+ return merged;
289
+ }
290
+ function asObject(value) {
291
+ return isPlainObject(value) ? value : {};
292
+ }
293
+ function isPlainObject(value) {
294
+ return (!!value &&
295
+ typeof value === 'object' &&
296
+ !Array.isArray(value) &&
297
+ !isKubernetesRef(value) &&
298
+ !isCelExpression(value) &&
299
+ !isValuesMergeExpression(value));
300
+ }
301
+ function cloneValue(value) {
302
+ if (Array.isArray(value))
303
+ return value.map(cloneValue);
304
+ if (isPlainObject(value)) {
305
+ return Object.fromEntries(Object.entries(value).map(([key, child]) => [key, cloneValue(child)]));
306
+ }
307
+ return value;
308
+ }
309
+ function deepMerge(target, source) {
310
+ for (const [key, sourceValue] of Object.entries(source)) {
311
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype')
312
+ continue;
313
+ const targetValue = target[key];
314
+ if (isPlainObject(targetValue) && isPlainObject(sourceValue)) {
315
+ deepMerge(targetValue, sourceValue);
316
+ }
317
+ else {
318
+ target[key] = cloneValue(sourceValue);
319
+ }
320
+ }
321
+ }
322
+ //# sourceMappingURL=helm-values-mapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helm-values-mapper.js","sourceRoot":"","sources":["../../../../src/factories/harbor/utils/helm-values-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,qBAAqB,GAEtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAQjF,wEAAwE;AACxE,MAAM,UAAU,sCAAsC,CACpD,MAAqC;IAErC,OAAO,eAAe,CAAC,eAAe,CAAC,MAAM,EAAE,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AACtF,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,2CAA2C,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,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CACtE,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,SAAS,CAAC,MAA+B,EAAE,MAA+B;IACjF,KAAK,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACxD,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,aAAa,IAAI,GAAG,KAAK,WAAW;YAAE,SAAS;QAClF,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,aAAa,CAAC,WAAW,CAAC,IAAI,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;YAC7D,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './helm-values-mapper.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/harbor/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './helm-values-mapper.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factories/harbor/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -28,6 +28,16 @@ export interface HelmReleaseConfig<TValues extends object = TypeKroValueTreeObje
28
28
  * mixed-template strings, arrays, and plain objects recursively.
29
29
  */
30
30
  values?: TypeKroChartValue<TValues>;
31
+ /**
32
+ * Flux install policy. The supplied fields override TypeKro's bounded retry
33
+ * defaults; nested remediation fields are merged rather than replaced.
34
+ */
35
+ install?: HelmReleaseSpec['install'];
36
+ /**
37
+ * Flux upgrade policy. Stateful charts can disable automatic remediation
38
+ * when rolling back across a database migration would be unsafe.
39
+ */
40
+ upgrade?: HelmReleaseSpec['upgrade'];
31
41
  driftDetection?: HelmReleaseSpec['driftDetection'];
32
42
  id?: string;
33
43
  }