zenml-nightly 0.73.0.dev20250204__py3-none-any.whl → 0.73.0.dev20250206__py3-none-any.whl
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.
- zenml/VERSION +1 -1
- zenml/cli/utils.py +42 -53
- zenml/client.py +6 -2
- zenml/constants.py +1 -0
- zenml/integrations/gcp/image_builders/gcp_image_builder.py +5 -8
- zenml/models/__init__.py +4 -2
- zenml/models/v2/base/filter.py +34 -11
- zenml/models/v2/base/scoped.py +4 -4
- zenml/models/v2/core/artifact.py +3 -3
- zenml/models/v2/core/artifact_version.py +22 -5
- zenml/models/v2/core/model.py +13 -3
- zenml/models/v2/core/model_version.py +13 -3
- zenml/models/v2/core/pipeline.py +11 -4
- zenml/models/v2/core/pipeline_run.py +20 -7
- zenml/models/v2/core/run_template.py +13 -3
- zenml/models/v2/core/step_run.py +9 -2
- zenml/pipelines/pipeline_definition.py +28 -12
- zenml/stack/stack.py +5 -0
- zenml/zen_stores/schemas/artifact_schemas.py +31 -4
- zenml/zen_stores/schemas/model_schemas.py +31 -6
- zenml/zen_stores/schemas/pipeline_run_schemas.py +1 -1
- zenml/zen_stores/schemas/pipeline_schemas.py +35 -8
- zenml/zen_stores/schemas/run_template_schemas.py +42 -14
- zenml/zen_stores/sql_zen_store.py +22 -56
- {zenml_nightly-0.73.0.dev20250204.dist-info → zenml_nightly-0.73.0.dev20250206.dist-info}/METADATA +1 -1
- {zenml_nightly-0.73.0.dev20250204.dist-info → zenml_nightly-0.73.0.dev20250206.dist-info}/RECORD +29 -46
- zenml/zen_server/deploy/helm/.helmignore +0 -23
- zenml/zen_server/deploy/helm/Chart.yaml +0 -12
- zenml/zen_server/deploy/helm/README.md +0 -50
- zenml/zen_server/deploy/helm/templates/NOTES.txt +0 -52
- zenml/zen_server/deploy/helm/templates/_environment.tpl +0 -511
- zenml/zen_server/deploy/helm/templates/_helpers.tpl +0 -70
- zenml/zen_server/deploy/helm/templates/cert-secret.yaml +0 -45
- zenml/zen_server/deploy/helm/templates/hpa.yaml +0 -32
- zenml/zen_server/deploy/helm/templates/server-db-job.yaml +0 -121
- zenml/zen_server/deploy/helm/templates/server-db-pvc.yaml +0 -25
- zenml/zen_server/deploy/helm/templates/server-deployment.yaml +0 -132
- zenml/zen_server/deploy/helm/templates/server-ingress.yaml +0 -59
- zenml/zen_server/deploy/helm/templates/server-secret.yaml +0 -60
- zenml/zen_server/deploy/helm/templates/server-service.yaml +0 -15
- zenml/zen_server/deploy/helm/templates/serviceaccount.yaml +0 -27
- zenml/zen_server/deploy/helm/templates/tests/test-connection.yaml +0 -15
- zenml/zen_server/deploy/helm/values.yaml +0 -1008
- {zenml_nightly-0.73.0.dev20250204.dist-info → zenml_nightly-0.73.0.dev20250206.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.73.0.dev20250204.dist-info → zenml_nightly-0.73.0.dev20250206.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.73.0.dev20250204.dist-info → zenml_nightly-0.73.0.dev20250206.dist-info}/entry_points.txt +0 -0
@@ -1,511 +0,0 @@
|
|
1
|
-
{{/*
|
2
|
-
Helpers for environment variables configured in ZenML deployments and secrets store
|
3
|
-
*/}}
|
4
|
-
|
5
|
-
|
6
|
-
{{/*
|
7
|
-
ZenML store configuration options (non-secret values).
|
8
|
-
|
9
|
-
This template constructs a dictionary that is similar to the python values that
|
10
|
-
can be configured in the zenml.zen_store.sql_zen_store.SqlZenStoreConfiguration
|
11
|
-
class. Only non-secret values are included in this dictionary.
|
12
|
-
|
13
|
-
The dictionary is then converted into deployment environment variables by other
|
14
|
-
templates and inserted where it is needed.
|
15
|
-
|
16
|
-
The input is taken from a .ZenML dict that is passed to the template and
|
17
|
-
contains the values configured in the values.yaml file for the ZenML server.
|
18
|
-
|
19
|
-
Args:
|
20
|
-
.ZenML: A dictionary with the ZenML configuration values configured for the
|
21
|
-
ZenML server.
|
22
|
-
Returns:
|
23
|
-
A dictionary with the non-secret values configured for the ZenML store.
|
24
|
-
*/}}
|
25
|
-
{{- define "zenml.storeConfigurationAttrs" -}}
|
26
|
-
{{- if .ZenML.database.url }}
|
27
|
-
type: sql
|
28
|
-
ssl_verify_server_cert: {{ .ZenML.database.sslVerifyServerCert | default "false" | quote }}
|
29
|
-
{{- if .ZenML.database.backupStrategy }}
|
30
|
-
backup_strategy: {{ .ZenML.database.backupStrategy | quote }}
|
31
|
-
{{- if eq .ZenML.database.backupStrategy "database" }}
|
32
|
-
backup_database: {{ .ZenML.database.backupDatabase | quote }}
|
33
|
-
{{- else if eq .ZenML.database.backupStrategy "dump-file" }}
|
34
|
-
backup_directory: "/backups"
|
35
|
-
{{- end }}
|
36
|
-
{{- end }}
|
37
|
-
{{- if .ZenML.database.poolSize }}
|
38
|
-
pool_size: {{ .ZenML.database.poolSize | quote }}
|
39
|
-
{{- end }}
|
40
|
-
{{- if .ZenML.database.maxOverflow }}
|
41
|
-
max_overflow: {{ .ZenML.database.maxOverflow | quote }}
|
42
|
-
{{- end }}
|
43
|
-
{{- end }}
|
44
|
-
{{- end }}
|
45
|
-
|
46
|
-
|
47
|
-
{{/*
|
48
|
-
ZenML store configuration options (secret values).
|
49
|
-
|
50
|
-
This template constructs a dictionary that is similar to the python values that
|
51
|
-
can be configured in the zenml.zen_store.sql_zen_store.SqlZenStoreConfiguration
|
52
|
-
class. Only secret values are included in this dictionary.
|
53
|
-
|
54
|
-
The dictionary is then converted into deployment environment variables by other
|
55
|
-
templates and inserted where it is needed.
|
56
|
-
|
57
|
-
The input is taken from a .ZenML dict that is passed to the template and
|
58
|
-
contains the values configured in the values.yaml file for the ZenML server.
|
59
|
-
|
60
|
-
Args:
|
61
|
-
.ZenML: A dictionary with the ZenML configuration values configured for the
|
62
|
-
ZenML server.
|
63
|
-
Returns:
|
64
|
-
A dictionary with the secret values configured for the ZenML store.
|
65
|
-
*/}}
|
66
|
-
{{- define "zenml.storeSecretConfigurationAttrs" -}}
|
67
|
-
{{- if .ZenML.database.url }}
|
68
|
-
url: {{ .ZenML.database.url | quote }}
|
69
|
-
{{- if .ZenML.database.sslCa }}
|
70
|
-
ssl_ca: {{ .Files.Get .ZenML.database.sslCa }}
|
71
|
-
{{- end }}
|
72
|
-
{{- if .ZenML.database.sslCert }}
|
73
|
-
ssl_cert: {{ .Files.Get .ZenML.database.sslCert }}
|
74
|
-
{{- end }}
|
75
|
-
{{- if .ZenML.database.sslKey }}
|
76
|
-
ssl_key: {{ .Files.Get .ZenML.database.sslKey }}
|
77
|
-
{{- end }}
|
78
|
-
{{- end }}
|
79
|
-
{{- end }}
|
80
|
-
|
81
|
-
|
82
|
-
{{/*
|
83
|
-
Store configuration environment variables (non-secret values).
|
84
|
-
|
85
|
-
Passes the .Values.zenml dict as input to the `zenml.storeConfigurationAttrs`
|
86
|
-
template and converts the output into a dictionary of environment variables that
|
87
|
-
need to be configured for the store.
|
88
|
-
|
89
|
-
Args:
|
90
|
-
.Values: The values.yaml file for the ZenML deployment.
|
91
|
-
Returns:
|
92
|
-
A dictionary with the non-secret environment variables that are configured for
|
93
|
-
the store (i.e. keys starting with `ZENML_STORE_`).
|
94
|
-
*/}}
|
95
|
-
{{- define "zenml.storeEnvVariables" -}}
|
96
|
-
{{ $zenml := dict "ZenML" .Values.zenml }}
|
97
|
-
{{- range $k, $v := include "zenml.storeConfigurationAttrs" $zenml | fromYaml }}
|
98
|
-
ZENML_STORE_{{ $k | upper }}: {{ $v | quote }}
|
99
|
-
{{- end }}
|
100
|
-
{{- end }}
|
101
|
-
|
102
|
-
|
103
|
-
{{/*
|
104
|
-
Store configuration environment variables (secret values).
|
105
|
-
|
106
|
-
Passes the .Values.zenml dict as input to the `zenml.storeSecretConfigurationAttrs`
|
107
|
-
template and converts the output into a dictionary of environment variables that
|
108
|
-
need to be configured for the store.
|
109
|
-
|
110
|
-
Args:
|
111
|
-
.Values: The values.yaml file for the ZenML deployment.
|
112
|
-
Returns:
|
113
|
-
A dictionary with the secret environment variables that are configured for
|
114
|
-
the store (i.e. keys starting with `ZENML_STORE_`).
|
115
|
-
*/}}
|
116
|
-
{{- define "zenml.storeSecretEnvVariables" -}}
|
117
|
-
{{ $zenml := dict "ZenML" .Values.zenml }}
|
118
|
-
{{- range $k, $v := include "zenml.storeSecretConfigurationAttrs" $zenml | fromYaml }}
|
119
|
-
ZENML_STORE_{{ $k | upper }}: {{ $v | quote }}
|
120
|
-
{{- end }}
|
121
|
-
{{- end }}
|
122
|
-
|
123
|
-
{{/*
|
124
|
-
ZenML server configuration options (non-secret values).
|
125
|
-
|
126
|
-
This template constructs a dictionary that is similar to the python values that
|
127
|
-
can be configured in the zenml.config.server_config.ServerConfiguration
|
128
|
-
class. Only non-secret values are included in this dictionary.
|
129
|
-
|
130
|
-
The dictionary is then converted into deployment environment variables by other
|
131
|
-
templates and inserted where it is needed.
|
132
|
-
|
133
|
-
The input is taken from a .ZenML dict that is passed to the template and
|
134
|
-
contains the values configured in the values.yaml file for the ZenML server.
|
135
|
-
|
136
|
-
Args:
|
137
|
-
.ZenML: A dictionary with the ZenML configuration values configured for the
|
138
|
-
ZenML server.
|
139
|
-
Returns:
|
140
|
-
A dictionary with the non-secret values configured for the ZenML server.
|
141
|
-
*/}}
|
142
|
-
{{- define "zenml.serverConfigurationAttrs" -}}
|
143
|
-
|
144
|
-
{{- if .ZenML.pro.enabled }}
|
145
|
-
deployment_type: cloud
|
146
|
-
pro_api_url: "{{ .ZenML.pro.apiURL }}"
|
147
|
-
pro_dashboard_url: "{{ .ZenML.pro.dashboardURL }}"
|
148
|
-
pro_oauth2_audience: "{{ .ZenML.pro.apiURL }}"
|
149
|
-
pro_organization_id: "{{ .ZenML.pro.organizationID }}"
|
150
|
-
pro_tenant_id: "{{ .ZenML.pro.tenantID }}"
|
151
|
-
{{- if .ZenML.pro.tenantName }}
|
152
|
-
pro_tenant_name: "{{ .ZenML.pro.tenantName }}"
|
153
|
-
{{- end }}
|
154
|
-
{{- if .ZenML.pro.organizationName }}
|
155
|
-
pro_organization_name: "{{ .ZenML.pro.organizationName }}"
|
156
|
-
{{- end }}
|
157
|
-
{{- if .ZenML.pro.extraCorsOrigins }}
|
158
|
-
cors_allow_origins: "{{ join "," .ZenML.pro.extraCorsOrigins }}"
|
159
|
-
{{- end }}
|
160
|
-
{{- if .ZenML.auth.jwtTokenExpireMinutes }}
|
161
|
-
jwt_token_expire_minutes: {{ .ZenML.auth.jwtTokenExpireMinutes | quote }}
|
162
|
-
{{- end }}
|
163
|
-
|
164
|
-
{{- else }}
|
165
|
-
|
166
|
-
auth_scheme: {{ .ZenML.authType | default .ZenML.auth.authType | quote }}
|
167
|
-
deployment_type: {{ .ZenML.deploymentType | default "kubernetes" }}
|
168
|
-
{{- if .ZenML.auth.corsAllowOrigins }}
|
169
|
-
cors_allow_origins: {{ join "," .ZenML.auth.corsAllowOrigins | quote }}
|
170
|
-
{{- end }}
|
171
|
-
{{- if .ZenML.auth.externalLoginURL }}
|
172
|
-
external_login_url: {{ .ZenML.auth.externalLoginURL | quote }}
|
173
|
-
{{- end }}
|
174
|
-
{{- if .ZenML.auth.externalUserInfoURL }}
|
175
|
-
external_user_info_url: {{ .ZenML.auth.externalUserInfoURL | quote }}
|
176
|
-
{{- end }}
|
177
|
-
{{- if .ZenML.auth.externalServerID }}
|
178
|
-
external_server_id: {{ .ZenML.auth.externalServerID | quote }}
|
179
|
-
{{- end }}
|
180
|
-
{{- if .ZenML.auth.jwtTokenExpireMinutes }}
|
181
|
-
jwt_token_expire_minutes: {{ .ZenML.auth.jwtTokenExpireMinutes | quote }}
|
182
|
-
{{- end }}
|
183
|
-
{{- if .ZenML.auth.rbacImplementationSource }}
|
184
|
-
rbac_implementation_source: {{ .ZenML.auth.rbacImplementationSource | quote }}
|
185
|
-
{{- end }}
|
186
|
-
{{- if .ZenML.auth.featureGateImplementationSource }}
|
187
|
-
feature_gate_implementation_source: {{ .ZenML.auth.featureGateImplementationSource | quote }}
|
188
|
-
{{- end }}
|
189
|
-
{{- if .ZenML.dashboardURL }}
|
190
|
-
dashboard_url: {{ .ZenML.dashboardURL | quote }}
|
191
|
-
{{- end }}
|
192
|
-
|
193
|
-
{{- end }}
|
194
|
-
|
195
|
-
{{- if .ZenML.threadPoolSize }}
|
196
|
-
thread_pool_size: {{ .ZenML.threadPoolSize | quote }}
|
197
|
-
{{- end }}
|
198
|
-
{{- if .ZenML.auth.jwtTokenAlgorithm }}
|
199
|
-
jwt_token_algorithm: {{ .ZenML.auth.jwtTokenAlgorithm | quote }}
|
200
|
-
{{- end }}
|
201
|
-
{{- if .ZenML.auth.jwtTokenIssuer }}
|
202
|
-
jwt_token_issuer: {{ .ZenML.auth.jwtTokenIssuer | quote }}
|
203
|
-
{{- end }}
|
204
|
-
{{- if .ZenML.auth.jwtTokenAudience }}
|
205
|
-
jwt_token_audience: {{ .ZenML.auth.jwtTokenAudience | quote }}
|
206
|
-
{{- end }}
|
207
|
-
{{- if .ZenML.auth.jwtTokenLeewaySeconds }}
|
208
|
-
jwt_token_leeway_seconds: {{ .ZenML.auth.jwtTokenLeewaySeconds | quote }}
|
209
|
-
{{- end }}
|
210
|
-
{{- if .ZenML.auth.authCookieName }}
|
211
|
-
auth_cookie_name: {{ .ZenML.auth.authCookieName | quote }}
|
212
|
-
{{- end }}
|
213
|
-
{{- if .ZenML.auth.authCookieDomain }}
|
214
|
-
auth_cookie_domain: {{ .ZenML.auth.authCookieDomain | quote }}
|
215
|
-
{{- end }}
|
216
|
-
{{- if .ZenML.auth.maxFailedDeviceAuthAttempts }}
|
217
|
-
max_failed_device_auth_attempts: {{ .ZenML.auth.maxFailedDeviceAuthAttempts | quote }}
|
218
|
-
{{- end }}
|
219
|
-
{{- if .ZenML.auth.deviceAuthTimeout }}
|
220
|
-
device_auth_timeout: {{ .ZenML.auth.deviceAuthTimeout | quote }}
|
221
|
-
{{- end }}
|
222
|
-
{{- if .ZenML.auth.deviceAuthPollingInterval }}
|
223
|
-
device_auth_polling_interval: {{ .ZenML.auth.deviceAuthPollingInterval | quote }}
|
224
|
-
{{- end }}
|
225
|
-
{{- if .ZenML.auth.deviceExpirationMinutes }}
|
226
|
-
device_expiration_minutes: {{ .ZenML.auth.deviceExpirationMinutes | quote }}
|
227
|
-
{{- end }}
|
228
|
-
{{- if .ZenML.auth.trustedDeviceExpirationMinutes }}
|
229
|
-
trusted_device_expiration_minutes: {{ .ZenML.auth.trustedDeviceExpirationMinutes | quote }}
|
230
|
-
{{- end }}
|
231
|
-
{{- if .ZenML.rootUrlPath }}
|
232
|
-
root_url_path: {{ .ZenML.rootUrlPath | quote }}
|
233
|
-
{{- end }}
|
234
|
-
{{- if .ZenML.serverURL }}
|
235
|
-
server_url: {{ .ZenML.serverURL | quote }}
|
236
|
-
{{- end }}
|
237
|
-
{{- range $key, $value := .ZenML.secure_headers }}
|
238
|
-
secure_headers_{{ $key }}: {{ $value | quote }}
|
239
|
-
{{- end }}
|
240
|
-
{{- end }}
|
241
|
-
|
242
|
-
|
243
|
-
{{/*
|
244
|
-
Server configuration environment variables (non-secret values).
|
245
|
-
|
246
|
-
Passes the .Values.zenml dict as input to the `zenml.serverConfigurationAttrs`
|
247
|
-
template and converts the output into a dictionary of environment variables that
|
248
|
-
need to be configured for the server.
|
249
|
-
|
250
|
-
Args:
|
251
|
-
.Values: The values.yaml file for the ZenML deployment.
|
252
|
-
Returns:
|
253
|
-
A dictionary with the non-secret environment variables that are configured for
|
254
|
-
the server (i.e. keys starting with `ZENML_SERVER_`).
|
255
|
-
*/}}
|
256
|
-
{{- define "zenml.serverEnvVariables" -}}
|
257
|
-
{{ $zenml := dict "ZenML" .Values.zenml }}
|
258
|
-
{{- range $k, $v := include "zenml.serverConfigurationAttrs" $zenml | fromYaml }}
|
259
|
-
ZENML_SERVER_{{ $k | upper }}: {{ $v | quote }}
|
260
|
-
{{- end }}
|
261
|
-
{{- end }}
|
262
|
-
|
263
|
-
|
264
|
-
{{/*
|
265
|
-
Secrets store configuration options (non-secret values).
|
266
|
-
|
267
|
-
This template constructs a dictionary that is similar to the python values that
|
268
|
-
can be configured in the zenml.config.secrets_store_config.SecretsStoreConfiguration
|
269
|
-
subclasses for each secrets store type. Only non-secret values are included in
|
270
|
-
this dictionary.
|
271
|
-
|
272
|
-
The dictionary is then converted into deployment environment variables by other
|
273
|
-
templates and inserted where it is needed.
|
274
|
-
|
275
|
-
The input is taken from a .SecretsStore dict that is passed to the template and
|
276
|
-
contains the values configured in the values.yaml file for either the primary
|
277
|
-
secrets store or the backup secrets store.
|
278
|
-
|
279
|
-
Legacy support for passing the GCP secrets store credentials through the
|
280
|
-
`GOOGLE_APPLICATION_CREDENTIALS` environment variable is addressed here and
|
281
|
-
converted into the corresponding `auth_method` and `auth_config` values for the
|
282
|
-
GCP secrets store. This allows all values to be handed over to the container
|
283
|
-
as environment variables, without the need to mount the credentials into the
|
284
|
-
container as a volume.
|
285
|
-
|
286
|
-
Args:
|
287
|
-
.SecretsStore: A dictionary with the values configured for either the primary
|
288
|
-
or the backup secrets store.
|
289
|
-
Returns:
|
290
|
-
A dictionary with the non-secret values configured for the secrets store.
|
291
|
-
*/}}
|
292
|
-
{{- define "zenml.secretsStoreConfigurationAttrs" -}}
|
293
|
-
{{- if .SecretsStore.enabled }}
|
294
|
-
type: {{ .SecretsStore.type | quote }}
|
295
|
-
{{- if eq .SecretsStore.type "aws" }}
|
296
|
-
auth_method: {{ .SecretsStore.aws.authMethod | quote }}
|
297
|
-
{{- if .SecretsStore.aws.region_name }}
|
298
|
-
region_name: {{ .SecretsStore.aws.region_name | quote }}
|
299
|
-
{{- end }}
|
300
|
-
{{- else if eq .SecretsStore.type "gcp" }}
|
301
|
-
{{- if .SecretsStore.gcp.google_application_credentials }}
|
302
|
-
auth_method: "service-account"
|
303
|
-
{{- else }}
|
304
|
-
auth_method: {{ .SecretsStore.gcp.authMethod | quote }}
|
305
|
-
{{- if .SecretsStore.gcp.project_id }}
|
306
|
-
project_id: {{ .SecretsStore.gcp.project_id | quote }}
|
307
|
-
{{- end }}
|
308
|
-
{{- end }}
|
309
|
-
{{- else if eq .SecretsStore.type "azure" }}
|
310
|
-
auth_method: {{ .SecretsStore.azure.authMethod | quote }}
|
311
|
-
key_vault_name: {{ .SecretsStore.azure.key_vault_name | quote }}
|
312
|
-
{{- else if eq .SecretsStore.type "hashicorp" }}
|
313
|
-
vault_addr: {{ .SecretsStore.hashicorp.vault_addr | quote }}
|
314
|
-
{{- if .SecretsStore.hashicorp.vault_namespace }}
|
315
|
-
vault_namespace: {{ .SecretsStore.hashicorp.vault_namespace | quote }}
|
316
|
-
{{- end }}
|
317
|
-
{{- if .SecretsStore.hashicorp.max_versions }}
|
318
|
-
max_versions: {{ .SecretsStore.hashicorp.max_versions | quote }}
|
319
|
-
{{- end }}
|
320
|
-
{{- else if eq .SecretsStore.type "custom" }}
|
321
|
-
class_path: {{ .SecretsStore.custom.class_path | quote }}
|
322
|
-
{{- end }}
|
323
|
-
{{- else }}
|
324
|
-
type: none
|
325
|
-
{{- end }}
|
326
|
-
{{- end }}
|
327
|
-
|
328
|
-
{{/*
|
329
|
-
Legacy GCP secrets store configuration.
|
330
|
-
|
331
|
-
This template is used to support the legacy GCP secrets store credentials
|
332
|
-
attributes (`zenml.secretsStore.gcp.google_application_credentials` and
|
333
|
-
`zenml.secretsStore.gcp.project_id`) and convert them automatically into the
|
334
|
-
corresponding new-style `auth_config` values for the GCP secrets store.
|
335
|
-
|
336
|
-
Args:
|
337
|
-
.SecretsStore: A dictionary with the values configured for either the primary
|
338
|
-
or the backup secrets store.
|
339
|
-
Returns:
|
340
|
-
A `zenml.secretsStore.gcp.authConfig` value computed from the legacy GCP
|
341
|
-
secrets store credentials attributes.
|
342
|
-
*/}}
|
343
|
-
{{- define "zenml.legacyGCPSecretsStoreAuthConfig" -}}
|
344
|
-
project_id: {{ .SecretsStore.gcp.project_id | quote }}
|
345
|
-
service_account_json: {{ .SecretsStore.gcp.google_application_credentials | quote }}
|
346
|
-
{{- end }}
|
347
|
-
|
348
|
-
|
349
|
-
{{/*
|
350
|
-
Secrets store configuration options (secret values).
|
351
|
-
|
352
|
-
This template constructs a dictionary that is similar to the python values that
|
353
|
-
can be configured in the zenml.config.secrets_store_config.SecretsStoreConfiguration
|
354
|
-
subclasses for each secrets store type. Only secret configuration values are
|
355
|
-
included in this dictionary.
|
356
|
-
|
357
|
-
The dictionary is then converted into secret environment variables by other
|
358
|
-
templates and inserted where it is needed.
|
359
|
-
|
360
|
-
The input is taken from a .SecretsStore dict that is passed to the template and
|
361
|
-
contains the values configured in the values.yaml file for either the primary
|
362
|
-
secrets store or the backup secrets store.
|
363
|
-
|
364
|
-
Legacy support for passing the GCP secrets store credentials through the
|
365
|
-
`GOOGLE_APPLICATION_CREDENTIALS` environment variable is addressed here and
|
366
|
-
converted into the corresponding `auth_method` and `auth_config` values for the
|
367
|
-
GCP secrets store. This allows all values to be handed over to the container
|
368
|
-
as environment variables, without the need to mount the credentials into the
|
369
|
-
container as a volume.
|
370
|
-
|
371
|
-
Args:
|
372
|
-
.SecretsStore: A dictionary with the values configured for either the primary
|
373
|
-
or the backup secrets store.
|
374
|
-
Returns:
|
375
|
-
A dictionary with the secret values configured for the secrets store.
|
376
|
-
*/}}
|
377
|
-
{{- define "zenml.secretsStoreSecretConfigurationAttrs" -}}
|
378
|
-
{{- if .SecretsStore.enabled }}
|
379
|
-
{{- if eq .SecretsStore.type "sql" }}
|
380
|
-
{{- if .SecretsStore.sql.encryptionKey }}
|
381
|
-
encryption_key: {{ .SecretsStore.sql.encryptionKey | quote }}
|
382
|
-
{{- else if .SecretsStore.encryptionKey }}
|
383
|
-
encryption_key: {{ .SecretsStore.encryptionKey | quote }}
|
384
|
-
{{- end }}
|
385
|
-
{{- else if eq .SecretsStore.type "aws" }}
|
386
|
-
{{- if .SecretsStore.aws.authConfig }}
|
387
|
-
auth_config: {{ .SecretsStore.aws.authConfig | toJson | quote }}
|
388
|
-
{{- end }}
|
389
|
-
{{- if .SecretsStore.aws.aws_access_key_id }}
|
390
|
-
aws_access_key_id: {{ .SecretsStore.aws.aws_access_key_id | quote }}
|
391
|
-
{{- end }}
|
392
|
-
{{- if .SecretsStore.aws.aws_secret_access_key }}
|
393
|
-
aws_secret_access_key: {{ .SecretsStore.aws.aws_secret_access_key | quote }}
|
394
|
-
{{- end }}
|
395
|
-
{{- if .SecretsStore.aws.aws_session_token }}
|
396
|
-
aws_session_token: {{ .SecretsStore.aws.aws_session_token | quote }}
|
397
|
-
{{- end }}
|
398
|
-
{{- else if eq .SecretsStore.type "azure" }}
|
399
|
-
{{- if .SecretsStore.azure.authConfig }}
|
400
|
-
auth_config: {{ .SecretsStore.azure.authConfig | toJson | quote }}
|
401
|
-
{{- end }}
|
402
|
-
{{- if .SecretsStore.azure.azure_client_id }}
|
403
|
-
azure_client_id: {{ .SecretsStore.azure.azure_client_id | quote }}
|
404
|
-
{{- end }}
|
405
|
-
{{- if .SecretsStore.azure.azure_client_secret }}
|
406
|
-
azure_client_secret: {{ .SecretsStore.azure.azure_client_secret | quote }}
|
407
|
-
{{- end }}
|
408
|
-
{{- if .SecretsStore.azure.azure_tenant_id }}
|
409
|
-
azure_tenant_id: {{ .SecretsStore.azure.azure_tenant_id | quote }}
|
410
|
-
{{- end }}
|
411
|
-
{{- else if eq .SecretsStore.type "gcp" }}
|
412
|
-
{{- if .SecretsStore.gcp.google_application_credentials }}
|
413
|
-
auth_config: {{ include "zenml.legacyGCPSecretsStoreAuthConfig" . | fromYaml | toJson | quote }}
|
414
|
-
{{- else if .SecretsStore.gcp.authConfig }}
|
415
|
-
auth_config: {{ .SecretsStore.gcp.authConfig | toJson | quote }}
|
416
|
-
{{- end }}
|
417
|
-
{{- else if eq .SecretsStore.type "hashicorp" }}
|
418
|
-
{{- if .SecretsStore.hashicorp.vault_token }}
|
419
|
-
vault_token: {{ .SecretsStore.hashicorp.vault_token | quote }}
|
420
|
-
{{- end }}
|
421
|
-
{{- end }}
|
422
|
-
{{- end }}
|
423
|
-
{{- end }}
|
424
|
-
|
425
|
-
|
426
|
-
{{/*
|
427
|
-
Primary secrets store environment variables (non-secret values).
|
428
|
-
|
429
|
-
Passes the .Values.zenml.secretsStore dict as input to the
|
430
|
-
`zenml.secretsStoreEnvVariables` template and converts the output into a
|
431
|
-
dictionary of environment variables that need to be configured for the primary
|
432
|
-
secrets store.
|
433
|
-
|
434
|
-
Args:
|
435
|
-
.Values: The values.yaml file for the ZenML deployment.
|
436
|
-
Returns:
|
437
|
-
A dictionary with the non-secret environment variables that are configured for
|
438
|
-
the primary secrets store (i.e. keys starting with `ZENML_SECRETS_STORE_`).
|
439
|
-
*/}}
|
440
|
-
{{- define "zenml.secretsStoreEnvVariables" -}}
|
441
|
-
{{ $secretsStore := dict "SecretsStore" .Values.zenml.secretsStore }}
|
442
|
-
{{- range $k, $v := include "zenml.secretsStoreConfigurationAttrs" $secretsStore | fromYaml }}
|
443
|
-
ZENML_SECRETS_STORE_{{ $k | upper }}: {{ $v | quote }}
|
444
|
-
{{- end }}
|
445
|
-
{{- end }}
|
446
|
-
|
447
|
-
{{/*
|
448
|
-
Primary secrets store environment variables (secret values).
|
449
|
-
|
450
|
-
Passes the .Values.zenml.secretsStore dict as input to the
|
451
|
-
`zenml.secretsStoreSecretEnvVariables` template and converts the output into a
|
452
|
-
dictionary of environment variables that need to be configured for the primary
|
453
|
-
secrets store as secrets.
|
454
|
-
|
455
|
-
Args:
|
456
|
-
.Values: The values.yaml file for the ZenML deployment.
|
457
|
-
Returns:
|
458
|
-
A dictionary with the secret environment variables that are configured for
|
459
|
-
the primary secrets store (i.e. keys starting with `ZENML_SECRETS_STORE_`).
|
460
|
-
*/}}
|
461
|
-
{{- define "zenml.secretsStoreSecretEnvVariables" -}}
|
462
|
-
{{ $secretsStore := dict "SecretsStore" .Values.zenml.secretsStore }}
|
463
|
-
{{- range $k, $v := include "zenml.secretsStoreSecretConfigurationAttrs" $secretsStore | fromYaml }}
|
464
|
-
ZENML_SECRETS_STORE_{{ $k | upper }}: {{ $v | quote }}
|
465
|
-
{{- end }}
|
466
|
-
{{- end }}
|
467
|
-
|
468
|
-
{{/*
|
469
|
-
Backup secrets store environment variables (non-secret values).
|
470
|
-
|
471
|
-
Passes the .Values.zenml.secretsStore dict as input to the
|
472
|
-
`zenml.secretsStoreEnvVariables` template and converts the output into a
|
473
|
-
dictionary of environment variables that need to be configured for the backup
|
474
|
-
secrets store.
|
475
|
-
|
476
|
-
Args:
|
477
|
-
.Values: The values.yaml file for the ZenML deployment.
|
478
|
-
Returns:
|
479
|
-
A dictionary with the non-secret environment variables that are configured for
|
480
|
-
the backup secrets store (i.e. keys starting with
|
481
|
-
`ZENML_BACKUP_SECRETS_STORE_`).
|
482
|
-
*/}}
|
483
|
-
{{- define "zenml.backupSecretsStoreEnvVariables" -}}
|
484
|
-
{{ $secretsStore := dict "SecretsStore" .Values.zenml.backupSecretsStore }}
|
485
|
-
{{- range $k, $v := include "zenml.secretsStoreConfigurationAttrs" $secretsStore | fromYaml }}
|
486
|
-
ZENML_BACKUP_SECRETS_STORE_{{ $k | upper }}: {{ $v | quote }}
|
487
|
-
{{- end }}
|
488
|
-
{{- end }}
|
489
|
-
|
490
|
-
|
491
|
-
{{/*
|
492
|
-
Backup secrets store environment variables (secret values).
|
493
|
-
|
494
|
-
Passes the .Values.zenml.secretsStore dict as input to the
|
495
|
-
`zenml.secretsStoreSecretEnvVariables` template and converts the output into a
|
496
|
-
dictionary of environment variables that need to be configured for the backup
|
497
|
-
secrets store as secrets.
|
498
|
-
|
499
|
-
Args:
|
500
|
-
.Values: The values.yaml file for the ZenML deployment.
|
501
|
-
Returns:
|
502
|
-
A dictionary with the secret environment variables that are configured for
|
503
|
-
the backup secrets store (i.e. keys starting with
|
504
|
-
`ZENML_BACKUP_SECRETS_STORE_`).
|
505
|
-
*/}}
|
506
|
-
{{- define "zenml.backupSecretsStoreSecretEnvVariables" -}}
|
507
|
-
{{ $secretsStore := dict "SecretsStore" .Values.zenml.backupSecretsStore }}
|
508
|
-
{{- range $k, $v := include "zenml.secretsStoreSecretConfigurationAttrs" $secretsStore | fromYaml}}
|
509
|
-
ZENML_BACKUP_SECRETS_STORE_{{ $k | upper }}: {{ $v | quote }}
|
510
|
-
{{- end }}
|
511
|
-
{{- end }}
|
@@ -1,70 +0,0 @@
|
|
1
|
-
{{/*
|
2
|
-
Expand the name of the chart.
|
3
|
-
*/}}
|
4
|
-
{{- define "zenml.name" -}}
|
5
|
-
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
6
|
-
{{- end }}
|
7
|
-
|
8
|
-
{{/*
|
9
|
-
Create a default fully qualified app name.
|
10
|
-
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
11
|
-
If release name contains chart name it will be used as a full name.
|
12
|
-
*/}}
|
13
|
-
{{- define "zenml.fullname" -}}
|
14
|
-
{{- if .Values.fullnameOverride }}
|
15
|
-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
16
|
-
{{- else }}
|
17
|
-
{{- $name := default .Chart.Name .Values.nameOverride }}
|
18
|
-
{{- if contains $name .Release.Name }}
|
19
|
-
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
20
|
-
{{- else }}
|
21
|
-
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
22
|
-
{{- end }}
|
23
|
-
{{- end }}
|
24
|
-
{{- end }}
|
25
|
-
|
26
|
-
{{/*
|
27
|
-
Create chart name and version as used by the chart label.
|
28
|
-
*/}}
|
29
|
-
{{- define "zenml.chart" -}}
|
30
|
-
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
31
|
-
{{- end }}
|
32
|
-
|
33
|
-
{{/*
|
34
|
-
Common labels
|
35
|
-
*/}}
|
36
|
-
{{- define "zenml.labels" -}}
|
37
|
-
helm.sh/chart: {{ include "zenml.chart" . }}
|
38
|
-
{{ include "zenml.selectorLabels" . }}
|
39
|
-
{{- if .Chart.Version }}
|
40
|
-
app.kubernetes.io/version: {{ .Chart.Version | quote }}
|
41
|
-
{{- end }}
|
42
|
-
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
43
|
-
{{- end }}
|
44
|
-
{{- define "zenml.metadataLabels" -}}
|
45
|
-
helm.sh/chart: {{ include "zenml.chart" . }}
|
46
|
-
{{ include "zenml.metadataSelectorLabels" . }}
|
47
|
-
{{- if .Chart.Version }}
|
48
|
-
app.kubernetes.io/version: {{ .Chart.Version | quote }}
|
49
|
-
{{- end }}
|
50
|
-
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
51
|
-
{{- end }}
|
52
|
-
|
53
|
-
{{/*
|
54
|
-
Selector labels
|
55
|
-
*/}}
|
56
|
-
{{- define "zenml.selectorLabels" -}}
|
57
|
-
app.kubernetes.io/name: {{ include "zenml.name" . }}
|
58
|
-
app.kubernetes.io/instance: {{ .Release.Name }}
|
59
|
-
{{- end }}
|
60
|
-
|
61
|
-
{{/*
|
62
|
-
Create the name of the service account to use
|
63
|
-
*/}}
|
64
|
-
{{- define "zenml.serviceAccountName" -}}
|
65
|
-
{{- if .Values.serviceAccount.create }}
|
66
|
-
{{- default (include "zenml.fullname" .) .Values.serviceAccount.name }}
|
67
|
-
{{- else }}
|
68
|
-
{{- default "default" .Values.serviceAccount.name }}
|
69
|
-
{{- end }}
|
70
|
-
{{- end }}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
{{- if and .Values.zenml.ingress.enabled .Values.zenml.ingress.tls.enabled .Values.zenml.ingress.tls.generateCerts -}}
|
2
|
-
|
3
|
-
{{- $certSubjectName := .Values.zenml.ingress.host -}}
|
4
|
-
|
5
|
-
{{- $prevServerSecret := (lookup "v1" "Secret" .Release.Namespace .Values.zenml.ingress.tls.secretName) -}}
|
6
|
-
{{- if or .Release.IsInstall (not $prevServerSecret) }}
|
7
|
-
{{- $_ := set . "regenerateCerts" true -}}
|
8
|
-
{{- else if eq (index $prevServerSecret.metadata.annotations "zenml.certs/subject-name") $certSubjectName }}
|
9
|
-
{{- $_ := set . "regenerateCerts" false -}}
|
10
|
-
{{- else }}
|
11
|
-
{{- $_ := set . "regenerateCerts" true -}}
|
12
|
-
{{- end }}
|
13
|
-
|
14
|
-
{{- if .regenerateCerts }}
|
15
|
-
|
16
|
-
{{- $caCert := genCA "zenml-ca" 365 -}}
|
17
|
-
{{- $serverCert := genSignedCert $certSubjectName nil (list $certSubjectName) 365 $caCert -}}
|
18
|
-
|
19
|
-
{{- $_ := set . "caCert" $caCert.Cert -}}
|
20
|
-
{{- $_ := set . "serverCert" $serverCert.Cert -}}
|
21
|
-
{{- $_ := set . "serverKey" $serverCert.Key -}}
|
22
|
-
|
23
|
-
{{- else }}
|
24
|
-
|
25
|
-
{{- $_ := set . "caCert" (index $prevServerSecret.data "ca.crt" | b64dec) -}}
|
26
|
-
{{- $_ := set . "serverCert" (index $prevServerSecret.data "tls.crt" | b64dec) -}}
|
27
|
-
{{- $_ := set . "serverKey" (index $prevServerSecret.data "tls.key" | b64dec) -}}
|
28
|
-
|
29
|
-
{{- end }}
|
30
|
-
|
31
|
-
apiVersion: v1
|
32
|
-
kind: Secret
|
33
|
-
metadata:
|
34
|
-
name: {{ .Values.zenml.ingress.tls.secretName }}
|
35
|
-
labels:
|
36
|
-
{{- include "zenml.labels" . | nindent 4 }}
|
37
|
-
annotations:
|
38
|
-
zenml.certs/subject-name: {{ $certSubjectName}}
|
39
|
-
type: kubernetes.io/tls
|
40
|
-
data:
|
41
|
-
tls.crt: {{ .serverCert | b64enc | quote }}
|
42
|
-
tls.key: {{ .serverKey | b64enc | quote }}
|
43
|
-
ca.crt: {{ .caCert | b64enc | quote }}
|
44
|
-
|
45
|
-
{{- end }}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
{{- if .Values.autoscaling.enabled }}
|
2
|
-
apiVersion: autoscaling/v2
|
3
|
-
kind: HorizontalPodAutoscaler
|
4
|
-
metadata:
|
5
|
-
name: {{ include "zenml.fullname" . }}
|
6
|
-
labels:
|
7
|
-
{{- include "zenml.labels" . | nindent 4 }}
|
8
|
-
spec:
|
9
|
-
scaleTargetRef:
|
10
|
-
apiVersion: apps/v1
|
11
|
-
kind: Deployment
|
12
|
-
name: {{ include "zenml.fullname" . }}
|
13
|
-
minReplicas: {{ .Values.autoscaling.minReplicas }}
|
14
|
-
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
|
15
|
-
metrics:
|
16
|
-
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
|
17
|
-
- type: Resource
|
18
|
-
resource:
|
19
|
-
name: cpu
|
20
|
-
target:
|
21
|
-
type: Utilization
|
22
|
-
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
|
23
|
-
{{- end }}
|
24
|
-
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
25
|
-
- type: Resource
|
26
|
-
resource:
|
27
|
-
name: memory
|
28
|
-
target:
|
29
|
-
type: Utilization
|
30
|
-
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
|
31
|
-
{{- end }}
|
32
|
-
{{- end }}
|