Mohammed Naser f7d0d3ac66 Added nodepool to charts
Depends-On: https://review.opendev.org/700222
Change-Id: I137953006abdbb3abc6d82b010d68df3ed0ef64d
2020-01-07 19:28:15 +00:00

66 lines
1.8 KiB
YAML

---
{{ if .Values.builder.enabled }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: {{ .Release.Namespace }}
name: {{ include "nodepool.fullname" . }}-builder
labels:
{{- include "nodepool.builder.labels" . | indent 4 }}
spec:
replicas: {{ .Values.builder.replicas }}
serviceName: nodepool-builder
selector:
matchLabels:
{{- include "nodepool.builder.labels" . | indent 6 }}
template:
metadata:
labels:
{{- include "nodepool.builder.labels" . | indent 8 }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
spec:
containers:
- name: launcher
image: zuul/nodepool-builder:latest
env:
- name: OS_CLIENT_CONFIG_FILE
value: /etc/nodepool/clouds.yaml
volumeMounts:
- name: nodepool-config
mountPath: /etc/nodepool
- name: nodepool-logs
mountPath: /var/log/nodepool
- name: {{ include "nodepool.fullname" . }}-images-dir
mountPath: {{ index .Values.config "images-dir" }}
- name: dev
mountPath: /dev
securityContext:
privileged: true
volumes:
- name: nodepool-config
secret:
secretName: {{ include "nodepool.fullname" . }}
- name: nodepool-logs
emptyDir: {}
- name: dev
hostPath:
path: /dev
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
volumeClaimTemplates:
- metadata:
name: {{ include "nodepool.fullname" . }}-images-dir
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 80G
{{ end }}