diff --git a/charts/label-studio/Chart.yaml b/charts/label-studio/Chart.yaml index 159adc07..52c675fa 100644 --- a/charts/label-studio/Chart.yaml +++ b/charts/label-studio/Chart.yaml @@ -20,7 +20,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 2.2.1 +version: 2.2.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/label-studio/templates/deployment.yaml b/charts/label-studio/templates/deployment.yaml index 36393f1f..caec5777 100644 --- a/charts/label-studio/templates/deployment.yaml +++ b/charts/label-studio/templates/deployment.yaml @@ -30,6 +30,13 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.service.image.repository }}:{{ .Values.service.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.service.image.pullPolicy }} + + envFrom: + {{- if .Values.s3.enabled }} + - configMapRef: + name: {{ include "library-chart.configMapNameS3" . }} + {{- end }} + env: - name: LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK value: "true" @@ -37,6 +44,10 @@ spec: value: {{ .Values.security.username }} - name: LABEL_STUDIO_PASSWORD value: {{ .Values.security.password }} + - name: S3_ENDPOINT + value: "https://{{ .Values.s3.endpoint }}" + - name: S3-region + value: {{ .Values.s3.defaultRegion }} ports: - name: http containerPort: 8080 diff --git a/charts/label-studio/values.schema.json b/charts/label-studio/values.schema.json index f2e5cda8..2b34b033 100644 --- a/charts/label-studio/values.schema.json +++ b/charts/label-studio/values.schema.json @@ -81,6 +81,87 @@ } } } + }, + "s3": { + "description": "Configuration of temporary identity", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Add S3 temporary identity inside your environment", + "default": true + }, + "accessKeyId": { + "description": "AWS Access Key", + "type": "string", + "x-form": { + "value": "{{s3.AWS_ACCESS_KEY_ID}}" + }, + "x-onyxia": { + "overwriteDefaultWith": "{{s3.AWS_ACCESS_KEY_ID}}" + }, + "hidden": { + "value": false, + "path": "s3/enabled" + } + }, + "endpoint": { + "description": "AWS S3 Endpoint", + "type": "string", + "x-form": { + "value": "{{s3.AWS_S3_ENDPOINT}}" + }, + "x-onyxia": { + "overwriteDefaultWith": "{{s3.AWS_S3_ENDPOINT}}" + }, + "hidden": { + "value": false, + "path": "s3/enabled" + } + }, + "defaultRegion": { + "description": "AWS S3 default region", + "type": "string", + "x-form": { + "value": "{{s3.AWS_DEFAULT_REGION}}" + }, + "x-onyxia": { + "overwriteDefaultWith": "{{s3.AWS_DEFAULT_REGION}}" + }, + "hidden": { + "value": false, + "path": "s3/enabled" + } + }, + "secretAccessKey": { + "description": "AWS S3 secret access key", + "type": "string", + "x-form": { + "value": "{{s3.AWS_SECRET_ACCESS_KEY}}" + }, + "x-onyxia": { + "overwriteDefaultWith": "{{s3.AWS_SECRET_ACCESS_KEY}}" + }, + "hidden": { + "value": false, + "path": "s3/enabled" + } + }, + "sessionToken": { + "description": "AWS S3 session Token", + "type": "string", + "x-form": { + "value": "{{s3.AWS_SESSION_TOKEN}}" + }, + "x-onyxia": { + "overwriteDefaultWith": "{{s3.AWS_SESSION_TOKEN}}" + }, + "hidden": { + "value": false, + "path": "s3/enabled" + } + } + } }, "ingress": { "type": "object", diff --git a/charts/label-studio/values.yaml b/charts/label-studio/values.yaml index be887517..8081892c 100644 --- a/charts/label-studio/values.yaml +++ b/charts/label-studio/values.yaml @@ -19,6 +19,18 @@ service: liveness: enabled : "true" +s3: + # Specifies whether a config map should be created + enabled: false + # The name of the configmap to use. + # If not set and create is true, a name is generated using the fullname template + configMapName: "" + accessKeyId: "" + endpoint: "minio.lab.sspcloud.fr" + defaultRegion: "us-east-1" + secretAccessKey: "" + sessionToken: "" + security: password: changeme username: username