@intentius/chant-lexicon-helm 0.124.30 → 0.124.32

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 (111) hide show
  1. package/dist/archive-render.js +76 -0
  2. package/dist/codegen/docs-cli.js +3 -0
  3. package/dist/codegen/docs.js +113 -0
  4. package/dist/codegen/generate-cli.js +19 -0
  5. package/dist/codegen/generate.js +210 -0
  6. package/dist/codegen/naming.js +29 -0
  7. package/dist/codegen/package.js +44 -0
  8. package/dist/codegen/values-type.js +87 -0
  9. package/dist/commands.js +413 -0
  10. package/dist/components/builders.js +9 -0
  11. package/dist/components/capability-plugin.js +17 -0
  12. package/dist/components/helm-upgrade.js +109 -0
  13. package/dist/components/index.js +11 -0
  14. package/dist/composites/catalog.js +1119 -0
  15. package/dist/composites/helm-batch-job.js +148 -0
  16. package/dist/composites/helm-crd-lifecycle.js +145 -0
  17. package/dist/composites/helm-cron-job.js +130 -0
  18. package/dist/composites/helm-daemon-set.js +125 -0
  19. package/dist/composites/helm-external-secret.js +63 -0
  20. package/dist/composites/helm-library.js +24 -0
  21. package/dist/composites/helm-microservice.js +260 -0
  22. package/dist/composites/helm-monitored-service.js +188 -0
  23. package/dist/composites/helm-namespace-env.js +116 -0
  24. package/dist/composites/helm-secure-ingress.js +86 -0
  25. package/dist/composites/helm-stateful-service.js +160 -0
  26. package/dist/composites/helm-web-app.js +201 -0
  27. package/dist/composites/helm-worker.js +164 -0
  28. package/dist/composites/index.js +13 -0
  29. package/dist/config.js +161 -0
  30. package/dist/coverage.js +37 -0
  31. package/dist/deep-observe-hooks.js +19 -0
  32. package/dist/deep-observe.js +55 -0
  33. package/dist/describe-resources.js +119 -0
  34. package/dist/describe-stack-status.js +66 -0
  35. package/dist/detect.js +11 -0
  36. package/dist/generated/index.js +11 -0
  37. package/dist/helpers.js +84 -0
  38. package/dist/import/generator.js +292 -0
  39. package/dist/import/parser.js +141 -0
  40. package/dist/import/template-stripper.js +86 -0
  41. package/dist/index.js +55 -0
  42. package/dist/integrity.json +2 -2
  43. package/dist/intrinsics.js +482 -0
  44. package/dist/lint/audit-catalog.js +33 -0
  45. package/dist/lint/audit-lineage.js +53 -0
  46. package/dist/lint/post-synth/helm-helpers.js +60 -0
  47. package/dist/lint/post-synth/index.js +48 -0
  48. package/dist/lint/post-synth/whm005-no-empty-wrapper.js +47 -0
  49. package/dist/lint/post-synth/whm101.js +38 -0
  50. package/dist/lint/post-synth/whm102.js +26 -0
  51. package/dist/lint/post-synth/whm103.js +51 -0
  52. package/dist/lint/post-synth/whm104.js +29 -0
  53. package/dist/lint/post-synth/whm105.js +23 -0
  54. package/dist/lint/post-synth/whm201.js +29 -0
  55. package/dist/lint/post-synth/whm202.js +42 -0
  56. package/dist/lint/post-synth/whm203.js +32 -0
  57. package/dist/lint/post-synth/whm204.js +51 -0
  58. package/dist/lint/post-synth/whm301.js +31 -0
  59. package/dist/lint/post-synth/whm302.js +33 -0
  60. package/dist/lint/post-synth/whm401.js +52 -0
  61. package/dist/lint/post-synth/whm402.js +38 -0
  62. package/dist/lint/post-synth/whm403.js +38 -0
  63. package/dist/lint/post-synth/whm404.js +30 -0
  64. package/dist/lint/post-synth/whm405.js +47 -0
  65. package/dist/lint/post-synth/whm406.js +27 -0
  66. package/dist/lint/post-synth/whm407.js +72 -0
  67. package/dist/lint/post-synth/whm501.js +89 -0
  68. package/dist/lint/post-synth/whm502.js +85 -0
  69. package/dist/lint/post-synth/whm503.js +82 -0
  70. package/dist/lint/post-synth/whm504.js +47 -0
  71. package/dist/lint/rules/chart-metadata.js +53 -0
  72. package/dist/lint/rules/no-hardcoded-image.js +50 -0
  73. package/dist/lint/rules/values-no-helm-tpl.js +78 -0
  74. package/dist/lint/rules/values-no-secrets.js +65 -0
  75. package/dist/list-artifacts.js +134 -0
  76. package/dist/lsp/completions.d.ts.map +1 -1
  77. package/dist/lsp/completions.js +18 -0
  78. package/dist/lsp/hover.d.ts.map +1 -1
  79. package/dist/lsp/hover.js +40 -0
  80. package/dist/manifest.json +1 -1
  81. package/dist/op/activities/cluster-probe.js +116 -0
  82. package/dist/op/activities/helm.js +449 -0
  83. package/dist/op/activities/index.js +10 -0
  84. package/dist/op/builders.js +45 -0
  85. package/dist/package-cli.js +21 -0
  86. package/dist/pinnability/actions.js +207 -0
  87. package/dist/pinnability/classify.js +416 -0
  88. package/dist/pinnability/conditions.js +0 -0
  89. package/dist/pinnability/index.js +16 -0
  90. package/dist/pinnability/localize.js +518 -0
  91. package/dist/pinnability/render-stream.js +53 -0
  92. package/dist/pinnability/values.js +151 -0
  93. package/dist/plugin.js +458 -0
  94. package/dist/project-codegen.js +215 -0
  95. package/dist/release-observe.js +287 -0
  96. package/dist/render-diff.js +279 -0
  97. package/dist/render-digest.js +0 -0
  98. package/dist/render-records.js +29 -0
  99. package/dist/render-store.js +401 -0
  100. package/dist/render-wrapper.js +164 -0
  101. package/dist/render.js +394 -0
  102. package/dist/resources.js +109 -0
  103. package/dist/serializer.js +903 -0
  104. package/dist/validate-cli.js +17 -0
  105. package/dist/validate.js +30 -0
  106. package/dist/values-probe.js +504 -0
  107. package/dist/wrapper-chart.js +95 -0
  108. package/package.json +11 -11
  109. package/src/codegen/package.ts +2 -2
  110. package/src/lsp/completions.ts +2 -1
  111. package/src/lsp/hover.ts +2 -1
@@ -0,0 +1,160 @@
1
+ /**
2
+ * HelmStatefulService composite — StatefulSet + headless Service + PVC templates.
3
+ *
4
+ * Produces a Helm chart for stateful workloads with persistent storage.
5
+ */
6
+ import { Composite, mergeDefaults } from "@intentius/chant";
7
+ import { Chart, Values, StatefulSet, Service, ServiceAccount } from "../resources.js";
8
+ import { values, include, printf, toYaml, With } from "../intrinsics.js";
9
+ export const HelmStatefulService = Composite((props) => {
10
+ const { name, imageRepository = "postgres", imageTag = "16", replicas = 1, port = 5432, storageSize = "10Gi", storageClass = "", appVersion = "1.0.0", serviceAccount = false, defaults: defs, } = props;
11
+ const chart = new Chart(mergeDefaults({
12
+ apiVersion: "v2",
13
+ name,
14
+ version: "0.1.0",
15
+ appVersion,
16
+ type: "application",
17
+ description: `A Helm chart for ${name} (stateful)`,
18
+ }, defs?.chart));
19
+ const valuesObj = {
20
+ replicaCount: replicas,
21
+ image: {
22
+ repository: imageRepository,
23
+ tag: imageTag,
24
+ pullPolicy: "IfNotPresent",
25
+ },
26
+ service: {
27
+ port,
28
+ },
29
+ persistence: {
30
+ size: storageSize,
31
+ storageClass,
32
+ accessModes: ["ReadWriteOnce"],
33
+ },
34
+ resources: {},
35
+ };
36
+ if (props.podSecurityContext)
37
+ valuesObj.podSecurityContext = props.podSecurityContext;
38
+ if (props.securityContext)
39
+ valuesObj.securityContext = props.securityContext;
40
+ if (props.nodeSelector)
41
+ valuesObj.nodeSelector = props.nodeSelector;
42
+ if (props.tolerations)
43
+ valuesObj.tolerations = props.tolerations;
44
+ if (props.affinity)
45
+ valuesObj.affinity = props.affinity;
46
+ if (props.podAnnotations)
47
+ valuesObj.podAnnotations = props.podAnnotations;
48
+ if (props.livenessProbe)
49
+ valuesObj.livenessProbe = props.livenessProbe;
50
+ if (props.readinessProbe)
51
+ valuesObj.readinessProbe = props.readinessProbe;
52
+ if (props.updateStrategy)
53
+ valuesObj.updateStrategy = props.updateStrategy;
54
+ if (serviceAccount) {
55
+ valuesObj.serviceAccount = {
56
+ create: true,
57
+ name: "",
58
+ annotations: {},
59
+ };
60
+ }
61
+ const valuesRes = new Values(mergeDefaults(valuesObj, defs?.values));
62
+ const containerSpec = {
63
+ name,
64
+ image: printf("%s:%s", values.image.repository, values.image.tag),
65
+ imagePullPolicy: values.image.pullPolicy,
66
+ ports: [{ containerPort: values.service.port, name: "tcp" }],
67
+ resources: toYaml(values.resources),
68
+ volumeMounts: [{
69
+ name: "data",
70
+ mountPath: "/data",
71
+ }],
72
+ };
73
+ if (props.securityContext)
74
+ containerSpec.securityContext = toYaml(values.securityContext);
75
+ if (props.livenessProbe)
76
+ containerSpec.livenessProbe = toYaml(values.livenessProbe);
77
+ if (props.readinessProbe)
78
+ containerSpec.readinessProbe = toYaml(values.readinessProbe);
79
+ const podSpec = {
80
+ containers: [containerSpec],
81
+ };
82
+ if (props.podSecurityContext)
83
+ podSpec.securityContext = toYaml(values.podSecurityContext);
84
+ if (props.nodeSelector)
85
+ podSpec.nodeSelector = With(values.nodeSelector, toYaml(values.nodeSelector));
86
+ if (props.tolerations)
87
+ podSpec.tolerations = With(values.tolerations, toYaml(values.tolerations));
88
+ if (props.affinity)
89
+ podSpec.affinity = With(values.affinity, toYaml(values.affinity));
90
+ if (serviceAccount)
91
+ podSpec.serviceAccountName = include(`${name}.serviceAccountName`);
92
+ const templateMetadata = {
93
+ labels: include(`${name}.selectorLabels`),
94
+ };
95
+ if (props.podAnnotations)
96
+ templateMetadata.annotations = toYaml(values.podAnnotations);
97
+ const statefulSetSpec = {
98
+ serviceName: include(`${name}.fullname`),
99
+ replicas: values.replicaCount,
100
+ selector: {
101
+ matchLabels: include(`${name}.selectorLabels`),
102
+ },
103
+ template: {
104
+ metadata: templateMetadata,
105
+ spec: podSpec,
106
+ },
107
+ volumeClaimTemplates: [{
108
+ metadata: { name: "data" },
109
+ spec: {
110
+ accessModes: values.persistence.accessModes,
111
+ storageClassName: values.persistence.storageClass,
112
+ resources: {
113
+ requests: { storage: values.persistence.size },
114
+ },
115
+ },
116
+ }],
117
+ };
118
+ if (props.updateStrategy)
119
+ statefulSetSpec.updateStrategy = toYaml(values.updateStrategy);
120
+ const statefulSet = new StatefulSet(mergeDefaults({
121
+ apiVersion: "apps/v1",
122
+ kind: "StatefulSet",
123
+ metadata: {
124
+ name: include(`${name}.fullname`),
125
+ labels: include(`${name}.labels`),
126
+ },
127
+ spec: statefulSetSpec,
128
+ }, defs?.statefulSet));
129
+ const service = new Service(mergeDefaults({
130
+ apiVersion: "v1",
131
+ kind: "Service",
132
+ metadata: {
133
+ name: include(`${name}.fullname`),
134
+ labels: include(`${name}.labels`),
135
+ },
136
+ spec: {
137
+ clusterIP: "None",
138
+ ports: [{
139
+ port: values.service.port,
140
+ targetPort: "tcp",
141
+ protocol: "TCP",
142
+ name: "tcp",
143
+ }],
144
+ selector: include(`${name}.selectorLabels`),
145
+ },
146
+ }, defs?.service));
147
+ const result = { chart, values: valuesRes, statefulSet, service };
148
+ if (serviceAccount) {
149
+ result.serviceAccount = new ServiceAccount(mergeDefaults({
150
+ apiVersion: "v1",
151
+ kind: "ServiceAccount",
152
+ metadata: {
153
+ name: include(`${name}.serviceAccountName`),
154
+ labels: include(`${name}.labels`),
155
+ annotations: toYaml(values.serviceAccount.annotations),
156
+ },
157
+ }, defs?.serviceAccount));
158
+ }
159
+ return result;
160
+ }, "HelmStatefulService");
@@ -0,0 +1,201 @@
1
+ /**
2
+ * HelmWebApp composite — Deployment + Service + Ingress (conditional) + HPA (conditional) + ServiceAccount.
3
+ *
4
+ * Produces a full set of Helm chart entities with parameterized values references.
5
+ */
6
+ import { Composite, mergeDefaults } from "@intentius/chant";
7
+ import { Chart, Values, Deployment, Service, ServiceAccount, Ingress, HPA } from "../resources.js";
8
+ import { values, include, printf, toYaml, With } from "../intrinsics.js";
9
+ export const HelmWebApp = Composite((props) => {
10
+ const { name, imageRepository = "nginx", imageTag = "", port = 80, replicas = 1, serviceType = "ClusterIP", ingress = true, autoscaling = true, serviceAccount = true, appVersion = "1.0.0", defaults: defs, } = props;
11
+ const chart = new Chart(mergeDefaults({
12
+ apiVersion: "v2",
13
+ name,
14
+ version: "0.1.0",
15
+ appVersion,
16
+ type: "application",
17
+ description: `A Helm chart for ${name}`,
18
+ }, defs?.chart));
19
+ const valuesObj = {
20
+ replicaCount: replicas,
21
+ image: {
22
+ repository: imageRepository,
23
+ tag: imageTag,
24
+ pullPolicy: "IfNotPresent",
25
+ },
26
+ service: {
27
+ type: serviceType,
28
+ port,
29
+ },
30
+ resources: {},
31
+ };
32
+ if (props.podSecurityContext)
33
+ valuesObj.podSecurityContext = props.podSecurityContext;
34
+ if (props.securityContext)
35
+ valuesObj.securityContext = props.securityContext;
36
+ if (props.nodeSelector)
37
+ valuesObj.nodeSelector = props.nodeSelector;
38
+ if (props.tolerations)
39
+ valuesObj.tolerations = props.tolerations;
40
+ if (props.affinity)
41
+ valuesObj.affinity = props.affinity;
42
+ if (props.podAnnotations)
43
+ valuesObj.podAnnotations = props.podAnnotations;
44
+ if (props.livenessProbe)
45
+ valuesObj.livenessProbe = props.livenessProbe;
46
+ if (props.readinessProbe)
47
+ valuesObj.readinessProbe = props.readinessProbe;
48
+ if (props.strategy)
49
+ valuesObj.strategy = props.strategy;
50
+ if (serviceAccount) {
51
+ valuesObj.serviceAccount = {
52
+ create: true,
53
+ name: "",
54
+ annotations: {},
55
+ };
56
+ }
57
+ if (ingress) {
58
+ valuesObj.ingress = {
59
+ enabled: false,
60
+ className: "",
61
+ annotations: {},
62
+ hosts: [{ host: `${name}.local`, paths: [{ path: "/", pathType: "ImplementationSpecific" }] }],
63
+ tls: [],
64
+ };
65
+ }
66
+ if (autoscaling) {
67
+ valuesObj.autoscaling = {
68
+ enabled: false,
69
+ minReplicas: 1,
70
+ maxReplicas: 100,
71
+ targetCPUUtilizationPercentage: 80,
72
+ };
73
+ }
74
+ const valuesRes = new Values(mergeDefaults(valuesObj, defs?.values));
75
+ const containerSpec = {
76
+ name,
77
+ image: printf("%s:%s", values.image.repository, values.image.tag),
78
+ imagePullPolicy: values.image.pullPolicy,
79
+ ports: [{ containerPort: values.service.port, name: "http" }],
80
+ resources: toYaml(values.resources),
81
+ };
82
+ if (props.securityContext)
83
+ containerSpec.securityContext = toYaml(values.securityContext);
84
+ if (props.livenessProbe)
85
+ containerSpec.livenessProbe = toYaml(values.livenessProbe);
86
+ if (props.readinessProbe)
87
+ containerSpec.readinessProbe = toYaml(values.readinessProbe);
88
+ const podSpec = {
89
+ containers: [containerSpec],
90
+ };
91
+ if (props.podSecurityContext)
92
+ podSpec.securityContext = toYaml(values.podSecurityContext);
93
+ if (props.nodeSelector)
94
+ podSpec.nodeSelector = With(values.nodeSelector, toYaml(values.nodeSelector));
95
+ if (props.tolerations)
96
+ podSpec.tolerations = With(values.tolerations, toYaml(values.tolerations));
97
+ if (props.affinity)
98
+ podSpec.affinity = With(values.affinity, toYaml(values.affinity));
99
+ const templateMetadata = {
100
+ labels: include(`${name}.selectorLabels`),
101
+ };
102
+ if (props.podAnnotations)
103
+ templateMetadata.annotations = toYaml(values.podAnnotations);
104
+ const deploymentSpec = {
105
+ replicas: values.replicaCount,
106
+ selector: {
107
+ matchLabels: include(`${name}.selectorLabels`),
108
+ },
109
+ template: {
110
+ metadata: templateMetadata,
111
+ spec: podSpec,
112
+ },
113
+ };
114
+ if (props.strategy)
115
+ deploymentSpec.strategy = toYaml(values.strategy);
116
+ const deployment = new Deployment(mergeDefaults({
117
+ apiVersion: "apps/v1",
118
+ kind: "Deployment",
119
+ metadata: {
120
+ name: include(`${name}.fullname`),
121
+ labels: include(`${name}.labels`),
122
+ },
123
+ spec: deploymentSpec,
124
+ }, defs?.deployment));
125
+ const service = new Service(mergeDefaults({
126
+ apiVersion: "v1",
127
+ kind: "Service",
128
+ metadata: {
129
+ name: include(`${name}.fullname`),
130
+ labels: include(`${name}.labels`),
131
+ },
132
+ spec: {
133
+ type: values.service.type,
134
+ ports: [{
135
+ port: values.service.port,
136
+ targetPort: "http",
137
+ protocol: "TCP",
138
+ name: "http",
139
+ }],
140
+ selector: include(`${name}.selectorLabels`),
141
+ },
142
+ }, defs?.service));
143
+ const result = { chart, values: valuesRes, deployment, service };
144
+ if (serviceAccount) {
145
+ result.serviceAccount = new ServiceAccount(mergeDefaults({
146
+ apiVersion: "v1",
147
+ kind: "ServiceAccount",
148
+ metadata: {
149
+ name: include(`${name}.serviceAccountName`),
150
+ labels: include(`${name}.labels`),
151
+ annotations: toYaml(values.serviceAccount.annotations),
152
+ },
153
+ }, defs?.serviceAccount));
154
+ }
155
+ if (ingress) {
156
+ result.ingress = new Ingress(mergeDefaults({
157
+ apiVersion: "networking.k8s.io/v1",
158
+ kind: "Ingress",
159
+ metadata: {
160
+ name: include(`${name}.fullname`),
161
+ labels: include(`${name}.labels`),
162
+ annotations: toYaml(values.ingress.annotations),
163
+ },
164
+ spec: {
165
+ ingressClassName: values.ingress.className,
166
+ rules: values.ingress.hosts,
167
+ tls: values.ingress.tls,
168
+ },
169
+ }, defs?.ingress));
170
+ }
171
+ if (autoscaling) {
172
+ result.hpa = new HPA(mergeDefaults({
173
+ apiVersion: "autoscaling/v2",
174
+ kind: "HorizontalPodAutoscaler",
175
+ metadata: {
176
+ name: include(`${name}.fullname`),
177
+ labels: include(`${name}.labels`),
178
+ },
179
+ spec: {
180
+ scaleTargetRef: {
181
+ apiVersion: "apps/v1",
182
+ kind: "Deployment",
183
+ name: include(`${name}.fullname`),
184
+ },
185
+ minReplicas: values.autoscaling.minReplicas,
186
+ maxReplicas: values.autoscaling.maxReplicas,
187
+ metrics: [{
188
+ type: "Resource",
189
+ resource: {
190
+ name: "cpu",
191
+ target: {
192
+ type: "Utilization",
193
+ averageUtilization: values.autoscaling.targetCPUUtilizationPercentage,
194
+ },
195
+ },
196
+ }],
197
+ },
198
+ }, defs?.hpa));
199
+ }
200
+ return result;
201
+ }, "HelmWebApp");
@@ -0,0 +1,164 @@
1
+ /**
2
+ * HelmWorker composite — Deployment (no Service) + ServiceAccount + optional HPA + PDB.
3
+ *
4
+ * Worker pattern for background processors, queue consumers, and async tasks
5
+ * that don't serve HTTP traffic.
6
+ */
7
+ import { Composite, mergeDefaults } from "@intentius/chant";
8
+ import { Chart, Values, Deployment, ServiceAccount, HPA, PDB } from "../resources.js";
9
+ import { values, include, printf, toYaml } from "../intrinsics.js";
10
+ export const HelmWorker = Composite((props) => {
11
+ const { name, imageRepository = "worker", imageTag = "", replicas = 2, autoscaling = false, pdb = true, appVersion = "1.0.0", defaults: defs, } = props;
12
+ const chart = new Chart(mergeDefaults({
13
+ apiVersion: "v2",
14
+ name,
15
+ version: "0.1.0",
16
+ appVersion,
17
+ type: "application",
18
+ description: `A Helm chart for ${name} worker`,
19
+ }, defs?.chart));
20
+ const valuesObj = {
21
+ replicaCount: replicas,
22
+ image: {
23
+ repository: imageRepository,
24
+ tag: imageTag,
25
+ pullPolicy: "IfNotPresent",
26
+ },
27
+ serviceAccount: {
28
+ create: true,
29
+ name: "",
30
+ annotations: {},
31
+ },
32
+ resources: {
33
+ limits: { cpu: "500m", memory: "256Mi" },
34
+ requests: { cpu: "100m", memory: "128Mi" },
35
+ },
36
+ queue: {
37
+ concurrency: 5,
38
+ pollInterval: "5s",
39
+ },
40
+ livenessProbe: {
41
+ exec: { command: ["/bin/sh", "-c", "pgrep -f worker"] },
42
+ initialDelaySeconds: 15,
43
+ periodSeconds: 20,
44
+ },
45
+ readinessProbe: {
46
+ exec: { command: ["/bin/sh", "-c", "pgrep -f worker"] },
47
+ initialDelaySeconds: 5,
48
+ periodSeconds: 10,
49
+ },
50
+ };
51
+ if (autoscaling) {
52
+ valuesObj.autoscaling = {
53
+ enabled: false,
54
+ minReplicas: replicas,
55
+ maxReplicas: 10,
56
+ targetCPUUtilizationPercentage: 80,
57
+ };
58
+ }
59
+ if (pdb) {
60
+ valuesObj.podDisruptionBudget = {
61
+ enabled: true,
62
+ minAvailable: 1,
63
+ };
64
+ }
65
+ const valuesRes = new Values(mergeDefaults(valuesObj, defs?.values));
66
+ const deployment = new Deployment(mergeDefaults({
67
+ apiVersion: "apps/v1",
68
+ kind: "Deployment",
69
+ metadata: {
70
+ name: include(`${name}.fullname`),
71
+ labels: include(`${name}.labels`),
72
+ },
73
+ spec: {
74
+ replicas: values.replicaCount,
75
+ selector: {
76
+ matchLabels: include(`${name}.selectorLabels`),
77
+ },
78
+ template: {
79
+ metadata: {
80
+ labels: include(`${name}.selectorLabels`),
81
+ },
82
+ spec: {
83
+ serviceAccountName: include(`${name}.serviceAccountName`),
84
+ securityContext: {
85
+ runAsNonRoot: true,
86
+ },
87
+ containers: [{
88
+ name,
89
+ image: printf("%s:%s", values.image.repository, values.image.tag),
90
+ imagePullPolicy: values.image.pullPolicy,
91
+ resources: toYaml(values.resources),
92
+ livenessProbe: toYaml(values.livenessProbe),
93
+ readinessProbe: toYaml(values.readinessProbe),
94
+ env: [
95
+ { name: "QUEUE_CONCURRENCY", value: values.queue.concurrency },
96
+ { name: "QUEUE_POLL_INTERVAL", value: values.queue.pollInterval },
97
+ ],
98
+ }],
99
+ },
100
+ },
101
+ },
102
+ }, defs?.deployment));
103
+ const serviceAccount = new ServiceAccount(mergeDefaults({
104
+ apiVersion: "v1",
105
+ kind: "ServiceAccount",
106
+ metadata: {
107
+ name: include(`${name}.serviceAccountName`),
108
+ labels: include(`${name}.labels`),
109
+ annotations: toYaml(values.serviceAccount.annotations),
110
+ },
111
+ }, defs?.serviceAccount));
112
+ const result = {
113
+ chart,
114
+ values: valuesRes,
115
+ deployment,
116
+ serviceAccount,
117
+ };
118
+ if (autoscaling) {
119
+ result.hpa = new HPA(mergeDefaults({
120
+ apiVersion: "autoscaling/v2",
121
+ kind: "HorizontalPodAutoscaler",
122
+ metadata: {
123
+ name: include(`${name}.fullname`),
124
+ labels: include(`${name}.labels`),
125
+ },
126
+ spec: {
127
+ scaleTargetRef: {
128
+ apiVersion: "apps/v1",
129
+ kind: "Deployment",
130
+ name: include(`${name}.fullname`),
131
+ },
132
+ minReplicas: values.autoscaling.minReplicas,
133
+ maxReplicas: values.autoscaling.maxReplicas,
134
+ metrics: [{
135
+ type: "Resource",
136
+ resource: {
137
+ name: "cpu",
138
+ target: {
139
+ type: "Utilization",
140
+ averageUtilization: values.autoscaling.targetCPUUtilizationPercentage,
141
+ },
142
+ },
143
+ }],
144
+ },
145
+ }, defs?.hpa));
146
+ }
147
+ if (pdb) {
148
+ result.pdb = new PDB(mergeDefaults({
149
+ apiVersion: "policy/v1",
150
+ kind: "PodDisruptionBudget",
151
+ metadata: {
152
+ name: include(`${name}.fullname`),
153
+ labels: include(`${name}.labels`),
154
+ },
155
+ spec: {
156
+ minAvailable: values.podDisruptionBudget.minAvailable,
157
+ selector: {
158
+ matchLabels: include(`${name}.selectorLabels`),
159
+ },
160
+ },
161
+ }, defs?.pdb));
162
+ }
163
+ return result;
164
+ }, "HelmWorker");
@@ -0,0 +1,13 @@
1
+ export { HelmWebApp } from "./helm-web-app.js";
2
+ export { HelmStatefulService } from "./helm-stateful-service.js";
3
+ export { HelmCronJob } from "./helm-cron-job.js";
4
+ export { HelmMicroservice } from "./helm-microservice.js";
5
+ export { HelmLibrary } from "./helm-library.js";
6
+ export { HelmCRDLifecycle } from "./helm-crd-lifecycle.js";
7
+ export { HelmDaemonSet } from "./helm-daemon-set.js";
8
+ export { HelmWorker } from "./helm-worker.js";
9
+ export { HelmExternalSecret } from "./helm-external-secret.js";
10
+ export { HelmBatchJob } from "./helm-batch-job.js";
11
+ export { HelmMonitoredService } from "./helm-monitored-service.js";
12
+ export { HelmSecureIngress } from "./helm-secure-ingress.js";
13
+ export { HelmNamespaceEnv } from "./helm-namespace-env.js";