mirror of
https://github.com/clearml/clearml-helm-charts
synced 2025-02-01 17:43:39 +00:00
cb98ae9a19
* Changed: rename alignment * Changed: general refactoring * Changed: version bump * Added: enterprise company guid * Added: tanzu rolebinding * Changed: updated parames * Changed: bump to 1.9 * Fixed: whitespaces * Added: fake values for apps git user * Changed: updated deps * Changed: app version reference * Changed: enterprise parameters name * Changed: image version bump * Changed: extra index url config for enterprise
121 lines
5.0 KiB
YAML
121 lines
5.0 KiB
YAML
{{- if .Values.enterpriseFeatures.enabled }}
|
|
{{- if .Values.enterpriseFeatures.clearmlApplications.enabled }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "clearmlApplications.referenceName" . }}
|
|
labels:
|
|
{{- include "clearml.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.enterpriseFeatures.clearmlApplications.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "clearmlApplications.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.enterpriseFeatures.clearmlApplications.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "clearmlApplications.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- if .Values.imageCredentials.enabled }}
|
|
imagePullSecrets:
|
|
{{- if .Values.imageCredentials.existingSecret }}
|
|
- name: .Values.imageCredentials.existingSecret
|
|
{{- else }}
|
|
- name: clearml-registry-key
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.enterpriseFeatures.clearmlApplications.additionalConfigs }}
|
|
volumes:
|
|
- name: apps-config
|
|
configMap:
|
|
name: "{{ include "clearmlApplications.referenceName" . }}-configmap"
|
|
{{- end }}
|
|
serviceAccountName: "clearml-apps-sa"
|
|
initContainers:
|
|
- name: init-apps
|
|
image: "{{ .Values.enterpriseFeatures.clearmlApplications.image.repository }}:{{ .Values.enterpriseFeatures.clearmlApplications.image.tag | default .Chart.AppVersion }}"
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- >
|
|
set -x;
|
|
while [ $(curl -sw '%{http_code}' "http://{{ include "apiserver.referenceName" . }}:{{ .Values.apiserver.service.port }}/debug.ping" -o /dev/null) -ne 200 ] ; do
|
|
echo "waiting for apiserver" ;
|
|
sleep 5 ;
|
|
done
|
|
containers:
|
|
- name: clearml-apps
|
|
image: "{{ .Values.enterpriseFeatures.clearmlApplications.image.repository }}:{{ .Values.enterpriseFeatures.clearmlApplications.image.tag | default .Chart.AppVersion }}"
|
|
imagePullPolicy: {{ .Values.enterpriseFeatures.clearmlApplications.image.pullPolicy }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 8008
|
|
protocol: TCP
|
|
env:
|
|
- name: CLEARML_API_HOST
|
|
value: "http://{{ include "apiserver.referenceName" . }}:{{ .Values.apiserver.service.port }}"
|
|
- name: CLEARML_FILES_HOST
|
|
value: "http://{{ include "fileserver.referenceName" . }}:{{ .Values.fileserver.service.port }}"
|
|
- name: CLEARML_WEB_HOST
|
|
value: "http://{{ include "webserver.referenceName" . }}:{{ .Values.webserver.service.port }}"
|
|
- name: CLEARML_AGENT_DEFAULT_BASE_DOCKER
|
|
value: "{{ .Values.enterpriseFeatures.clearmlApplications.basePodImage.repository }}:{{ .Values.enterpriseFeatures.clearmlApplications.basePodImage.tag }}"
|
|
- name: CLEARML_WORKER_ID
|
|
value: "apps-agent-1"
|
|
- name: CLEARML_NO_DEFAULT_SERVER
|
|
value: "true"
|
|
- name: CLEARML_AGENT_DAEMON_OPTIONS
|
|
value: "--foreground --create-queue --use-owner-token --child-report-tags application --services-mode=5"
|
|
- name: K8S_GLUE_QUEUE
|
|
value: "apps_queue"
|
|
- name: CLEARML_AGENT_DISABLE_SSH_MOUNT
|
|
value: "1"
|
|
- name: CLEARML_API_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: clearml-conf
|
|
key: apps_agent_key
|
|
- name: CLEARML_API_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: clearml-conf
|
|
key: apps_agent_secret
|
|
- name: CLEARML_AGENT_GIT_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: clearml-conf
|
|
key: apps_git_agent_user
|
|
- name: CLEARML_AGENT_GIT_PASS
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: clearml-conf
|
|
key: apps_git_agent_pass
|
|
{{- if .Values.enterpriseFeatures.clearmlApplications.extraEnvs }}
|
|
{{ toYaml .Values.enterpriseFeatures.clearmlApplications.extraEnvs | nindent 10 }}
|
|
{{- end }}
|
|
{{- if .Values.enterpriseFeatures.clearmlApplications.additionalConfigs }}
|
|
volumeMounts:
|
|
- name: apps-config
|
|
mountPath: /opt/clearml/config/default
|
|
{{- end }}
|
|
resources:
|
|
{{- toYaml .Values.enterpriseFeatures.clearmlApplications.resources | nindent 12 }}
|
|
{{- with .Values.enterpriseFeatures.clearmlApplications.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.enterpriseFeatures.clearmlApplications.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.enterpriseFeatures.clearmlApplications.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|