* resource constraints: (fixes #895) - for cpu, only set cpu requests - for memory, set mem requests == mem limits - add missing resource constraints for minio and scheduled job - for crawler, set mem and cpu constraints per browser, scale based on browser instances per crawler - add comments in values.yaml for crawler values being multiplied - default values: bump crawler to 650 millicpu per browser instance just in case cleanup: remove unused entries from main backend configmap
		
			
				
	
	
		
			125 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			125 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
{{- if .Values.minio_local }}
 | 
						|
 | 
						|
---
 | 
						|
kind: PersistentVolumeClaim
 | 
						|
apiVersion: v1
 | 
						|
metadata:
 | 
						|
  name: minio-storage-pvc
 | 
						|
  annotations:
 | 
						|
    "helm.sh/resource-policy": keep
 | 
						|
spec:
 | 
						|
  accessModes:
 | 
						|
    - ReadWriteOnce
 | 
						|
 | 
						|
  resources:
 | 
						|
    requests:
 | 
						|
      storage: 5Gi
 | 
						|
 | 
						|
  {{- if .Values.volume_storage_class }}
 | 
						|
  storageClassName: {{ .Values.volume_storage_class }}
 | 
						|
  {{- end }}
 | 
						|
 | 
						|
 | 
						|
---
 | 
						|
apiVersion: apps/v1
 | 
						|
kind: Deployment
 | 
						|
metadata:
 | 
						|
  name: local-minio
 | 
						|
  namespace: {{ .Release.Namespace }}
 | 
						|
spec:
 | 
						|
  selector:
 | 
						|
    matchLabels:
 | 
						|
      app: local-minio
 | 
						|
 | 
						|
  replicas: 1
 | 
						|
  template:
 | 
						|
    metadata:
 | 
						|
      labels:
 | 
						|
        app: local-minio
 | 
						|
 | 
						|
    spec:
 | 
						|
      {{- if .Values.main_node_type }}
 | 
						|
      nodeSelector:
 | 
						|
        nodeType: {{ .Values.main_node_type }}
 | 
						|
      {{- end }}
 | 
						|
 | 
						|
      volumes:
 | 
						|
        - name: data-minio
 | 
						|
          persistentVolumeClaim:
 | 
						|
            claimName: minio-storage-pvc
 | 
						|
 | 
						|
      initContainers:
 | 
						|
        - name: init-bucket
 | 
						|
          image: {{ .Values.minio_image }}
 | 
						|
          imagePullPolicy: {{ .Values.minio_pull_policy }}
 | 
						|
 | 
						|
          command:
 | 
						|
              - sh
 | 
						|
              - -c
 | 
						|
              - |
 | 
						|
                  mkdir -p /data/{{ .Values.minio_local_bucket_name }}
 | 
						|
                  mkdir -p /data/.minio.sys
 | 
						|
                  echo '{"version":"1","format":"fs","id":"btrix-data-fs","fs":{"version":"2"}}' > /data/.minio.sys/format.json                  
 | 
						|
 | 
						|
          volumeMounts:
 | 
						|
            - name: data-minio
 | 
						|
              mountPath: /data
 | 
						|
              subPath: minio
 | 
						|
 | 
						|
          resources:
 | 
						|
            limits:
 | 
						|
              memory: {{ .Values.minio_memory }}
 | 
						|
 | 
						|
            requests:
 | 
						|
              cpu: {{ .Values.minio_cpu }}
 | 
						|
              memory: {{ .Values.minio_memory }}
 | 
						|
 | 
						|
      containers:
 | 
						|
        - name: minio
 | 
						|
          image: {{ .Values.minio_image }}
 | 
						|
          imagePullPolicy: {{ .Values.minio_pull_policy }}
 | 
						|
          args: ["server", "/data", "--console-address", ":9001"]
 | 
						|
          envFrom:
 | 
						|
            - secretRef:
 | 
						|
                name: auth-secrets
 | 
						|
 | 
						|
          volumeMounts:
 | 
						|
            - name: data-minio
 | 
						|
              mountPath: /data
 | 
						|
              subPath: minio
 | 
						|
 | 
						|
          resources:
 | 
						|
            limits:
 | 
						|
              memory: {{ .Values.minio_memory }}
 | 
						|
 | 
						|
            requests:
 | 
						|
              cpu: {{ .Values.minio_cpu }}
 | 
						|
              memory: {{ .Values.minio_memory }}
 | 
						|
 | 
						|
---
 | 
						|
apiVersion: v1
 | 
						|
kind: Service
 | 
						|
 | 
						|
metadata:
 | 
						|
  namespace: {{ .Release.Namespace }}
 | 
						|
  name: local-minio
 | 
						|
  labels:
 | 
						|
    app: local-minio
 | 
						|
 | 
						|
spec:
 | 
						|
  selector:
 | 
						|
    app: local-minio
 | 
						|
 | 
						|
  ports:
 | 
						|
    - protocol: TCP
 | 
						|
      port: 9000
 | 
						|
      name: minio
 | 
						|
 | 
						|
    - protocol: TCP
 | 
						|
      port: 9001
 | 
						|
      name: minio-console
 | 
						|
 | 
						|
{{- end }}
 | 
						|
 | 
						|
 |