diff --git a/deploy/dev/deploy-ingress-nginx.yaml b/deploy/dev/deploy-ingress-nginx.yaml new file mode 100644 index 0000000..343244f --- /dev/null +++ b/deploy/dev/deploy-ingress-nginx.yaml @@ -0,0 +1,4 @@ +--- +- op: replace + path: /spec/template/spec/containers/0/args/1 + value: "--publish-service=$(POD_NAMESPACE)/dev-ingress-nginx-controller" diff --git a/deploy/dev/kustomization.yaml b/deploy/dev/kustomization.yaml index 381341c..d83b97f 100644 --- a/deploy/dev/kustomization.yaml +++ b/deploy/dev/kustomization.yaml @@ -1,3 +1,11 @@ +--- namePrefix: dev- resources: - ../base +patchesJson6902: +# Patch the ingress-nginx deployment to allow it to use a service with a +# namePrefix. See https://github.com/kubernetes/ingress-nginx/issues/2599#issuecomment-601170289. +- target: + kind: Deployment + name: ingress-nginx-controller + path: deploy-ingress-nginx.yaml diff --git a/deploy/prod/deploy-ingress-nginx.yaml b/deploy/prod/deploy-ingress-nginx.yaml new file mode 100644 index 0000000..55eb2e7 --- /dev/null +++ b/deploy/prod/deploy-ingress-nginx.yaml @@ -0,0 +1,4 @@ +--- +- op: replace + path: /spec/template/spec/containers/0/args/1 + value: "--publish-service=$(POD_NAMESPACE)/prod-ingress-nginx-controller" diff --git a/deploy/prod/kustomization.yaml b/deploy/prod/kustomization.yaml index 65bb47d..13f96d2 100644 --- a/deploy/prod/kustomization.yaml +++ b/deploy/prod/kustomization.yaml @@ -1,3 +1,10 @@ namePrefix: prod- resources: - ../base +patchesJson6902: +# Patch the ingress-nginx deployment to allow it to use a service with a +# namePrefix. See https://github.com/kubernetes/ingress-nginx/issues/2599#issuecomment-601170289. +- target: + kind: Deployment + name: ingress-nginx-controller + path: deploy-ingress-nginx.yaml