diff --git a/helm/digitalhub/Chart.yaml b/helm/digitalhub/Chart.yaml index 019b4da5..a86c69a9 100644 --- a/helm/digitalhub/Chart.yaml +++ b/helm/digitalhub/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: digitalhub description: A Helm chart for Kubernetes type: application -version: 0.2.24 +version: 0.2.26 appVersion: "0.1.0" dependencies: - name: docker-registry diff --git a/helm/digitalhub/charts/core/templates/configmap-digitalhub.yaml b/helm/digitalhub/charts/core/templates/configmap-digitalhub.yaml new file mode 100644 index 00000000..c1639a00 --- /dev/null +++ b/helm/digitalhub/charts/core/templates/configmap-digitalhub.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: digitalhub-common-env +data: + DIGITALHUB_ENDPOINT: "http://{{ include "core.fullname" . }}:{{ .Values.service.port }}" + DIGITALHUB_S3_ENDPOINT_URL: "{{ .Values.minio.endpoint }}:{{ index .Values.minio.endpointPort }}" + DIGITALHUB_S3_BUCKET_NAME: {{ .Values.minio.bucketName }} + DIGITALHUB_POSTGRES_HOST: {{ .Values.postgres.host }} + DIGITALHUB_POSTGRES_PORT: {{ .Values.postgres.port | quote }} + DIGITALHUB_POSTGRES_DATABASE: {{ .Values.postgres.database }} + S3_ENDPOINT_URL: http://minio.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.minio.endpointPort }} + DIGITALHUB_VERSION: {{ .Chart.Version }} + DIGITALHUB_CORE_ENDPOINT: "http://{{ include "core.fullname" . }}:{{ .Values.service.port }}" + DIGITALHUB_KRM_ENDPOINT: "http://{{ .Release.Name }}-custom-resource-manager:{{ .Values.krm.port }}" + POSTGRES_HOST: {{ .Values.postgres.host }} + POSTGRES_PORT: {{ .Values.postgres.port | quote }} + POSTGRES_DATABASE: {{ .Values.postgres.database }} \ No newline at end of file diff --git a/helm/digitalhub/charts/core/templates/configmap.yaml b/helm/digitalhub/charts/core/templates/configmap.yaml index 802a8ca5..31a580ba 100644 --- a/helm/digitalhub/charts/core/templates/configmap.yaml +++ b/helm/digitalhub/charts/core/templates/configmap.yaml @@ -14,4 +14,6 @@ data: JDBC_URL: "jdbc:postgresql://core-postgres-cluster:5432/core" JDBC_DRIVER: org.postgresql.Driver JDBC_DIALECT: org.hibernate.dialect.PostgreSQLDialect - H2_CONSOLE: "false" \ No newline at end of file + H2_CONSOLE: "false" + DH_CONFIG_COMMON_SECRETS: minio, digitalhub.database-postgres-cluster.credentials.postgresql.acid.zalan.do + DH_CONFIG_COMMON_MAPS: digitalhub-common-env \ No newline at end of file diff --git a/helm/digitalhub/charts/core/values.yaml b/helm/digitalhub/charts/core/values.yaml index a4150d61..5babf11e 100644 --- a/helm/digitalhub/charts/core/values.yaml +++ b/helm/digitalhub/charts/core/values.yaml @@ -44,8 +44,10 @@ securityContext: # runAsUser: 1000 minio: + bucketName: "" endpoint: "" endpointPort: "" + port: "" service: port: "8080" type: ClusterIP @@ -110,3 +112,15 @@ nodeSelector: {} tolerations: [] affinity: {} + +config: + rootUser: "" + rootPassword: "" + +postgres: + host: "" + database: "" + port: "" + +krm: + port: "" \ No newline at end of file diff --git a/helm/digitalhub/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml b/helm/digitalhub/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml index bf602cee..8f7365c1 100644 --- a/helm/digitalhub/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml +++ b/helm/digitalhub/charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml @@ -10,8 +10,8 @@ data: AWS_SECRET_ACCESS_KEY: {{ .Values.minio.rootPassword }} AWS_ACCESS_KEY_ID: {{ .Values.minio.rootUser }} MLRUN_HTTPDB__REAL_PATH: s3:// - MLRUN_ARTIFACT_PATH: s3://mlrun/projects/{{ `{{run.project}}` }}/artifacts - MLRUN_FEATURE_STORE__DATA_PREFIXES__DEFAULT: s3://mlrun/projects/{project}/FeatureStore/{name}/{kind} + MLRUN_ARTIFACT_PATH: s3://{{ .Values.pipelines.minio.bucket }}/projects/{{ `{{run.project}}` }}/artifacts + MLRUN_FEATURE_STORE__DATA_PREFIXES__DEFAULT: s3://{{ .Values.pipelines.minio.bucket }}/projects/{project}/FeatureStore/{name}/{kind} MLRUN_FEATURE_STORE__DATA_PREFIXES__NOSQL: "" MLRUN_CE__MODE: {{ .Values.mlrun.ce.mode }} MLRUN_CE__VERSION: {{ .Chart.Version }} diff --git a/helm/digitalhub/confs/coder/jupyter-main.tf b/helm/digitalhub/confs/coder/jupyter-main.tf index 21fd834f..aedadb61 100644 --- a/helm/digitalhub/confs/coder/jupyter-main.tf +++ b/helm/digitalhub/confs/coder/jupyter-main.tf @@ -50,6 +50,12 @@ variable "db_secret" { default = "digitalhub.database-postgres-cluster.credentials.postgresql.acid.zalan.do" } +variable "minio_secret" { + description = "Provides the secret credentials for minio" + type = string + default = "minio" +} + variable "service_type" { type = string default = "ClusterIP" @@ -69,12 +75,6 @@ variable "external_url" { type = string } -variable "dhcore_endpoint" { - type = string - description = "DHCore endpoint" - default = "http://digitalhub-core:8080" -} - data "coder_parameter" "cpu" { name = "cpu" display_name = "CPU" @@ -374,15 +374,26 @@ resource "kubernetes_deployment" "jupyter" { } } } - env { - name = "DHUB_CORE_ENDPOINT" - value = var.dhcore_endpoint - } env_from { config_map_ref { name = "mlrun-common-env" } } + env_from { + config_map_ref { + name = "digitalhub-common-env" + } + } + env_from { + secret_ref { + name = var.minio_secret + } + } + env_from { + secret_ref { + name = var.db_secret + } + } port { container_port = 8888 name = "http" diff --git a/helm/digitalhub/templates/database-postgresql-cluster.yaml b/helm/digitalhub/templates/database-postgresql-cluster.yaml index 535fbf7b..5ffbd5ba 100644 --- a/helm/digitalhub/templates/database-postgresql-cluster.yaml +++ b/helm/digitalhub/templates/database-postgresql-cluster.yaml @@ -8,7 +8,7 @@ spec: size: 8Gi numberOfInstances: 3 users: - admin: + digitalhubadmin: - superuser - createdb digitalhub: [] diff --git a/helm/digitalhub/values.yaml b/helm/digitalhub/values.yaml index d4aaff4c..9df006e0 100644 --- a/helm/digitalhub/values.yaml +++ b/helm/digitalhub/values.yaml @@ -274,13 +274,13 @@ ext-postgres-operator: password: "" uri_args: " " cloud_provider: " " - default_database: "postgres" + default_database: "digitalhub" postgresCredsExistingSecrets: username: - secretName: "digitalhub.database-postgres-cluster.credentials.postgresql.acid.zalan.do" + secretName: "digitalhubadmin.database-postgres-cluster.credentials.postgresql.acid.zalan.do" secretKey: "username" password: - secretName: "digitalhub.database-postgres-cluster.credentials.postgresql.acid.zalan.do" + secretName: "digitalhubadmin.database-postgres-cluster.credentials.postgresql.acid.zalan.do" secretKey: "password" postgrest-operator: @@ -302,11 +302,21 @@ postgrest-operator: core: enabled: true minio: + bucketName: datalake endpoint: "minio" endpointPort: "9000" service: type: *serviceType httpNodePort: "30180" + postgres: + host: database-postgres-cluster + database: digitalhub + port: "5432" + config: + rootUser: minio + rootPassword: minio123 + krm: + port: "8080" custom-resource-manager: enabled: true