Add events resources
@@ -65,8 +65,6 @@ spec:
image: "{{ .Values.events.statuses.image }}:{{ .Values.events.statuses.imageTag }}"
imagePullPolicy: {{ .Values.events.statuses.imagePullPolicy }}
args: ["python3", "polyaxon_events/events/statuses.py"]
- ports:
- - containerPort: {{ .Values.service.internalPort }}
env:
{{ include "config.global" . | indent 8 }}
{{ include "config.amqp" . | indent 8 }}
@@ -87,3 +85,36 @@ spec:
resources:
{{ toYaml .Values.events.statuses.resources | indent 10 }}
{{- end }}
+ # resources events
+ {{- if .Values.events.resources.enabled }}
+ - name: {{ .Chart.Name }}-resources
+ image: "{{ .Values.events.resources.image }}:{{ .Values.events.resources.imageTag }}"
+ imagePullPolicy: {{ .Values.events.resources.imagePullPolicy }}
+ args: ["python3", "polyaxon_events/events/resources.py"]
+ env:
+ {{ include "config.global" . | indent 8 }}
+ {{ include "config.amqp" . | indent 8 }}
+ {{ include "config.redis" . | indent 8 }}
+ - name: POLYAXON_JOB_CONTAINERS_URL
+ valueFrom:
+ configMapKeyRef:
+ name: {{ template "polyaxon.fullname" . }}
+ key: redis-job-containers-url
+ - name: POLYAXON_INTERNAL_EXCHANGE
+ value: {{ .Values.exchanges.internalExchange | quote }}
+ - name: POLYAXON_EVENTS_RESOURCES_ROUTING_KEY
+ value: {{ .Values.routingKeys.eventsResources | quote }}
+ - name: POLYAXON_AMQP_RECONNECT_INTERVAL
+ value: {{ default 1 .Values.events.statuses.amqpReconnectInterval | quote }}
+ - name: POLYAXON_LOG_SLEEP_INTERVAL
+ value: {{ default 1 .Values.events.statuses.logSleepInterval | quote }}
+ resources:
+{{ toYaml .Values.events.resources.resources | indent 10 }}
+ volumeMounts:
+ - name: docker-sock
+ mountPath: /var/run/docker.sock
+ volumes:
+ - name: docker-sock
+ hostPath:
+ path: /var/run/docker.sock
+ {{- end }}
