-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
burnham.yaml
107 lines (107 loc) · 2.72 KB
/
burnham.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: burnham-ingress
labels:
app: burnham
{{- toYaml .Values.labels | nindent 4 }}
annotations:
{{ if eq .Values.spec.ingress.type "nginx" }}
#nginx annotations
{{ else }}
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: 'ip'
{{ if .Values.spec.ingress.host }} # we can't use grouping without custom domain
alb.ingress.kubernetes.io/group.name: burnham
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80,"HTTPS": 443}]'
alb.ingress.kubernetes.io/ssl-redirect: '443'
{{ else }}
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]'
{{ end }}
alb.ingress.kubernetes.io/backend-protocol: 'HTTP'
alb.ingress.kubernetes.io/tags: Environment={{ .Values.labels.env }},Team=Burnham
{{ end }}
{{ if .Values.spec.ingress.host }}
external-dns.alpha.kubernetes.io/set-identifier: {{ .Values.spec.clusterName }}
external-dns.alpha.kubernetes.io/aws-weight: '{{ .Values.spec.ingress.route53_weight }}'
external-dns.alpha.kubernetes.io/ttl: "10"
{{ end }}
spec:
{{ if eq .Values.spec.ingress.type "nginx" }}
kubernetes.io/ingress.class: "nginx"
{{ else }}
ingressClassName: alb
{{ end }}
rules:
{{ if .Values.spec.ingress.host }}
- host: burnham.{{ .Values.spec.ingress.host }}
{{ else }}
- host:
{{ end }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: burnham
port:
number: 80
---
apiVersion: v1
kind: Service
metadata:
name: burnham
labels:
app: burnham-ingress-{{ .Values.spec.env }}
spec:
ports:
- port: 80
targetPort: 80
selector:
app: burnham
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: burnham
labels:
app: burnham
{{- toYaml .Values.labels | nindent 4 }}
spec:
replicas: 3
revisionHistoryLimit: 3
selector:
matchLabels:
app: burnham
template:
metadata:
labels:
app: burnham
seb: test
spec:
containers:
- name: burnham
image: public.ecr.aws/seb-demo/eks-example-go:6d1d832508017919344c62c5eaece159fccffa79
imagePullPolicy: Always
env:
- name: CLUSTER_NAME
value: {{ .Values.spec.clusterName }}
ports:
- containerPort: 80
resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 250m
memory: 50Mi
{{ if .Values.spec.karpenterInstanceProfile }}
nodeSelector:
team: burnham
type: karpenter
tolerations:
- key: 'burnham'
operator: 'Exists'
effect: 'NoSchedule'
{{ end }}