From 018de10f2056c615b299840bddc0a85dc9ea45fe Mon Sep 17 00:00:00 2001 From: bjwswang Date: Mon, 11 Mar 2024 17:35:39 +0800 Subject: [PATCH] fix: add more host aliases Signed-off-by: bjwswang --- charts/u4a-component/Chart.yaml | 2 +- .../resource-view/view-controller-deploy.yaml | 3 +++ charts/u4a-component/values.yaml | 14 ++++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/charts/u4a-component/Chart.yaml b/charts/u4a-component/Chart.yaml index d2046ed..b399719 100644 --- a/charts/u4a-component/Chart.yaml +++ b/charts/u4a-component/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.6 +version: 0.2.7 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/u4a-component/templates/resource-view/view-controller-deploy.yaml b/charts/u4a-component/templates/resource-view/view-controller-deploy.yaml index 5b622b7..e9fe06a 100644 --- a/charts/u4a-component/templates/resource-view/view-controller-deploy.yaml +++ b/charts/u4a-component/templates/resource-view/view-controller-deploy.yaml @@ -126,6 +126,9 @@ spec: labels: resource-view-controller: controller-manager spec: + {{- if .Values.resourceView.hostConfig.enabled }} + hostAliases: {{ toYaml .Values.resourceView.hostConfig.hostAliases | nindent 6 }} + {{- end }} containers: - image: {{ .Values.registryServer }}/{{ .Values.resourceView.image }} env: diff --git a/charts/u4a-component/values.yaml b/charts/u4a-component/values.yaml index 5c15872..a682491 100644 --- a/charts/u4a-component/values.yaml +++ b/charts/u4a-component/values.yaml @@ -88,6 +88,7 @@ oidcServer: hostAliases: - hostnames: - *bffHost + - *hostK8sApiWithOidc ip: # only enable for debug purpose debug: false @@ -111,6 +112,7 @@ bffServer: hostAliases: - hostnames: - *bffHost + - *hostK8sApiWithOidc ip: # Required: the host Kubernetes cluster with OIDC enabled @@ -123,6 +125,14 @@ k8s: resourceView: enabled: true image: kubebb/resource-viewer:v0.2.0 + # Enable and update the ip if nip.io is NOT accessible in deployed environment + hostConfig: + enabled: true + hostAliases: + - hostnames: + - *bffHost + - *hostK8sApiWithOidc + ip: addon-component: enabled: true @@ -151,8 +161,8 @@ addon-component: enabled: true hostAliases: - hostnames: - # MUST update this value - - portal..nip.io + - *bffHost + - *hostK8sApiWithOidc # MUST update this value ip: