From ce211df48cc59dfe933eb7a1b1415591b0e9f7fa Mon Sep 17 00:00:00 2001 From: Offending Commit Date: Wed, 3 Jun 2026 11:16:23 -0500 Subject: [PATCH] feat(helm): add NOTES.txt with access instructions and NetworkPolicy/Ingress warning --- charts/openconcho/templates/NOTES.txt | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 charts/openconcho/templates/NOTES.txt diff --git a/charts/openconcho/templates/NOTES.txt b/charts/openconcho/templates/NOTES.txt new file mode 100644 index 0000000..7cc7ea7 --- /dev/null +++ b/charts/openconcho/templates/NOTES.txt @@ -0,0 +1,40 @@ +OpenConcho {{ .Chart.AppVersion }} deployed to namespace {{ .Release.Namespace }}. + +{{- if .Values.ingress.enabled }} +Access: +{{- range .Values.ingress.hosts }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }} +{{- end }} +{{- else if eq .Values.service.type "NodePort" }} +Access (NodePort): + export NODE_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openconcho.fullname" . }} -o jsonpath="{.spec.ports[0].nodePort}") + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo "http://$NODE_IP:$NODE_PORT" +{{- else if eq .Values.service.type "LoadBalancer" }} +Access (LoadBalancer — IP may take a few minutes): + export LB_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "openconcho.fullname" . }} --template '{{ "{{" }}range (index .status.loadBalancer.ingress 0){{ "}}" }}{{ "{{" }}.{{ "}}" }}{{ "{{" }}end{{ "}}" }}') + echo "http://$LB_IP:{{ .Values.service.port }}" +{{- else }} +Access (port-forward): + kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "openconcho.fullname" . }} 8080:{{ .Values.service.port }} + Then open http://localhost:8080 +{{- end }} + +Run Helm tests to verify the deployment: + helm test {{ .Release.Name }} + +{{- if and .Values.networkPolicy.enabled .Values.ingress.enabled }} + +WARNING: NetworkPolicy + Ingress are both enabled. +The default NetworkPolicy allows port {{ .Values.service.containerPort }} only from pods within +namespace {{ .Release.Namespace }}. Ingress controllers typically run in a separate +namespace (ingress-nginx, kube-system, etc.) and will be blocked. +To allow ingress-controller traffic, add a namespaceSelector rule: + + kubectl edit networkpolicy --namespace {{ .Release.Namespace }} {{ include "openconcho.fullname" . }} + + # Under spec.ingress[0].from, add: + - namespaceSelector: + matchLabels: + kubernetes.io/metadata.name: +{{- end }}