Commit a1a09cf5 authored by Luke Lowery's avatar Luke Lowery Committed by Tao Feng

adding resources, tolerations, node selectors, and affinities to the charts (#192)

adding a version
parent f04d5fac
name: amundsen name: amundsen
home: https://github.com/lyft/amundsen version: 0.0.1
\ No newline at end of file home: https://github.com/lyft/amundsen
...@@ -7,12 +7,24 @@ spec: ...@@ -7,12 +7,24 @@ spec:
selector: selector:
matchLabels: matchLabels:
run: {{ .Chart.Name }}-{{ .Values.searchServiceName }} run: {{ .Chart.Name }}-{{ .Values.searchServiceName }}
replicas: 1 replicas: {{ default 1 .Values.search.replicas }}
template: template:
metadata: metadata:
labels: labels:
run: {{ .Chart.Name }}-{{ .Values.searchServiceName }} run: {{ .Chart.Name }}-{{ .Values.searchServiceName }}
spec: spec:
{{- with default .Values.nodeSelector .Values.search.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with default .Values.affinity .Values.search.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with default .Values.tolerations .Values.search.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }}-{{ .Values.searchServiceName }} - name: {{ .Chart.Name }}-{{ .Values.searchServiceName }}
image: {{- if .Values.searchServiceImage }} {{.Values.searchServiceImage}}{{- else }} {{ .Values.dockerhubImagePath }}/{{ .Chart.Name }}-{{ .Values.searchServiceName }}:{{ .Values.searchImageVersion }}{{- end }} image: {{- if .Values.searchServiceImage }} {{.Values.searchServiceImage}}{{- else }} {{ .Values.dockerhubImagePath }}/{{ .Chart.Name }}-{{ .Values.searchServiceName }}:{{ .Values.searchImageVersion }}{{- end }}
...@@ -21,6 +33,10 @@ spec: ...@@ -21,6 +33,10 @@ spec:
env: env:
- name: PROXY_ENDPOINT - name: PROXY_ENDPOINT
value: elasticsearch value: elasticsearch
{{- with .Values.search.resources }}
resources:
{{ toYaml . | indent 10 }}
{{- end }}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
...@@ -30,12 +46,24 @@ spec: ...@@ -30,12 +46,24 @@ spec:
selector: selector:
matchLabels: matchLabels:
run: {{ .Chart.Name }}-{{ .Values.metadataServiceName }} run: {{ .Chart.Name }}-{{ .Values.metadataServiceName }}
replicas: 1 replicas: {{ default 1 .Values.metadataReplicas }}
template: template:
metadata: metadata:
labels: labels:
run: {{ .Chart.Name }}-{{ .Values.metadataServiceName }} run: {{ .Chart.Name }}-{{ .Values.metadataServiceName }}
spec: spec:
{{- with default .Values.nodeSelector .Values.metadata.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with default .Values.affinity .Values.metadata.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with default .Values.tolerations .Values.metadata.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }}-{{ .Values.metadataServiceName }} - name: {{ .Chart.Name }}-{{ .Values.metadataServiceName }}
image: {{- if .Values.metadataServiceImage }} {{.Values.metadataServiceImage}}{{- else }} {{ .Values.dockerhubImagePath }}/{{ .Chart.Name }}-{{ .Values.metadataServiceName }}:{{ .Values.metadataImageVersion }}{{- end }} image: {{- if .Values.metadataServiceImage }} {{.Values.metadataServiceImage}}{{- else }} {{ .Values.dockerhubImagePath }}/{{ .Chart.Name }}-{{ .Values.metadataServiceName }}:{{ .Values.metadataImageVersion }}{{- end }}
...@@ -44,6 +72,10 @@ spec: ...@@ -44,6 +72,10 @@ spec:
env: env:
- name: PROXY_HOST - name: PROXY_HOST
value: bolt://neo4j value: bolt://neo4j
{{- with .Values.metadata.resources }}
resources:
{{ toYaml . | indent 10 }}
{{- end }}
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
...@@ -53,12 +85,24 @@ spec: ...@@ -53,12 +85,24 @@ spec:
selector: selector:
matchLabels: matchLabels:
run: {{ .Chart.Name }}-{{ .Values.frontEndServiceName }} run: {{ .Chart.Name }}-{{ .Values.frontEndServiceName }}
replicas: 1 replicas: {{ default 1 .Values.frontEnd.replicas }}
template: template:
metadata: metadata:
labels: labels:
run: {{ .Chart.Name }}-{{ .Values.frontEndServiceName }} run: {{ .Chart.Name }}-{{ .Values.frontEndServiceName }}
spec: spec:
{{- with default .Values.nodeSelector .Values.frontEnd.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with default .Values.affinity .Values.frontEnd.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with default .Values.tolerations .Values.frontEnd.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }}-{{ .Values.frontEndServiceName }} - name: {{ .Chart.Name }}-{{ .Values.frontEndServiceName }}
image: {{- if .Values.frontEndServiceImage }} {{.Values.frontEndServiceImage}}{{- else }} {{ .Values.dockerhubImagePath }}/{{ .Chart.Name }}-{{ .Values.frontEndServiceName }}:{{ .Values.frontEndImageVersion }}{{- end }} image: {{- if .Values.frontEndServiceImage }} {{.Values.frontEndServiceImage}}{{- else }} {{ .Values.dockerhubImagePath }}/{{ .Chart.Name }}-{{ .Values.frontEndServiceName }}:{{ .Values.frontEndImageVersion }}{{- end }}
...@@ -71,4 +115,4 @@ spec: ...@@ -71,4 +115,4 @@ spec:
value: http://{{ .Chart.Name }}-{{ .Values.metadataServiceName }}:5002 value: http://{{ .Chart.Name }}-{{ .Values.metadataServiceName }}:5002
- name: FRONTEND_SVC_CONFIG_MODULE_CLASS - name: FRONTEND_SVC_CONFIG_MODULE_CLASS
value: amundsen_application.config.TestConfig value: amundsen_application.config.TestConfig
--- ---
\ No newline at end of file
environment: "dev"
provider: aws
dnsZone: teamname.company.com
dockerhubImagePath: amundsendev
## Support Node, affinity and tolerations for scheduler pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
nodeSelector: {}
affinity: {}
tolerations: []
searchServiceName: search
searchImageVersion: 1.4.0
search:
replicas: 1
resources:
limits:
cpu: 2
memory: 2Gi
requests:
cpu: 1
memory: 1Gi
nodeSelector: {}
affinity: {}
tolerations: []
metadataServiceName: metadata
metadataImageVersion: 1.1.1
metadata:
replicas: 1
resources:
limits:
cpu: 2
memory: 2Gi
requests:
cpu: 1
memory: 1Gi
# You can also set these properties to override the ones set above
nodeSelector: {}
affinity: {}
tolerations: []
frontEndServiceName: frontend
frontEndImageVersion: 1.0.9
frontEndServicePort: 80
frontEnd:
replicas: 1
resources:
limits:
cpu: 2
memory: 2Gi
requests:
cpu: 1
memory: 1Gi
# You can also set these properties to override the ones set above
nodeSelector: {}
affinity: {}
tolerations: []
...@@ -12,8 +12,24 @@ spec: ...@@ -12,8 +12,24 @@ spec:
labels: labels:
run: {{ .Chart.Name }} run: {{ .Chart.Name }}
spec: spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
image: {{ .Chart.Name }}:{{ .Chart.AppVersion }} image: {{ .Chart.Name }}:{{ .Chart.AppVersion }}
ports: ports:
- containerPort: 9200 - containerPort: 9200
\ No newline at end of file {{- with .Values.resources }}
resources:
{{ toYaml . | indent 10 }}
{{- end }}
provider: aws
# nodeSelector
# affinity
# tolerations
# resources
# annotations
environment: staging
dnsZone: teamname.company.com
resources:
limits:
cpu: 2
memory: 2Gi
requests:
cpu: 1
memory: 1Gi
...@@ -12,6 +12,18 @@ spec: ...@@ -12,6 +12,18 @@ spec:
labels: labels:
run: {{ .Chart.Name }} run: {{ .Chart.Name }}
spec: spec:
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
image: {{ .Chart.Name }}:{{ .Chart.AppVersion }} image: {{ .Chart.Name }}:{{ .Chart.AppVersion }}
...@@ -29,4 +41,8 @@ spec: ...@@ -29,4 +41,8 @@ spec:
volumes: volumes:
- name: conf - name: conf
configMap: configMap:
name: {{ .Chart.Name }}-configmap name: {{ .Chart.Name }}-configmap
\ No newline at end of file {{- with .Values.resources }}
resources:
{{ toYaml . | indent 8 }}
{{- end }}
provider: aws
# nodeSelector
# affinity
# tolerations
# resources
# annotations
environment: staging
dnsZone: teamname.company.com
resources:
limits:
cpu: 2
memory: 2Gi
requests:
cpu: 1
memory: 1Gi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment