Skip to content

Commit

Permalink
Merge branch 'main' of github.com:scc-digitalhub/digitalhub
Browse files Browse the repository at this point in the history
  • Loading branch information
ffais committed Dec 7, 2023
2 parents f98f622 + 51b87d4 commit b86092d
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 18 deletions.
2 changes: 1 addition & 1 deletion helm/digitalhub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions helm/digitalhub/charts/core/templates/configmap-digitalhub.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 3 additions & 1 deletion helm/digitalhub/charts/core/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
H2_CONSOLE: "false"
DH_CONFIG_COMMON_SECRETS: minio, digitalhub.database-postgres-cluster.credentials.postgresql.acid.zalan.do
DH_CONFIG_COMMON_MAPS: digitalhub-common-env
14 changes: 14 additions & 0 deletions helm/digitalhub/charts/core/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ securityContext:
# runAsUser: 1000

minio:
bucketName: ""
endpoint: ""
endpointPort: ""
port: ""
service:
port: "8080"
type: ClusterIP
Expand Down Expand Up @@ -110,3 +112,15 @@ nodeSelector: {}
tolerations: []

affinity: {}

config:
rootUser: ""
rootPassword: ""

postgres:
host: ""
database: ""
port: ""

krm:
port: ""
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
31 changes: 21 additions & 10 deletions helm/digitalhub/confs/coder/jupyter-main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion helm/digitalhub/templates/database-postgresql-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
size: 8Gi
numberOfInstances: 3
users:
admin:
digitalhubadmin:
- superuser
- createdb
digitalhub: []
Expand Down
16 changes: 13 additions & 3 deletions helm/digitalhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit b86092d

Please sign in to comment.