typekro 0.31.1 → 0.32.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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.d.ts.map +1 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.js +0 -1
- package/dist/compositions/typekro-runtime/typekro-runtime.js.map +1 -1
- package/dist/compositions/typekro-runtime/types.d.ts +1 -0
- package/dist/compositions/typekro-runtime/types.d.ts.map +1 -1
- package/dist/core/metadata/resource-metadata.d.ts +13 -0
- package/dist/core/metadata/resource-metadata.d.ts.map +1 -1
- package/dist/core/metadata/resource-metadata.js.map +1 -1
- package/dist/core/planning/direct-runtime-adapter.d.ts.map +1 -1
- package/dist/core/planning/direct-runtime-adapter.js +23 -0
- package/dist/core/planning/direct-runtime-adapter.js.map +1 -1
- package/dist/core/planning/planner.d.ts.map +1 -1
- package/dist/core/planning/planner.js +13 -4
- package/dist/core/planning/planner.js.map +1 -1
- package/dist/core/references/external-refs.d.ts +1 -1
- package/dist/core/references/external-refs.d.ts.map +1 -1
- package/dist/core/references/external-refs.js +5 -1
- package/dist/core/references/external-refs.js.map +1 -1
- package/dist/core/serialization/schema.d.ts.map +1 -1
- package/dist/core/serialization/schema.js +47 -0
- package/dist/core/serialization/schema.js.map +1 -1
- package/dist/factories/hatchet/compositions/hatchet-installation.d.ts +53 -0
- package/dist/factories/hatchet/compositions/hatchet-installation.d.ts.map +1 -0
- package/dist/factories/hatchet/compositions/hatchet-installation.js +296 -0
- package/dist/factories/hatchet/compositions/hatchet-installation.js.map +1 -0
- package/dist/factories/hatchet/compositions/index.d.ts +2 -0
- package/dist/factories/hatchet/compositions/index.d.ts.map +1 -0
- package/dist/factories/hatchet/compositions/index.js +2 -0
- package/dist/factories/hatchet/compositions/index.js.map +1 -0
- package/dist/factories/hatchet/index.d.ts +5 -0
- package/dist/factories/hatchet/index.d.ts.map +1 -0
- package/dist/factories/hatchet/index.js +5 -0
- package/dist/factories/hatchet/index.js.map +1 -0
- package/dist/factories/hatchet/resources/helm.d.ts +12 -0
- package/dist/factories/hatchet/resources/helm.d.ts.map +1 -0
- package/dist/factories/hatchet/resources/helm.js +49 -0
- package/dist/factories/hatchet/resources/helm.js.map +1 -0
- package/dist/factories/hatchet/resources/index.d.ts +2 -0
- package/dist/factories/hatchet/resources/index.d.ts.map +1 -0
- package/dist/factories/hatchet/resources/index.js +2 -0
- package/dist/factories/hatchet/resources/index.js.map +1 -0
- package/dist/factories/hatchet/types.d.ts +85 -0
- package/dist/factories/hatchet/types.d.ts.map +1 -0
- package/dist/factories/hatchet/types.js +87 -0
- package/dist/factories/hatchet/types.js.map +1 -0
- package/dist/factories/helm/helm-release.d.ts +7 -2
- package/dist/factories/helm/helm-release.d.ts.map +1 -1
- package/dist/factories/helm/helm-release.js +5 -0
- package/dist/factories/helm/helm-release.js.map +1 -1
- package/dist/factories/helm/index.d.ts +1 -1
- package/dist/factories/helm/index.d.ts.map +1 -1
- package/dist/factories/helm/readiness-evaluators.d.ts.map +1 -1
- package/dist/factories/helm/readiness-evaluators.js +5 -2
- package/dist/factories/helm/readiness-evaluators.js.map +1 -1
- package/dist/factories/helm/types.d.ts +20 -0
- package/dist/factories/helm/types.d.ts.map +1 -1
- package/dist/factories/index.d.ts +2 -1
- package/dist/factories/index.d.ts.map +1 -1
- package/dist/factories/index.js +4 -0
- package/dist/factories/index.js.map +1 -1
- package/dist/factories/opensearch/compositions/cluster.d.ts +38 -0
- package/dist/factories/opensearch/compositions/cluster.d.ts.map +1 -0
- package/dist/factories/opensearch/compositions/cluster.js +338 -0
- package/dist/factories/opensearch/compositions/cluster.js.map +1 -0
- package/dist/factories/opensearch/compositions/index.d.ts +4 -0
- package/dist/factories/opensearch/compositions/index.d.ts.map +1 -0
- package/dist/factories/opensearch/compositions/index.js +4 -0
- package/dist/factories/opensearch/compositions/index.js.map +1 -0
- package/dist/factories/opensearch/compositions/operator-bootstrap.d.ts +40 -0
- package/dist/factories/opensearch/compositions/operator-bootstrap.d.ts.map +1 -0
- package/dist/factories/opensearch/compositions/operator-bootstrap.js +89 -0
- package/dist/factories/opensearch/compositions/operator-bootstrap.js.map +1 -0
- package/dist/factories/opensearch/compositions/repository.d.ts +8 -0
- package/dist/factories/opensearch/compositions/repository.d.ts.map +1 -0
- package/dist/factories/opensearch/compositions/repository.js +21 -0
- package/dist/factories/opensearch/compositions/repository.js.map +1 -0
- package/dist/factories/opensearch/constants.d.ts +2 -0
- package/dist/factories/opensearch/constants.d.ts.map +1 -0
- package/dist/factories/opensearch/constants.js +2 -0
- package/dist/factories/opensearch/constants.js.map +1 -0
- package/dist/factories/opensearch/index.d.ts +12 -0
- package/dist/factories/opensearch/index.d.ts.map +1 -0
- package/dist/factories/opensearch/index.js +12 -0
- package/dist/factories/opensearch/index.js.map +1 -0
- package/dist/factories/opensearch/resources/cluster.d.ts +6 -0
- package/dist/factories/opensearch/resources/cluster.d.ts.map +1 -0
- package/dist/factories/opensearch/resources/cluster.js +175 -0
- package/dist/factories/opensearch/resources/cluster.js.map +1 -0
- package/dist/factories/opensearch/resources/helm.d.ts +17 -0
- package/dist/factories/opensearch/resources/helm.d.ts.map +1 -0
- package/dist/factories/opensearch/resources/helm.js +44 -0
- package/dist/factories/opensearch/resources/helm.js.map +1 -0
- package/dist/factories/opensearch/resources/index.d.ts +3 -0
- package/dist/factories/opensearch/resources/index.d.ts.map +1 -0
- package/dist/factories/opensearch/resources/index.js +3 -0
- package/dist/factories/opensearch/resources/index.js.map +1 -0
- package/dist/factories/opensearch/types.d.ts +281 -0
- package/dist/factories/opensearch/types.d.ts.map +1 -0
- package/dist/factories/opensearch/types.js +94 -0
- package/dist/factories/opensearch/types.js.map +1 -0
- package/package.json +11 -2
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { registerPortableReadinessEvaluator } from '../../../core/readiness/index.js';
|
|
2
|
+
import { createResource } from '../../shared.js';
|
|
3
|
+
export const OPENSEARCH_HTTP_PORT = 9200;
|
|
4
|
+
export function openSearchClusterReadinessEvaluator(liveResource) {
|
|
5
|
+
const observed = liveResource;
|
|
6
|
+
const status = observed?.status;
|
|
7
|
+
if (!status) {
|
|
8
|
+
return {
|
|
9
|
+
ready: false,
|
|
10
|
+
reason: 'StatusMissing',
|
|
11
|
+
message: 'OpenSearchCluster has no observed status yet',
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
const failedComponent = status.componentsStatus?.find(({ status: componentStatus }) => ['failed', 'error'].includes(componentStatus?.toLowerCase() ?? ''));
|
|
15
|
+
if (failedComponent) {
|
|
16
|
+
return {
|
|
17
|
+
ready: false,
|
|
18
|
+
reason: 'ComponentFailed',
|
|
19
|
+
message: failedComponent.description ??
|
|
20
|
+
`OpenSearch component ${failedComponent.component ?? '<unknown>'} failed`,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const expectedNodes = observed?.spec?.nodePools.reduce((total, pool) => total + pool.replicas, 0) ?? 1;
|
|
24
|
+
const expectedVersion = observed?.spec?.general.version;
|
|
25
|
+
const observedVersion = status.version;
|
|
26
|
+
const ready = status.initialized === true &&
|
|
27
|
+
(status.availableNodes ?? 0) >= expectedNodes &&
|
|
28
|
+
['green', 'yellow'].includes(status.health?.toLowerCase() ?? '') &&
|
|
29
|
+
typeof expectedVersion === 'string' &&
|
|
30
|
+
observedVersion === expectedVersion;
|
|
31
|
+
return ready
|
|
32
|
+
? {
|
|
33
|
+
ready: true,
|
|
34
|
+
reason: 'ClusterReady',
|
|
35
|
+
message: `${status.availableNodes ?? 0} nodes available; health=${status.health}; version=${observedVersion}`,
|
|
36
|
+
}
|
|
37
|
+
: {
|
|
38
|
+
ready: false,
|
|
39
|
+
reason: expectedVersion && observedVersion && observedVersion !== expectedVersion
|
|
40
|
+
? 'VersionProgressing'
|
|
41
|
+
: status.phase || 'ClusterProgressing',
|
|
42
|
+
message: `${status.availableNodes ?? 0} nodes available; health=${status.health ?? 'unknown'}; version=${observedVersion ?? 'unknown'}; desiredVersion=${expectedVersion ?? 'unknown'}`,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
registerPortableReadinessEvaluator('typekro.readiness.opensearch.cluster', '1', openSearchClusterReadinessEvaluator);
|
|
46
|
+
function compileOpenSearchClusterSpec(config) {
|
|
47
|
+
const snapshot = config.snapshots;
|
|
48
|
+
const tls = config.tls.source === 'generated'
|
|
49
|
+
? {
|
|
50
|
+
http: { generate: true },
|
|
51
|
+
transport: { generate: true, perNode: true },
|
|
52
|
+
}
|
|
53
|
+
: {
|
|
54
|
+
http: {
|
|
55
|
+
generate: false,
|
|
56
|
+
secret: { name: config.tls.secretName },
|
|
57
|
+
adminDn: config.tls.adminDn,
|
|
58
|
+
},
|
|
59
|
+
transport: { generate: true, perNode: true },
|
|
60
|
+
};
|
|
61
|
+
return {
|
|
62
|
+
general: {
|
|
63
|
+
serviceName: config.serviceName,
|
|
64
|
+
version: config.version,
|
|
65
|
+
httpPort: OPENSEARCH_HTTP_PORT,
|
|
66
|
+
vendor: 'opensearch',
|
|
67
|
+
...(snapshot ? { pluginsList: ['repository-s3'] } : {}),
|
|
68
|
+
drainDataNodes: true,
|
|
69
|
+
monitoring: { enable: config.monitoring },
|
|
70
|
+
...(snapshot
|
|
71
|
+
? {
|
|
72
|
+
keystore: [
|
|
73
|
+
{
|
|
74
|
+
secret: {
|
|
75
|
+
name: snapshot.credentialsSecret.name,
|
|
76
|
+
keyMappings: {
|
|
77
|
+
[snapshot.credentialsSecret.accessKeyKey]: 's3.client.default.access_key',
|
|
78
|
+
[snapshot.credentialsSecret.secretKeyKey]: 's3.client.default.secret_key',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
snapshotRepositories: [
|
|
84
|
+
{
|
|
85
|
+
name: snapshot.repository,
|
|
86
|
+
type: 's3',
|
|
87
|
+
settings: {
|
|
88
|
+
bucket: snapshot.bucket,
|
|
89
|
+
...(snapshot.endpoint ? { endpoint: snapshot.endpoint } : {}),
|
|
90
|
+
...(snapshot.region ? { region: snapshot.region } : {}),
|
|
91
|
+
...(snapshot.basePath ? { base_path: snapshot.basePath } : {}),
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
}
|
|
96
|
+
: {}),
|
|
97
|
+
},
|
|
98
|
+
security: {
|
|
99
|
+
config: {
|
|
100
|
+
...(config.adminCredentialsSecret
|
|
101
|
+
? { adminCredentialsSecret: config.adminCredentialsSecret }
|
|
102
|
+
: {}),
|
|
103
|
+
...(config.tls.source === 'generated'
|
|
104
|
+
? {}
|
|
105
|
+
: { adminSecret: { name: config.tls.adminSecretName } }),
|
|
106
|
+
},
|
|
107
|
+
tls,
|
|
108
|
+
},
|
|
109
|
+
dashboards: {
|
|
110
|
+
enable: false,
|
|
111
|
+
...(config.dashboardCredentialsSecret
|
|
112
|
+
? {
|
|
113
|
+
opensearchCredentialsSecret: config.dashboardCredentialsSecret,
|
|
114
|
+
}
|
|
115
|
+
: {}),
|
|
116
|
+
},
|
|
117
|
+
nodePools: [
|
|
118
|
+
{
|
|
119
|
+
component: 'nodes',
|
|
120
|
+
replicas: config.nodes,
|
|
121
|
+
roles: config.roles,
|
|
122
|
+
diskSize: config.storage.size,
|
|
123
|
+
...(config.storage.storageClassName
|
|
124
|
+
? {
|
|
125
|
+
persistence: {
|
|
126
|
+
pvc: {
|
|
127
|
+
storageClass: config.storage.storageClassName,
|
|
128
|
+
accessModes: ['ReadWriteOnce'],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
}
|
|
132
|
+
: {}),
|
|
133
|
+
...(config.resources ? { resources: config.resources } : {}),
|
|
134
|
+
...(config.podDisruptionBudget
|
|
135
|
+
? {
|
|
136
|
+
pdb: {
|
|
137
|
+
enable: true,
|
|
138
|
+
...(config.podDisruptionBudget.minAvailable !== undefined
|
|
139
|
+
? { minAvailable: config.podDisruptionBudget.minAvailable }
|
|
140
|
+
: {}),
|
|
141
|
+
...(config.podDisruptionBudget.maxUnavailable !== undefined
|
|
142
|
+
? { maxUnavailable: config.podDisruptionBudget.maxUnavailable }
|
|
143
|
+
: {}),
|
|
144
|
+
},
|
|
145
|
+
}
|
|
146
|
+
: {}),
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export function openSearchClusterResource(config) {
|
|
152
|
+
return createResource({
|
|
153
|
+
apiVersion: 'opensearch.org/v1',
|
|
154
|
+
kind: 'OpenSearchCluster',
|
|
155
|
+
metadata: {
|
|
156
|
+
name: config.name,
|
|
157
|
+
namespace: config.namespace,
|
|
158
|
+
labels: {
|
|
159
|
+
'app.kubernetes.io/name': 'opensearch',
|
|
160
|
+
'app.kubernetes.io/instance': config.name,
|
|
161
|
+
'app.kubernetes.io/managed-by': 'typekro',
|
|
162
|
+
},
|
|
163
|
+
...(config.storage.deletionPolicy === 'retain'
|
|
164
|
+
? {
|
|
165
|
+
annotations: {
|
|
166
|
+
'typekro.dev/storage-retention': 'PVC retention applies only while the externally owned namespace survives',
|
|
167
|
+
},
|
|
168
|
+
}
|
|
169
|
+
: {}),
|
|
170
|
+
},
|
|
171
|
+
spec: compileOpenSearchClusterSpec(config),
|
|
172
|
+
...(config.id ? { id: config.id } : {}),
|
|
173
|
+
}, { scope: 'namespaced' }).withReadinessEvaluator(openSearchClusterReadinessEvaluator);
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=cluster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster.js","sourceRoot":"","sources":["../../../../src/factories/opensearch/resources/cluster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;AAEtF,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,MAAM,UAAU,mCAAmC,CAAC,YAAqB;IACvE,MAAM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../core/types/index.js';
|
|
2
|
+
import { type HelmRepositorySpec, type HelmRepositoryStatus } from '../../helm/helm-repository.js';
|
|
3
|
+
import type { HelmReleaseSpec, HelmReleaseStatus } from '../../helm/types.js';
|
|
4
|
+
import type { OpenSearchOperatorHelmReleaseConfig } from '../types.js';
|
|
5
|
+
export declare const DEFAULT_OPENSEARCH_OPERATOR_REPOSITORY_URL = "https://opensearch-project.github.io/opensearch-k8s-operator/";
|
|
6
|
+
export declare const DEFAULT_OPENSEARCH_OPERATOR_REPOSITORY_NAME = "opensearch-operator";
|
|
7
|
+
export declare const OPENSEARCH_OPERATOR_CHART_NAME = "opensearch-operator";
|
|
8
|
+
export declare const DEFAULT_OPENSEARCH_OPERATOR_VERSION = "3.0.2";
|
|
9
|
+
export declare function openSearchOperatorHelmRepository(config: Composable<{
|
|
10
|
+
readonly name?: string;
|
|
11
|
+
readonly namespace?: string;
|
|
12
|
+
readonly url?: string;
|
|
13
|
+
readonly interval?: string;
|
|
14
|
+
readonly id?: string;
|
|
15
|
+
}>): Enhanced<HelmRepositorySpec, HelmRepositoryStatus>;
|
|
16
|
+
export declare function openSearchOperatorHelmRelease(config: Composable<OpenSearchOperatorHelmReleaseConfig>): Enhanced<HelmReleaseSpec, HelmReleaseStatus>;
|
|
17
|
+
//# sourceMappingURL=helm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm.d.ts","sourceRoot":"","sources":["../../../../src/factories/opensearch/resources/helm.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGzE,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AAEvE,eAAO,MAAM,0CAA0C,kEACU,CAAC;AAClE,eAAO,MAAM,2CAA2C,wBAAwB,CAAC;AACjF,eAAO,MAAM,8BAA8B,wBAAwB,CAAC;AACpE,eAAO,MAAM,mCAAmC,UAAU,CAAC;AAE3D,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC,GACD,QAAQ,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAYpD;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,UAAU,CAAC,mCAAmC,CAAC,GACtD,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAsB9C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DEFAULT_FLUX_NAMESPACE } from '../../../core/config/defaults.js';
|
|
2
|
+
import { setMetadataField } from '../../../core/metadata/resource-metadata.js';
|
|
3
|
+
import { Cel } from '../../../core/references/cel.js';
|
|
4
|
+
import { isKubernetesRef } from '../../../utils/type-guards.js';
|
|
5
|
+
import { helmRelease } from '../../helm/helm-release.js';
|
|
6
|
+
import { createHelmRepositoryReadinessEvaluator, helmRepository, } from '../../helm/helm-repository.js';
|
|
7
|
+
import { createLabeledHelmReleaseEvaluator } from '../../helm/readiness-evaluators.js';
|
|
8
|
+
export const DEFAULT_OPENSEARCH_OPERATOR_REPOSITORY_URL = 'https://opensearch-project.github.io/opensearch-k8s-operator/';
|
|
9
|
+
export const DEFAULT_OPENSEARCH_OPERATOR_REPOSITORY_NAME = 'opensearch-operator';
|
|
10
|
+
export const OPENSEARCH_OPERATOR_CHART_NAME = 'opensearch-operator';
|
|
11
|
+
export const DEFAULT_OPENSEARCH_OPERATOR_VERSION = '3.0.2';
|
|
12
|
+
export function openSearchOperatorHelmRepository(config) {
|
|
13
|
+
const repository = helmRepository({
|
|
14
|
+
name: config.name || DEFAULT_OPENSEARCH_OPERATOR_REPOSITORY_NAME,
|
|
15
|
+
namespace: config.namespace || DEFAULT_FLUX_NAMESPACE,
|
|
16
|
+
url: config.url || DEFAULT_OPENSEARCH_OPERATOR_REPOSITORY_URL,
|
|
17
|
+
interval: config.interval || '5m',
|
|
18
|
+
...(config.id ? { id: config.id } : {}),
|
|
19
|
+
}).withReadinessEvaluator(createHelmRepositoryReadinessEvaluator('OpenSearch'));
|
|
20
|
+
setMetadataField(repository, 'scopes', ['cluster']);
|
|
21
|
+
return repository;
|
|
22
|
+
}
|
|
23
|
+
export function openSearchOperatorHelmRelease(config) {
|
|
24
|
+
return helmRelease({
|
|
25
|
+
name: config.name,
|
|
26
|
+
namespace: config.namespace,
|
|
27
|
+
chart: {
|
|
28
|
+
repository: DEFAULT_OPENSEARCH_OPERATOR_REPOSITORY_URL,
|
|
29
|
+
name: OPENSEARCH_OPERATOR_CHART_NAME,
|
|
30
|
+
version: config.version,
|
|
31
|
+
},
|
|
32
|
+
sourceRef: {
|
|
33
|
+
name: config.repositoryName,
|
|
34
|
+
namespace: config.repositoryNamespace,
|
|
35
|
+
kind: 'HelmRepository',
|
|
36
|
+
},
|
|
37
|
+
driftDetection: { mode: 'enabled' },
|
|
38
|
+
values: isKubernetesRef(config.values)
|
|
39
|
+
? Cel.default(config.values, {})
|
|
40
|
+
: (config.values ?? {}),
|
|
41
|
+
...(config.id ? { id: config.id } : {}),
|
|
42
|
+
}).withReadinessEvaluator(createLabeledHelmReleaseEvaluator('OpenSearch'));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=helm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helm.js","sourceRoot":"","sources":["../../../../src/factories/opensearch/resources/helm.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;IAEvD,OAAO,WAAW,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,KAAK,EAAE;YACL,UAAU,EAAE,0CAA0C;YACtD,IAAI,EAAE,8BAA8B;YACpC,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB;QACD,SAAS,EAAE;YACT,IAAI,EAAE,MAAM,CAAC,cAAc;YAC3B,SAAS,EAAE,MAAM,CAAC,mBAAmB;YACrC,IAAI,EAAE,gBAAgB;SACvB;QACD,cAAc,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QACnC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,MAAM,CAAC;YACpC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;YAChC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;QACzB,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC,CAAC,sBAAsB,CACvB,iCAAiC,CAAC,YAAY,CAAC,CACA,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/factories/opensearch/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/factories/opensearch/resources/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import type { TypeKroChartValue } from '../../core/types/common.js';
|
|
2
|
+
import type { Composable } from '../../core/types/index.js';
|
|
3
|
+
export declare const OpenSearchOperatorBootstrapConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
4
|
+
name: string;
|
|
5
|
+
namespace?: string;
|
|
6
|
+
version?: string;
|
|
7
|
+
repositoryName?: string;
|
|
8
|
+
repositoryNamespace?: string;
|
|
9
|
+
customValues?: Record<string, unknown>;
|
|
10
|
+
}, {}>;
|
|
11
|
+
export type OpenSearchOperatorBootstrapConfig = typeof OpenSearchOperatorBootstrapConfigSchema.infer;
|
|
12
|
+
export declare const OpenSearchOperatorReferenceConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
13
|
+
name: string;
|
|
14
|
+
}, {}>;
|
|
15
|
+
export type OpenSearchOperatorReferenceConfig = typeof OpenSearchOperatorReferenceConfigSchema.infer;
|
|
16
|
+
export interface OpenSearchOperatorBootstrapBuildOptions {
|
|
17
|
+
readonly name?: string;
|
|
18
|
+
readonly namespace?: string;
|
|
19
|
+
readonly version?: string;
|
|
20
|
+
readonly repositoryName?: string;
|
|
21
|
+
readonly repositoryNamespace?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Concrete build-time values for the singleton operator installation.
|
|
24
|
+
* Runtime schema references cannot participate in singleton ownership.
|
|
25
|
+
*/
|
|
26
|
+
readonly customValues?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export declare const OpenSearchOperatorBootstrapStatusSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
29
|
+
ready: boolean;
|
|
30
|
+
failed: boolean;
|
|
31
|
+
phase: "Ready" | "Failed" | "Installing";
|
|
32
|
+
version: string;
|
|
33
|
+
}, {}>;
|
|
34
|
+
export type OpenSearchOperatorBootstrapStatus = typeof OpenSearchOperatorBootstrapStatusSchema.infer;
|
|
35
|
+
export declare const OpenSearchHelmRepositorySingletonSpecSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
36
|
+
name: string;
|
|
37
|
+
namespace: string;
|
|
38
|
+
url: string;
|
|
39
|
+
}, {}>;
|
|
40
|
+
export declare const OpenSearchHelmRepositorySingletonStatusSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
41
|
+
ready: boolean;
|
|
42
|
+
}, {}>;
|
|
43
|
+
export interface OpenSearchOperatorHelmReleaseConfig {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly namespace: string;
|
|
46
|
+
readonly version: string;
|
|
47
|
+
readonly repositoryName: string;
|
|
48
|
+
readonly repositoryNamespace: string;
|
|
49
|
+
readonly values?: TypeKroChartValue<Record<string, unknown>>;
|
|
50
|
+
readonly id?: string;
|
|
51
|
+
}
|
|
52
|
+
export declare const OpenSearchClusterConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
53
|
+
name: string;
|
|
54
|
+
namespace: string;
|
|
55
|
+
storage: {
|
|
56
|
+
size: string;
|
|
57
|
+
storageClassName?: string;
|
|
58
|
+
};
|
|
59
|
+
tls: {
|
|
60
|
+
source: "generated";
|
|
61
|
+
} | {
|
|
62
|
+
source: "secret";
|
|
63
|
+
secretName: string;
|
|
64
|
+
adminSecretName: string;
|
|
65
|
+
adminDn: string[];
|
|
66
|
+
} | {
|
|
67
|
+
source: "cert-manager";
|
|
68
|
+
secretName: string;
|
|
69
|
+
adminSecretName: string;
|
|
70
|
+
issuerName: string;
|
|
71
|
+
dnsNames: string[];
|
|
72
|
+
adminDn: string[];
|
|
73
|
+
issuerKind?: "Issuer" | "ClusterIssuer";
|
|
74
|
+
};
|
|
75
|
+
version?: string;
|
|
76
|
+
serviceName?: string;
|
|
77
|
+
lifecycle?: "owned-delete" | "external-delete" | "external-retain";
|
|
78
|
+
adminCredentialsSecret?: {
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
81
|
+
dashboardCredentialsSecret?: {
|
|
82
|
+
name: string;
|
|
83
|
+
};
|
|
84
|
+
resources?: {
|
|
85
|
+
requests?: {
|
|
86
|
+
cpu?: string;
|
|
87
|
+
memory?: string;
|
|
88
|
+
};
|
|
89
|
+
limits?: {
|
|
90
|
+
cpu?: string;
|
|
91
|
+
memory?: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
snapshots?: {
|
|
95
|
+
repository: string;
|
|
96
|
+
bucket: string;
|
|
97
|
+
credentialsSecret: {
|
|
98
|
+
name: string;
|
|
99
|
+
accessKeyKey?: string;
|
|
100
|
+
secretKeyKey?: string;
|
|
101
|
+
};
|
|
102
|
+
endpoint?: string;
|
|
103
|
+
region?: string;
|
|
104
|
+
basePath?: string;
|
|
105
|
+
};
|
|
106
|
+
monitoring?: boolean;
|
|
107
|
+
}, {}>;
|
|
108
|
+
export type OpenSearchClusterConfig = typeof OpenSearchClusterConfigSchema.infer;
|
|
109
|
+
export declare const OpenSearchClusterStatusSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
110
|
+
ready: boolean;
|
|
111
|
+
failed: boolean;
|
|
112
|
+
phase: "Ready" | "Failed" | "Installing";
|
|
113
|
+
endpoint: string;
|
|
114
|
+
credentialsSecret: string;
|
|
115
|
+
version: string;
|
|
116
|
+
availableNodes: number;
|
|
117
|
+
health: string;
|
|
118
|
+
snapshotRepository: string;
|
|
119
|
+
}, {}>;
|
|
120
|
+
export type OpenSearchClusterStatus = typeof OpenSearchClusterStatusSchema.infer;
|
|
121
|
+
export interface OpenSearchClusterTopology {
|
|
122
|
+
readonly profile?: 'development' | 'production';
|
|
123
|
+
readonly nodes?: number;
|
|
124
|
+
readonly roles?: readonly ('cluster_manager' | 'data' | 'ingest')[];
|
|
125
|
+
readonly podDisruptionBudget?: {
|
|
126
|
+
readonly minAvailable?: number;
|
|
127
|
+
readonly maxUnavailable?: number;
|
|
128
|
+
};
|
|
129
|
+
readonly networkPolicy?: {
|
|
130
|
+
readonly enabled: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Namespace containing the OpenSearch operator. Its health probes are
|
|
133
|
+
* always admitted independently of caller traffic.
|
|
134
|
+
*
|
|
135
|
+
* @default 'opensearch-operator-system'
|
|
136
|
+
*/
|
|
137
|
+
readonly operatorNamespace?: string;
|
|
138
|
+
readonly ingressNamespaceLabels?: Readonly<Record<string, string>>;
|
|
139
|
+
readonly egressNamespaceLabels?: readonly Readonly<Record<string, string>>[];
|
|
140
|
+
readonly egressCidrs?: readonly string[];
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
export interface OpenSearchClusterResourceConfig {
|
|
144
|
+
readonly name: string;
|
|
145
|
+
readonly namespace: string;
|
|
146
|
+
readonly version: string;
|
|
147
|
+
readonly serviceName: string;
|
|
148
|
+
readonly nodes: number;
|
|
149
|
+
readonly roles: readonly ('cluster_manager' | 'data' | 'ingest')[];
|
|
150
|
+
readonly storage: {
|
|
151
|
+
readonly size: string;
|
|
152
|
+
readonly storageClassName?: string;
|
|
153
|
+
readonly deletionPolicy: 'retain' | 'delete';
|
|
154
|
+
};
|
|
155
|
+
readonly resources?: {
|
|
156
|
+
readonly requests?: {
|
|
157
|
+
readonly cpu?: string;
|
|
158
|
+
readonly memory?: string;
|
|
159
|
+
};
|
|
160
|
+
readonly limits?: {
|
|
161
|
+
readonly cpu?: string;
|
|
162
|
+
readonly memory?: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
readonly adminCredentialsSecret?: {
|
|
166
|
+
readonly name: string;
|
|
167
|
+
};
|
|
168
|
+
readonly dashboardCredentialsSecret?: {
|
|
169
|
+
readonly name: string;
|
|
170
|
+
};
|
|
171
|
+
readonly tls: {
|
|
172
|
+
readonly source: 'generated';
|
|
173
|
+
} | {
|
|
174
|
+
readonly source: 'secret' | 'cert-manager';
|
|
175
|
+
readonly secretName: string;
|
|
176
|
+
readonly adminSecretName: string;
|
|
177
|
+
readonly adminDn: readonly string[];
|
|
178
|
+
};
|
|
179
|
+
readonly snapshots?: {
|
|
180
|
+
readonly repository: string;
|
|
181
|
+
readonly bucket: string;
|
|
182
|
+
readonly credentialsSecret: {
|
|
183
|
+
readonly name: string;
|
|
184
|
+
readonly accessKeyKey: string;
|
|
185
|
+
readonly secretKeyKey: string;
|
|
186
|
+
};
|
|
187
|
+
readonly endpoint?: string;
|
|
188
|
+
readonly region?: string;
|
|
189
|
+
readonly basePath?: string;
|
|
190
|
+
};
|
|
191
|
+
readonly monitoring: boolean;
|
|
192
|
+
readonly podDisruptionBudget?: OpenSearchClusterTopology['podDisruptionBudget'];
|
|
193
|
+
readonly id?: string;
|
|
194
|
+
}
|
|
195
|
+
export interface OpenSearchClusterResourceSpec {
|
|
196
|
+
readonly general: {
|
|
197
|
+
readonly serviceName: string;
|
|
198
|
+
readonly version: string;
|
|
199
|
+
readonly httpPort: number;
|
|
200
|
+
readonly vendor: 'opensearch';
|
|
201
|
+
readonly pluginsList?: readonly string[];
|
|
202
|
+
readonly drainDataNodes: boolean;
|
|
203
|
+
readonly monitoring: {
|
|
204
|
+
readonly enable: boolean;
|
|
205
|
+
};
|
|
206
|
+
readonly keystore?: readonly {
|
|
207
|
+
readonly secret: {
|
|
208
|
+
readonly name: string;
|
|
209
|
+
readonly keyMappings: Readonly<Record<string, string>>;
|
|
210
|
+
};
|
|
211
|
+
}[];
|
|
212
|
+
readonly snapshotRepositories?: readonly {
|
|
213
|
+
readonly name: string;
|
|
214
|
+
readonly type: 's3';
|
|
215
|
+
readonly settings: Readonly<Record<string, string>>;
|
|
216
|
+
}[];
|
|
217
|
+
};
|
|
218
|
+
readonly security: {
|
|
219
|
+
readonly config: {
|
|
220
|
+
readonly adminCredentialsSecret?: {
|
|
221
|
+
readonly name: string;
|
|
222
|
+
};
|
|
223
|
+
readonly adminSecret?: {
|
|
224
|
+
readonly name: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
readonly tls: {
|
|
228
|
+
readonly http: {
|
|
229
|
+
readonly generate: true;
|
|
230
|
+
} | {
|
|
231
|
+
readonly generate: false;
|
|
232
|
+
readonly secret: {
|
|
233
|
+
readonly name: string;
|
|
234
|
+
};
|
|
235
|
+
readonly adminDn: readonly string[];
|
|
236
|
+
};
|
|
237
|
+
readonly transport: {
|
|
238
|
+
readonly generate: true;
|
|
239
|
+
readonly perNode: true;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
readonly dashboards?: {
|
|
244
|
+
readonly enable: boolean;
|
|
245
|
+
readonly opensearchCredentialsSecret?: {
|
|
246
|
+
readonly name: string;
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
readonly nodePools: readonly {
|
|
250
|
+
readonly component: string;
|
|
251
|
+
readonly replicas: number;
|
|
252
|
+
readonly roles: readonly ('cluster_manager' | 'data' | 'ingest')[];
|
|
253
|
+
readonly diskSize: string;
|
|
254
|
+
readonly persistence?: {
|
|
255
|
+
readonly pvc: {
|
|
256
|
+
readonly storageClass?: string;
|
|
257
|
+
readonly accessModes: readonly ['ReadWriteOnce'];
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
readonly resources?: Composable<NonNullable<OpenSearchClusterResourceConfig['resources']>>;
|
|
261
|
+
readonly pdb?: {
|
|
262
|
+
readonly enable: true;
|
|
263
|
+
readonly minAvailable?: number;
|
|
264
|
+
readonly maxUnavailable?: number;
|
|
265
|
+
};
|
|
266
|
+
}[];
|
|
267
|
+
}
|
|
268
|
+
export interface OpenSearchClusterObservedStatus {
|
|
269
|
+
readonly phase?: string;
|
|
270
|
+
readonly health?: string;
|
|
271
|
+
readonly version?: string;
|
|
272
|
+
readonly initialized?: boolean;
|
|
273
|
+
readonly availableNodes?: number;
|
|
274
|
+
readonly componentsStatus?: readonly {
|
|
275
|
+
readonly component?: string;
|
|
276
|
+
readonly status?: string;
|
|
277
|
+
readonly description?: string;
|
|
278
|
+
readonly conditions?: readonly string[];
|
|
279
|
+
}[];
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/factories/opensearch/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BA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,EAAE,MAAM,CAAC;QAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACzC,EAAE,CAAC;CACL"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { type } from 'arktype';
|
|
2
|
+
export const OpenSearchOperatorBootstrapConfigSchema = type({
|
|
3
|
+
name: 'string > 0',
|
|
4
|
+
'namespace?': 'string > 0',
|
|
5
|
+
'version?': 'string > 0',
|
|
6
|
+
'repositoryName?': 'string > 0',
|
|
7
|
+
'repositoryNamespace?': 'string > 0',
|
|
8
|
+
'customValues?': 'Record<string, unknown>',
|
|
9
|
+
});
|
|
10
|
+
export const OpenSearchOperatorReferenceConfigSchema = type({
|
|
11
|
+
name: 'string > 0',
|
|
12
|
+
});
|
|
13
|
+
export const OpenSearchOperatorBootstrapStatusSchema = type({
|
|
14
|
+
ready: 'boolean',
|
|
15
|
+
failed: 'boolean',
|
|
16
|
+
phase: '"Ready" | "Installing" | "Failed"',
|
|
17
|
+
version: 'string',
|
|
18
|
+
});
|
|
19
|
+
export const OpenSearchHelmRepositorySingletonSpecSchema = type({
|
|
20
|
+
name: 'string',
|
|
21
|
+
namespace: 'string',
|
|
22
|
+
url: 'string',
|
|
23
|
+
});
|
|
24
|
+
export const OpenSearchHelmRepositorySingletonStatusSchema = type({
|
|
25
|
+
ready: 'boolean',
|
|
26
|
+
});
|
|
27
|
+
export const OpenSearchClusterConfigSchema = type({
|
|
28
|
+
name: 'string > 0',
|
|
29
|
+
namespace: 'string > 0',
|
|
30
|
+
'version?': 'string',
|
|
31
|
+
'serviceName?': 'string',
|
|
32
|
+
/**
|
|
33
|
+
* One atomic lifecycle choice avoids combinations that would claim retained
|
|
34
|
+
* PVCs while deleting their containing Namespace.
|
|
35
|
+
*/
|
|
36
|
+
'lifecycle?': '"owned-delete" | "external-delete" | "external-retain"',
|
|
37
|
+
'adminCredentialsSecret?': {
|
|
38
|
+
name: 'string > 0',
|
|
39
|
+
},
|
|
40
|
+
'dashboardCredentialsSecret?': {
|
|
41
|
+
name: 'string > 0',
|
|
42
|
+
},
|
|
43
|
+
storage: {
|
|
44
|
+
size: 'string > 0',
|
|
45
|
+
'storageClassName?': 'string',
|
|
46
|
+
},
|
|
47
|
+
'resources?': {
|
|
48
|
+
'requests?': { 'cpu?': 'string', 'memory?': 'string' },
|
|
49
|
+
'limits?': { 'cpu?': 'string', 'memory?': 'string' },
|
|
50
|
+
},
|
|
51
|
+
tls: type({
|
|
52
|
+
source: '"generated"',
|
|
53
|
+
})
|
|
54
|
+
.or({
|
|
55
|
+
source: '"secret"',
|
|
56
|
+
secretName: 'string > 0',
|
|
57
|
+
adminSecretName: 'string > 0',
|
|
58
|
+
adminDn: '(string > 0)[] > 0',
|
|
59
|
+
})
|
|
60
|
+
.or({
|
|
61
|
+
source: '"cert-manager"',
|
|
62
|
+
secretName: 'string > 0',
|
|
63
|
+
adminSecretName: 'string > 0',
|
|
64
|
+
issuerName: 'string > 0',
|
|
65
|
+
'issuerKind?': '"Issuer" | "ClusterIssuer"',
|
|
66
|
+
dnsNames: 'string[] > 0',
|
|
67
|
+
adminDn: '(string > 0)[] > 0',
|
|
68
|
+
}),
|
|
69
|
+
'snapshots?': {
|
|
70
|
+
repository: 'string > 0',
|
|
71
|
+
bucket: 'string > 0',
|
|
72
|
+
credentialsSecret: {
|
|
73
|
+
name: 'string > 0',
|
|
74
|
+
'accessKeyKey?': 'string > 0',
|
|
75
|
+
'secretKeyKey?': 'string > 0',
|
|
76
|
+
},
|
|
77
|
+
'endpoint?': 'string',
|
|
78
|
+
'region?': 'string',
|
|
79
|
+
'basePath?': 'string',
|
|
80
|
+
},
|
|
81
|
+
'monitoring?': 'boolean',
|
|
82
|
+
});
|
|
83
|
+
export const OpenSearchClusterStatusSchema = type({
|
|
84
|
+
ready: 'boolean',
|
|
85
|
+
failed: 'boolean',
|
|
86
|
+
phase: '"Ready" | "Installing" | "Failed"',
|
|
87
|
+
endpoint: 'string',
|
|
88
|
+
credentialsSecret: 'string',
|
|
89
|
+
version: 'string',
|
|
90
|
+
availableNodes: 'number',
|
|
91
|
+
health: 'string',
|
|
92
|
+
snapshotRepository: 'string',
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=types.js.map
|