Open dlouzan opened 2 years ago
Hi @dlouzan ๐
You're right that the manifests themselves won't have the namespace specified but regardless of that if you specify the --namespace
flag in the helm invocation (just as you've done in the linked snippet) those objects will land in the designated namespace on the cluster.
Please let us know if that works for you
@pmalek Since the resources do not add the namespace to their definitions, they will end up in whatever the default namespace is, which does not have to match what is passed in the helm
invocation. In an invocation where multiple resources in (possibly) different namespaces are involved e.g. with kustomize, this is an issue. ๐
Hm perhaps this might be an issue with kustomize (not sure, haven't checked it) but to illustrate my testing method you can see (and try it yourself) that those test objects indeed land in the designated namespace event though there's a different default namespace set for context that's being used:
$ k config get-contexts kind-kong
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* kind-kong kind-kong kind-kong kong4
$ helm install --create-namespace --namespace kong3 kong-test1 --values ./charts/kong/values.yaml ./charts/kong
NAME: kong-test1
LAST DEPLOYED: Thu Jun 23 12:34:53 2022
NAMESPACE: kong3
STATUS: deployed
REVISION: 1
NOTES:
To connect to Kong, please execute the following commands:
HOST=$(kubectl get svc --namespace kong3 kong-test1-kong-proxy -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
PORT=$(kubectl get svc --namespace kong3 kong-test1-kong-proxy -o jsonpath='{.spec.ports[0].port}')
export PROXY_IP=${HOST}:${PORT}
curl $PROXY_IP
Once installed, please follow along the getting started guide to start using
Kong: https://docs.konghq.com/kubernetes-ingress-controller/latest/guides/getting-started/
$ k get pods -A | grep kong
kong3 kong-test1-httpbin 0/1 CrashLoopBackOff 1 (10s ago) 14s
kong3 kong-test1-kong-c6447d86c-bggjj 1/2 CrashLoopBackOff 1 (12s ago) 14s
Hello, this might be a misconfiguration on my end, though I have tried multiple configuration options to no avail. Anytime I deploy the helm chart, I get some test jobs on the default namespace, even though I want and set this to be on a fixed
kong
namespace (the default namespace is also used, but for other tasks):Sample
values.yml
:Sample CLI call:
In the output, everything is namespaced except these three pods:
This is kind-of related to https://github.com/Kong/charts/pull/599, but in principle I'd like to keep the tests, just that they should respect the namespace setting ๐
It is not a huge issue, it just contaminates a bit the default namespace, since I wanted to keep everything ingress-related into the
kong
namespace.Thanks for the awesome work!