Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
fix init script for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
avouacr committed Oct 19, 2022
1 parent 24243d7 commit b20c72e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 37 deletions.
2 changes: 1 addition & 1 deletion charts/ubuntu/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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: 5.4.0
version: 5.4.1

# 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
Expand Down
13 changes: 2 additions & 11 deletions charts/ubuntu/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
image: "{{ .Values.service.image.version }}"
{{- end }}
command: ["/bin/sh","-c"]
args: ["/data/{{ .Values.init.filename}} /usr/bin/tini -- /dockerstartup/startup.sh"]
args: ["{{ .Values.init.standardInitPath }} /usr/bin/tini -- /dockerstartup/startup.sh"]
imagePullPolicy: {{ .Values.service.image.pullPolicy }}
env:
- name: VNC_PW
Expand Down Expand Up @@ -99,16 +99,7 @@ spec:
- mountPath: /dev/shm
name: dshm
- mountPath: /home/headless/work
name: home
initContainers:
- name: standard-init
image: "busybox"
imagePullPolicy: "IfNotPresent"
command: ["/bin/sh","-c"]
args: ["wget -O /data/{{ .Values.init.filename}} {{ .Values.init.standardInit}} && chmod +x /data/{{ .Values.init.filename}}"]
volumeMounts:
- mountPath: /data
name: {{$volumeName}}
name: home
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
46 changes: 23 additions & 23 deletions charts/ubuntu/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"version": {
"description": "ubuntu supported version",
"type": "string",
"enum": ["inseefrlab/ubuntu-vnc:v1.0.0"],
"enum": ["inseefrlab/ubuntu-vnc:"],
"pattern": "^[a-z0-9-_./]+(:[a-z0-9-_.]+)?$",
"hidden": {
"value": true,
Expand Down Expand Up @@ -600,30 +600,30 @@
"description": "Init parameters",
"type": "object",
"properties": {
"standardInit": {
"type": "string",
"description": "initialization script",
"default": "",
"x-form": {
"hidden": true,
"value": "{{k8s.initScriptUrl}}"
},
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{k8s.initScriptUrl}}"
}
},
"personalInit": {
"type": "string",
"description": "initialization script",
"default": ""
"regionInit": {
"type": "string",
"description": "region initialization script",
"default": "",
"x-form": {
"hidden": true,
"value": "{{k8s.initScriptUrl}}"
},
"personalInitArgs": {
"type": "string",
"description": "args for initialization script",
"default": ""
"x-onyxia": {
"hidden": true,
"overwriteDefaultWith": "{{k8s.initScriptUrl}}"
}
},
"personalInit": {
"type": "string",
"description": "user initialization script",
"default": ""
},
"personalInitArgs": {
"type": "string",
"description": "args for user initialization script",
"default": ""
}
}
}
}
}
}
4 changes: 2 additions & 2 deletions charts/ubuntu/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ security:
ip: "0.0.0.0/0"

init:
standardInit: "https://git.lab.sspcloud.fr/innovation/plateforme-onyxia/services-ressources/-/raw/master/onyxia-init.sh"
filename: "onyxia-init.sh"
standardInitPath: "/opt/onyxia-init.sh"
regionInit: ""
personalInit: ""
personalInitArgs: ""

Expand Down

0 comments on commit b20c72e

Please sign in to comment.