Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SO1S-349 ALB / NLB 걷어내기 #28

Merged
merged 32 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7a3dfee
feat: add backend istio gateway, virtualservice
DPS0340 Aug 31, 2022
1171a8b
feat: add monitoring istio gateway, virtualservice
DPS0340 Aug 31, 2022
465593b
feat: use ClusterIP on argocd
DPS0340 Aug 31, 2022
299fbea
chore: change target revision temporary for test
DPS0340 Aug 31, 2022
58c9688
fix: change root-dev targetRevision to SO1S-349
DPS0340 Sep 1, 2022
de00684
fix: use values properly
DPS0340 Sep 1, 2022
f330270
chore: fix grafana hosts
DPS0340 Sep 1, 2022
32f077a
fix: change inference chart namespace to istio-system
DPS0340 Sep 1, 2022
9b2780c
feat: add automated sync policy on istio charts
DPS0340 Sep 1, 2022
e7d841b
chore: delete root-dev automated sync policy
DPS0340 Sep 1, 2022
397af47
chore: delete service, ingress annotations
DPS0340 Sep 1, 2022
73fa777
chore: remove argocd dev ingress
DPS0340 Sep 1, 2022
644c580
fix: do not use nested subdomain
DPS0340 Sep 1, 2022
b7a7989
feat: add prometheus gateway, virtualservice
DPS0340 Sep 1, 2022
5834899
fix: indent
DPS0340 Sep 1, 2022
48b47ab
fix: grafana fullname path
DPS0340 Sep 1, 2022
64b8537
chore: move grafana gateway, virtualservice to subcharts
DPS0340 Sep 1, 2022
a901fc2
fix: change prometheus virtualservice dest port
DPS0340 Sep 1, 2022
938ca15
chore: fix grafana ingress hosts path
DPS0340 Sep 1, 2022
8a4b0da
fix: grafana virtualservice name
DPS0340 Sep 1, 2022
2dfc45e
feat: disable backend ingress
DPS0340 Sep 1, 2022
e9e5504
chore: delete prod-values ingress annotations
DPS0340 Sep 1, 2022
fd5eef3
chore: delete alb comment
DPS0340 Sep 1, 2022
977e408
chore: use graph prefix
DPS0340 Sep 1, 2022
8bcb92d
chore: use routePrefix
DPS0340 Sep 1, 2022
201bb4f
chore: routePrefix to root
DPS0340 Sep 1, 2022
908bc98
fix: virtualservice prefix to root
DPS0340 Sep 1, 2022
bf314c5
chore: routePrefix to root
DPS0340 Sep 1, 2022
f314a6b
chore: routePrefix to root (prod-values)
DPS0340 Sep 1, 2022
3db33de
fix: don't modify grafana values
DPS0340 Sep 1, 2022
9ec5f92
chore: remove prod-values annotations
DPS0340 Sep 1, 2022
125a8e4
chore: change targetRevision to main
DPS0340 Sep 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/dev/app-inference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:

destination:
server: https://kubernetes.default.svc
namespace: backend
namespace: istio-system

syncPolicy:
syncOptions:
Expand Down
5 changes: 4 additions & 1 deletion apps/dev/app-istio-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ spec:
namespace: istio-system

syncPolicy:
automated:
prune: true
selfHeal: true
NEM-NE marked this conversation as resolved.
Show resolved Hide resolved
Comment on lines 25 to +28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self Healing은 주기적으로 확인하고 정상적으로 작동되지 않았으면 재부팅하는건가요 ??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 거의 비슷한 작업으로 OutOfSync를 자동으로 해결해주는 역할입니다!

syncOptions:
- CreateNamespace=true
- CreateNamespace=true
3 changes: 3 additions & 0 deletions apps/dev/app-istio-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ spec:
namespace: istio-system

syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
5 changes: 4 additions & 1 deletion apps/dev/app-istiod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ spec:
namespace: istio-system

syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- CreateNamespace=true
6 changes: 3 additions & 3 deletions apps/dev/app-logging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ spec:
namespace: logging

syncPolicy:
automated:
prune: true
selfHeal: true
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
2 changes: 1 addition & 1 deletion apps/prod/app-inference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:

destination:
server: https://kubernetes.default.svc
namespace: backend
namespace: istio-system

syncPolicy:
automated:
Expand Down
23 changes: 7 additions & 16 deletions charts/argocd/argocd-dev-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,20 @@ server:
logFormat: json

extraArgs: # To avoid internal redirection loops from HTTP to HTTPS
- --insecure
- --insecure
tolerations:
- key: kind
operator: "Equal"
value: "api"
effect: "NoSchedule"
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/target-type: instance
alb.ingress.kubernetes.io/scheme: internet-facing
external-dns.alpha.kubernetes.io/hostname: argo.so1s.io
hosts:
- test.argo.so1s.io
enabled: false
annotations: {}
hosts: []
tls: []
service:
type: LoadBalancer
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "external"
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "instance"
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
type: ClusterIP
annotations: {}

controller:
logFormat: json
Expand Down Expand Up @@ -65,7 +57,7 @@ applicationSet:
operator: "Equal"
value: "api"
effect: "NoSchedule"

notification:
tolerations:
- key: kind
Expand All @@ -81,4 +73,3 @@ notifications:
operator: "Equal"
value: "api"
effect: "NoSchedule"

22 changes: 9 additions & 13 deletions charts/argocd/argocd-prod-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,30 @@ server:
logFormat: json

extraArgs: # To avoid internal redirection loops from HTTP to HTTPS
- --insecure
- --insecure
tolerations:
- key: kind
operator: "Equal"
value: "api"
effect: "NoSchedule"
ingress:
enabled: true
annotations:
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/target-type: instance
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: instance
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/healthcheck-protocol: HTTPS
alb.ingress.kubernetes.io/healthcheck-port: '443'
alb.ingress.kubernetes.io/healthcheck-port: "443"
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/ssl-redirect: "443"
alb.ingress.kubernetes.io/certificate-arn: "arn:aws:acm:ap-northeast-2:089143290485:certificate/8f20bc85-876b-47a2-8c9f-27e9f5455ca9"
external-dns.alpha.kubernetes.io/hostname: argo.so1s.io
hosts:
- argo.so1s.io
tls: []
service:
type: LoadBalancer
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "external"
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "instance"
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
type: ClusterIP
annotations: {}

controller:
logFormat: json
Expand Down Expand Up @@ -70,7 +67,7 @@ applicationSet:
operator: "Equal"
value: "api"
effect: "NoSchedule"

notification:
tolerations:
- key: kind
Expand All @@ -86,4 +83,3 @@ notifications:
operator: "Equal"
value: "api"
effect: "NoSchedule"

27 changes: 9 additions & 18 deletions charts/backend/dev-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,9 @@ resources:
cpu: "300m"

ingress:
annotations:
kubernetes.io/ingress.class: alb #alb를 사용한다는 의미
alb.ingress.kubernetes.io/target-type: instance #target이 ec2 인스턴스
alb.ingress.kubernetes.io/scheme: internet-facing #외부에 노출
external-dns.alpha.kubernetes.io/hostname: test.www.so1s.io
hosts:
- test.www.so1s.io
annotations: {}
hosts:
- test-www.so1s.io
paths:
- /
tls: []
Expand All @@ -66,26 +62,21 @@ swagger:
memory: "50Mi"
cpu: "25m"


tolerations:
- key: kind
operator: "Equal"
value: "api"
effect: "NoSchedule"


ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
external-dns.alpha.kubernetes.io/hostname: test.swagger.so1s.io
hosts:
- test.swagger.so1s.io
enabled: false
annotations: {}
hosts:
- test-swagger.so1s.io
paths:
- /
tls: []

service:
port: 80
targetPort: 8080
targetPort: 8080
31 changes: 7 additions & 24 deletions charts/backend/prod-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,8 @@ resources:
cpu: "600m"

ingress:
annotations:
kubernetes.io/ingress.class: alb #alb를 사용한다는 의미
alb.ingress.kubernetes.io/target-type: instance #target이 ec2 인스턴스
alb.ingress.kubernetes.io/scheme: internet-facing #외부에 노출
alb.ingress.kubernetes.io/healthcheck-protocol: HTTPS
alb.ingress.kubernetes.io/healthcheck-port: '443'
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/certificate-arn: "arn:aws:acm:ap-northeast-2:089143290485:certificate/8f20bc85-876b-47a2-8c9f-27e9f5455ca9"
external-dns.alpha.kubernetes.io/hostname: www.so1s.io
hosts:
annotations: {}
hosts:
- www.so1s.io
paths:
- /
Expand All @@ -66,20 +57,12 @@ swagger:
operator: "Equal"
value: "api"
effect: "NoSchedule"

ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: alb
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/healthcheck-protocol: HTTPS
alb.ingress.kubernetes.io/healthcheck-port: '443'
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/ssl-redirect: '443'
alb.ingress.kubernetes.io/certificate-arn: "arn:aws:acm:ap-northeast-2:089143290485:certificate/8f20bc85-876b-47a2-8c9f-27e9f5455ca9"
external-dns.alpha.kubernetes.io/hostname: swagger.so1s.io
hosts:
enabled: false
annotations: {}
hosts:
- swagger.so1s.io
paths:
- /
tls: []
tls: []
12 changes: 12 additions & 0 deletions charts/backend/templates/gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: {{ include "backend.fullname" . }}
spec:
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
{{ toYaml .Values.ingress.hosts | indent 4 }}
12 changes: 12 additions & 0 deletions charts/backend/templates/swagger/gateway.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: {{ include "backend.fullname" . }}-swagger
spec:
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
{{ toYaml .Values.swagger.ingress.hosts | indent 4 }}
18 changes: 18 additions & 0 deletions charts/backend/templates/swagger/virtualservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: {{ include "backend.fullname" . }}-swagger
spec:
hosts:
{{ toYaml .Values.swagger.ingress.hosts | indent 4 }}
gateways:
- {{ include "backend.fullname" . }}-swagger
http:
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
host: {{ include "backend.fullname" . }}-swagger
18 changes: 18 additions & 0 deletions charts/backend/templates/virtualservice.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: {{ include "backend.fullname" . }}
spec:
hosts:
{{ toYaml .Values.ingress.hosts | indent 4 }}
gateways:
- {{ include "backend.fullname" . }}
http:
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
host: {{ include "backend.fullname" . }}
17 changes: 9 additions & 8 deletions charts/backend/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

vender: "AWS" # AWS | on-premise

environment: "develop" # develop | production
Expand All @@ -25,10 +24,12 @@ serviceAccount:
annotations: {}
name: ""

podSecurityContext: {}
podSecurityContext:
{}
NEM-NE marked this conversation as resolved.
Show resolved Hide resolved
# fsGroup: 2000

securityContext: {}
securityContext:
{}
# capabilities:
# drop:
# - ALL
Expand All @@ -37,7 +38,7 @@ securityContext: {}
# runAsUser: 1000

ingress:
enabled: true
enabled: false
annotations: {}
labels: {}
hosts: []
Expand All @@ -47,7 +48,7 @@ ingress:
servicePort: 80

service:
type: LoadBalancer
type: ClusterIP
port: 80
targetPort: 8080

Expand Down Expand Up @@ -82,9 +83,9 @@ swagger:

resources: {}
tolerations: []

ingress:
enabled: true
enabled: false
annotations: {}
labels: {}
hosts: []
Expand All @@ -99,4 +100,4 @@ swagger:

pullSecret:
enabled: false
dockerConfigJson: ""
dockerConfigJson: ""
Loading