diff --git a/charts/dev/livebook/Chart.yaml b/charts/dev/livebook/Chart.yaml index 53486c3e3e1..9e50721d90e 100644 --- a/charts/dev/livebook/Chart.yaml +++ b/charts/dev/livebook/Chart.yaml @@ -34,4 +34,4 @@ sources: - https://github.com/truecharts/charts/tree/master/charts/dev/livebook - https://ghcr.io/livebook-dev/livebook type: application -version: 3.1.1 +version: 3.2.0 diff --git a/charts/dev/livebook/ci/test-values.yaml b/charts/dev/livebook/ci/test-values.yaml new file mode 100644 index 00000000000..9555d2e0d25 --- /dev/null +++ b/charts/dev/livebook/ci/test-values.yaml @@ -0,0 +1,2 @@ +livebook: + password: thisisunsafefortests diff --git a/charts/dev/livebook/questions.yaml b/charts/dev/livebook/questions.yaml index 675cde7e542..e1742281910 100644 --- a/charts/dev/livebook/questions.yaml +++ b/charts/dev/livebook/questions.yaml @@ -9,31 +9,67 @@ questions: # Include{replicas1} # Include{podSpec} # Include{containerMain} - - variable: env - label: Image Environment - schema: - additional_attrs: true - type: dict - attrs: - - variable: LIVEBOOK_PASSWORD - label: "Password (LIVEBOOK_PASSWORD)" - description: "Password needed to access livebook (must be at least 12 characters)" - schema: - type: string - required: true - private: true - - variable: LIVEBOOK_DEBUG - label: "Debug Logging (LIVEBOOK_DEBUG)" - description: > - enables verbose logging, when set to "true". Disabled by default. - schema: - type: boolean - - variable: LIVEBOOK_UPDATE_INSTRUCTIONS_URL - label: "Update instruction URL (LIVEBOOK_UPDATE_INSTRUCTIONS_URL)" - description: > - sets the URL to direct the user to for updating Livebook when a new version becomes available. - schema: - type: string +# Include{containerBasic} +# Include{containerAdvanced} +# Include{containerConfig} +# Include{podOptions} + - variable: livebook + group: App Configuration + label: Livebook + schema: + additional_attrs: true + type: dict + attrs: + - variable: password + label: "Password (LIVEBOOK_PASSWORD)" + description: Password needed to access livebook (must be at least 12 characters) + schema: + type: string + min_length: 12 + required: true + private: true + - variable: debug + label: "Debug Logging (LIVEBOOK_DEBUG)" + description: > + Enables verbose logging, when set to "true". Disabled by default. + schema: + type: boolean + default: false + - variable: updateInstructionsUrl + label: "Update instruction URL (LIVEBOOK_UPDATE_INSTRUCTIONS_URL)" + description: > + Sets the URL to direct the user to for updating Livebook when a new version becomes available. + schema: + type: string + - variable: awsCredentials + label: AWS Credentials + schema: + additional_attrs: true + type: dict + attrs: + - variable: enabled + label: "Set AWS Credentials" + description: > + Enable Livebook to read AWS Credentials from environment variables, + AWS Credentials, EC2/ECS metadata when configuring S3 buckets. + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: accessKeyId + label: "AWS Access Key ID" + description: > + AWS Access Key ID in case you want to configure AWS S3 Storage inside Livebook + schema: + type: string + - variable: secretAccessKey + label: "AWS Secret Access Key" + description: > + AWS Secret Access Key in case you want to configure AWS S3 Storage inside Livebook + schema: + type: string + private: true # Include{serviceRoot} - variable: main label: "Main Service" @@ -86,13 +122,13 @@ questions: description: "The UserID of the user running the application" schema: type: int - default: 0 + default: 568 - variable: runAsGroup label: "runAsGroup" description: "The groupID of the user running the application" schema: type: int - default: 0 + default: 568 # Include{securityContextContainer} # Include{securityContextAdvanced} # Include{securityContextPod} diff --git a/charts/dev/livebook/templates/_secrets.tpl b/charts/dev/livebook/templates/_secrets.tpl index 205e77ddbd9..bc6f29f1323 100644 --- a/charts/dev/livebook/templates/_secrets.tpl +++ b/charts/dev/livebook/templates/_secrets.tpl @@ -10,6 +10,8 @@ {{- end }} enabled: true data: - LIVEBOOK_SECRET_KEY_BASE: {{ $secretKeyBase }} - LIVEBOOK_COOKIE: {{ $cookie }} + LIVEBOOK_SECRET_KEY_BASE: {{ $secretKeyBase | quote }} + LIVEBOOK_COOKIE: {{ $cookie | quote }} + LIVEBOOK_PASSWORD: {{ .Values.livebook.password | quote }} + AWS_SECRET_ACCESS_KEY: {{ .Values.livebook.awsCredentials.secretAccessKey | default "" | quote }} {{- end -}} diff --git a/charts/dev/livebook/values.yaml b/charts/dev/livebook/values.yaml index cf90783411f..dec21dd1e7e 100644 --- a/charts/dev/livebook/values.yaml +++ b/charts/dev/livebook/values.yaml @@ -12,8 +12,8 @@ portal: securityContext: container: readOnlyRootFilesystem: false - runAsGroup: 0 - runAsUser: 0 + runAsGroup: 568 + runAsUser: 568 service: main: ports: @@ -42,6 +42,7 @@ workload: LIVEBOOK_NODE: livebook@$(A_POD_IP) LIVEBOOK_PORT: "{{ .Values.service.main.ports.main.port }}" LIVEBOOK_HOME: "{{ .Values.persistence.data.mountPath }}" + LIVEBOOK_DATA_PATH: "{{ .Values.persistence.data.mountPath }}" LIVEBOOK_SECRET_KEY_BASE: secretKeyRef: name: secrets @@ -50,3 +51,24 @@ workload: secretKeyRef: name: secrets key: LIVEBOOK_COOKIE + LIVEBOOK_PASSWORD: + secretKeyRef: + name: secrets + key: LIVEBOOK_PASSWORD + LIVEBOOK_DEBUG: '{{ ternary "true" "false" .Values.livebook.debug }}' + LIVEBOOK_UPDATE_INSTRUCTIONS_URL: "{{ .Values.livebook.updateInstructionsUrl }}" + LIVEBOOK_AWS_CREDENTIALS: '{{ ternary "true" "false" .Values.livebook.awsCredentials.enabled }}' + AWS_ACCESS_KEY_ID: "{{ .Values.livebook.awsCredentials.accessKeyId }}" + AWS_SECRET_ACCESS_KEY: + secretKeyRef: + name: secrets + key: AWS_SECRET_ACCESS_KEY +# default values +livebook: + password: "" + updateInstructionsUrl: "" + debug: false + awsCredentials: + enabled: false + accessKeyId: "" + secretAccessKey: ""