|
6 | 6 | import java.nio.file.Files; |
7 | 7 | import java.nio.file.Path; |
8 | 8 |
|
| 9 | +import kr.co.mcmp.softwarecatalog.application.model.HelmChart; |
9 | 10 | import org.springframework.stereotype.Service; |
10 | 11 |
|
11 | 12 | import com.marcnuri.helm.Release; |
@@ -327,9 +328,9 @@ public Release deployHelmChartWithRequest(KubernetesClient client, String namesp |
327 | 328 | ensureIngressController(namespace, tempKubeconfigPath); |
328 | 329 |
|
329 | 330 | values.put("ingress.enabled", "true"); |
330 | | - values.put("ingress.host", config.getIngressHost()); |
| 331 | + values.put("ingress.hosts[0]", config.getIngressHost()); |
331 | 332 | values.put("ingress.path", config.getIngressPath()); |
332 | | - values.put("ingress.className", config.getIngressClass()); |
| 333 | + values.put("ingress.ingressClassName", config.getIngressClass()); |
333 | 334 |
|
334 | 335 | // TLS 설정 |
335 | 336 | if (config.isTlsEnabled()) { |
@@ -619,19 +620,17 @@ private void installIngressControllerWithHelm(String namespace, Path tempKubecon |
619 | 620 |
|
620 | 621 | // Values 맵 구성 |
621 | 622 | java.util.Map<String, String> values = new java.util.HashMap<>(); |
622 | | - values.put("controller.service.type", "LoadBalancer"); |
623 | | - values.put("controller.service.ports.http", "80"); |
624 | | - values.put("controller.service.ports.https", "443"); |
625 | | - values.put("controller.ingressClassResource.name", "nginx"); |
626 | | - values.put("controller.ingressClassResource.controllerValue", "k8s.io/ingress-nginx"); |
627 | | - values.put("controller.ingressClass", "nginx"); |
628 | | - values.put("controller.ingressClassByName", "true"); |
629 | | - values.put("controller.watchIngressWithoutClass", "true"); |
630 | | - values.put("controller.ingressClassResource.enabled", "true"); |
631 | | - values.put("controller.ingressClassResource.default", "true"); |
632 | | - |
| 623 | + values.put("controller.service.type", "NodePort"); |
| 624 | + values.put("controller.service.nodePorts.http", "30880"); |
| 625 | + |
| 626 | + // Helm CLI로 repository 추가 |
| 627 | + kr.co.mcmp.softwarecatalog.application.model.HelmChart ingressHelmChart = new HelmChart(); |
| 628 | + ingressHelmChart.setChartRepositoryUrl("https://kubernetes.github.io/ingress-nginx"); |
| 629 | + ingressHelmChart.setRepositoryName("ingress-nginx"); |
| 630 | + addHelmRepository(ingressHelmChart); |
| 631 | + |
633 | 632 | // Helm CLI로 설치 실행 |
634 | | - runHelmInstallCli(releaseName, "ingress-nginx/ingress-nginx", namespace, "latest", tempKubeconfigPath, values); |
| 633 | + runHelmInstallCli(releaseName, "ingress-nginx/ingress-nginx", namespace, "4.14.0", tempKubeconfigPath, values); |
635 | 634 |
|
636 | 635 | // 간단한 Release 스텁 반환 - null 반환으로 변경 |
637 | 636 | Release result = null; |
@@ -822,8 +821,8 @@ private void runHelmUninstallCli(String releaseName, String namespace, Path kube |
822 | 821 |
|
823 | 822 | private String runHelmListCli(String namespace, Path kubeconfig) throws Exception { |
824 | 823 | java.util.List<String> cmd = new java.util.ArrayList<>(); |
825 | | - cmd.add("helm"); cmd.add("list"); |
826 | | - cmd.add("--namespace"); cmd.add(namespace); |
| 824 | + cmd.add(getHelmPath()); cmd.add("list"); |
| 825 | + cmd.add("--namespace"); cmd.add("default"); |
827 | 826 | if (kubeconfig != null) { |
828 | 827 | cmd.add("--kubeconfig"); cmd.add(kubeconfig.toString()); |
829 | 828 | } |
|
0 commit comments