박재현(JAEHYUN PARK)/IT개발 담당/SK 2 тижнів тому
батько
коміт
344ed4eb2c

+ 0 - 0
sk-aex/iam_policy.json → sk-aex/iam_policy.json.bck


+ 8 - 12
sk-aex/templates/ingress.yaml → sk-aex/templates/ingress-backend.yaml

@@ -1,24 +1,21 @@
-{{- range $name, $component := .Values.ingresses }}
-
-{{- if $component.enabled -}}
----
+{{- if .Values.ingressBackend.enabled -}}
 apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
-  name: {{ include "chart.componentFullname" (dict "root" $ "name" $name) }}
+  name: {{ include "chart.fullname" . }}-backend
   labels:
-    {{- include "chart.componentLabels" (dict "root" $ "name" $name) | nindent 4 }}
-  {{- with $component.annotations }}
+    {{- include "chart.labels" . | nindent 4 }}
+  {{- with .Values.ingressBackend.annotations }}
   annotations:
     {{- toYaml . | nindent 4 }}
   {{- end }}
 spec:
-  {{- with $component.className }}
+  {{- with .Values.ingressBackend.className }}
   ingressClassName: {{ . }}
   {{- end }}
-  {{- if $component.tls }}
+  {{- if .Values.ingressBackend.tls }}
   tls:
-    {{- range $component.tls }}
+    {{- range .Values.ingressBackend.tls }}
     - hosts:
         {{- range .hosts }}
         - {{ . | quote }}
@@ -27,7 +24,7 @@ spec:
     {{- end }}
   {{- end }}
   rules:
-    {{- range $component.hosts }}
+    {{- range .Values.ingressBackend.hosts }}
     -
       {{- with .host }}
       host: {{ . | quote }}
@@ -47,4 +44,3 @@ spec:
           {{- end }}
     {{- end }}
 {{- end }}
-{{- end }}

+ 46 - 0
sk-aex/templates/ingress-frontend.yaml

@@ -0,0 +1,46 @@
+{{- if .Values.ingressFrontend.enabled -}}
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: {{ include "chart.fullname" . }}-frontend
+  labels:
+    {{- include "chart.labels" . | nindent 4 }}
+  {{- with .Values.ingressFrontend.annotations }}
+  annotations:
+    {{- toYaml . | nindent 4 }}
+  {{- end }}
+spec:
+  {{- with .Values.ingressFrontend.className }}
+  ingressClassName: {{ . }}
+  {{- end }}
+  {{- if .Values.ingressFrontend.tls }}
+  tls:
+    {{- range .Values.ingressFrontend.tls }}
+    - hosts:
+        {{- range .hosts }}
+        - {{ . | quote }}
+        {{- end }}
+      secretName: {{ .secretName }}
+    {{- end }}
+  {{- end }}
+  rules:
+    {{- range .Values.ingressFrontend.hosts }}
+    -
+      {{- with .host }}
+      host: {{ . | quote }}
+      {{- end }}
+      http:
+        paths:
+          {{- range .paths }}
+          - path: {{ .path }}
+            {{- with .pathType }}
+            pathType: {{ . }}
+            {{- end }}
+            backend:
+              service:
+                name: {{ include "chart.componentFullname" (dict "root" $ "name" .component) }}
+                port:
+                  number: {{ index $.Values.components .component "service" "port" }}
+          {{- end }}
+    {{- end }}
+{{- end }}

+ 50 - 51
sk-aex/values.yaml

@@ -51,7 +51,7 @@ components:
     replicaCount: 1
     # This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
     image:
-      repository: public.ecr.aws/u3l9g3l8/test/aex_ft
+      repository: 406005162200.dkr.ecr.ap-northeast-2.amazonaws.com/aex/ft
       # This sets the pull policy for images.
       pullPolicy: IfNotPresent
       # Overrides the image tag whose default is the chart appVersion.
@@ -120,7 +120,7 @@ components:
   backend:
     replicaCount: 1
     image:
-      repository: public.ecr.aws/u3l9g3l8/test/aex_bn
+      repository: 406005162200.dkr.ecr.ap-northeast-2.amazonaws.com/aex/bn
       pullPolicy: IfNotPresent
       tag: "0.0.0c"
     containerPort: 8000
@@ -181,55 +181,54 @@ components:
 
 # This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
 # AWS Load Balancer Controller provisions an ALB from this resource.
-ingresses:
-  backend:
-    enabled: true
-    className: alb-custom
-    annotations:
-      # alb.ingress.kubernetes.io/scheme: internet-facing
-      alb.ingress.kubernetes.io/group.name: appl
-      alb.ingress.kubernetes.io/load-balancer-name: skinc-inc-lb-dev-test
-      alb.ingress.kubernetes.io/target-type: ip
-      alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}]'
-      alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
-      alb.ingress.kubernetes.io/healthcheck-path: /health
-      alb.ingress.kubernetes.io/healthcheck-port: "8000"
-    hosts:
-      # host를 비우면 ALB가 모든 Host 헤더에 대해 매칭 → ALB DNS로 직접 접속 가능.
-      # 운영 단계에서는 실제 도메인(예: aex.example.com)을 넣고 Route53 ALIAS 등록 권장.
-      - host: ""
-        paths:
-          - path: /api
-            pathType: Prefix
-            component: backend
-    tls: []
-      # - secretName: chart-example-tls
-      #   hosts:
-      #     - chart-example.local
-  frontend:
-    enabled: true
-    className: alb-custom
-    annotations:
-      # alb.ingress.kubernetes.io/scheme: internet-facing
-      alb.ingress.kubernetes.io/group.name: appl
-      alb.ingress.kubernetes.io/load-balancer-name: skinc-inc-lb-dev-test
-      alb.ingress.kubernetes.io/target-type: ip
-      alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}]'
-      alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
-      alb.ingress.kubernetes.io/healthcheck-path: /
-      alb.ingress.kubernetes.io/healthcheck-port: "80"
-    hosts:
-      # host를 비우면 ALB가 모든 Host 헤더에 대해 매칭 → ALB DNS로 직접 접속 가능.
-      # 운영 단계에서는 실제 도메인(예: aex.example.com)을 넣고 Route53 ALIAS 등록 권장.
-      - host: ""
-        paths:
-          - path: /
-            pathType: Prefix
-            component: frontend
-    tls: []
-      # - secretName: chart-example-tls
-      #   hosts:
-      #     - chart-example.local
+ingressBackend:
+  enabled: true
+  className: alb-custom
+  annotations:
+    # alb.ingress.kubernetes.io/scheme: internet-facing
+    alb.ingress.kubernetes.io/group.name: "appl"
+    alb.ingress.kubernetes.io/load-balancer-name: skinc-inc-lb-dev-test-2
+    alb.ingress.kubernetes.io/target-type: "ip"
+    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
+    alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
+    alb.ingress.kubernetes.io/healthcheck-path: /health
+    alb.ingress.kubernetes.io/healthcheck-port: "8000"
+  hosts:
+    # host를 비우면 ALB가 모든 Host 헤더에 대해 매칭 → ALB DNS로 직접 접속 가능.
+    # 운영 단계에서는 실제 도메인(예: aex.example.com)을 넣고 Route53 ALIAS 등록 권장.
+    - host: "aex.dev.skinc.co.kr"
+      paths:
+        - path: /api
+          pathType: Prefix
+          component: backend
+  tls: []
+    # - secretName: chart-example-tls
+    #   hosts:
+    #     - chart-example.local
+ingressFrontend:
+  enabled: true
+  className: alb-custom
+  annotations:
+    # alb.ingress.kubernetes.io/scheme: internet-facing
+    alb.ingress.kubernetes.io/group.name: "appl"
+    alb.ingress.kubernetes.io/load-balancer-name: skinc-inc-lb-dev-test-2
+    alb.ingress.kubernetes.io/target-type: "ip"
+    alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
+    alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
+    alb.ingress.kubernetes.io/healthcheck-path: /
+    alb.ingress.kubernetes.io/healthcheck-port: "80"
+  hosts:
+    # host를 비우면 ALB가 모든 Host 헤더에 대해 매칭 → ALB DNS로 직접 접속 가능.
+    # 운영 단계에서는 실제 도메인(예: aex.example.com)을 넣고 Route53 ALIAS 등록 권장.
+    - host: "aex.dev.skinc.co.kr"
+      paths:
+        - path: /
+          pathType: Prefix
+          component: frontend
+  tls: []
+    # - secretName: chart-example-tls
+    #   hosts:
+    #     - chart-example.local
 
 # -- Expose the services via gateway-api HTTPRoute
 # Disabled — routing is handled by the ALB Ingress above.