Skip to content

Commit

Permalink
Merge pull request kubernetes-retired#1571 from marketlogicsoftware/k…
Browse files Browse the repository at this point in the history
…ayrus/fix_default_namespace

Automatic merge from submit-queue

ingress: use POD_NAMESPACE as a namespace in cli parameters

When you deploy ingress not into `default` namespace, ingress RC fails with the `no service with name default/default-http-backend found: services "default-http-backend" not found` error message.

This fix uses `POD_NAMESPACE` which we already pass into the pod ENV.
  • Loading branch information
Kubernetes Submit Queue authored Aug 26, 2016
2 parents 3c3880d + d8fbe2f commit c6a1b82
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -43,5 +43,5 @@ spec:
hostPort: 443
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --nginx-configmap=default/nginx-load-balancer-conf
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --nginx-configmap=$(POD_NAMESPACE)/nginx-load-balancer-conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -43,4 +43,4 @@ spec:
hostPort: 443
args:
- /nginx-ingress-controller
- --default-backend-service=default/nginx-errors
- --default-backend-service=$(POD_NAMESPACE)/nginx-errors
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -43,7 +43,7 @@ spec:
hostPort: 443
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
volumeMounts:
- mountPath: /etc/nginx/template
name: nginx-template-volume
Expand Down
4 changes: 2 additions & 2 deletions controllers/nginx/examples/daemonset/as-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
labels:
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -37,4 +37,4 @@ spec:
hostPort: 443
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
2 changes: 1 addition & 1 deletion controllers/nginx/examples/default-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
labels:
app: default-http-backend
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- name: default-http-backend
# Any image is permissable as long as:
Expand Down
4 changes: 2 additions & 2 deletions controllers/nginx/examples/default/rc-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -43,4 +43,4 @@ spec:
hostPort: 443
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
6 changes: 3 additions & 3 deletions controllers/nginx/examples/full/rc-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
volumes:
- name: dhparam-example
secret:
Expand Down Expand Up @@ -53,5 +53,5 @@ spec:
name: dhparam-example
args:
- /nginx-ingress-controller
- --tcp-services-configmap=default/tcp-configmap-example
- --default-backend-service=default/default-http-backend
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-configmap-example
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
4 changes: 2 additions & 2 deletions controllers/nginx/examples/proxy-protocol/nginx-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ spec:
- containerPort: 443
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --nginx-configmap=default/nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --nginx-configmap=$(POD_NAMESPACE)/nginx-ingress-controller
12 changes: 6 additions & 6 deletions controllers/nginx/examples/sysctl/change-proc-values-rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ spec:
labels:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
spec:
terminationGracePeriodSeconds: 60
containers:
- image: alpine:3.4
name: sysctl-buddy
# using kubectl exec you can check which other parameters is possible to change
# IPC Namespace: kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall,
# kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced and Sysctls
# IPC Namespace: kernel.msgmax, kernel.msgmnb, kernel.msgmni, kernel.sem, kernel.shmall,
# kernel.shmmax, kernel.shmmni, kernel.shm_rmid_forced and Sysctls
# beginning with fs.mqueue.*
# Network Namespace: Sysctls beginning with net.*
#
#
# kubectl <podname> -c sysctl-buddy -- sysctl -A | grep net
command:
- /bin/sh
- -c
- |
while true; do
while true; do
sysctl -w net.core.somaxconn=32768
sysctl -w net.ipv4.ip_local_port_range='1024 65535'
sleep 10
Expand Down Expand Up @@ -120,4 +120,4 @@ spec:
hostPort: 8080
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
6 changes: 3 additions & 3 deletions controllers/nginx/examples/tcp/rc-tcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -47,5 +47,5 @@ spec:
hostPort: 9000
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --tcp-services-configmap=default/tcp-configmap-example
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --tcp-services-configmap=$(POD_NAMESPACE)/tcp-configmap-example
4 changes: 2 additions & 2 deletions controllers/nginx/examples/tls/rc-ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -43,4 +43,4 @@ spec:
hostPort: 443
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
6 changes: 3 additions & 3 deletions controllers/nginx/examples/udp/rc-udp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
k8s-app: nginx-ingress-lb
name: nginx-ingress-lb
spec:
terminationGracePeriodSeconds: 60
terminationGracePeriodSeconds: 60
containers:
- image: gcr.io/google_containers/nginx-ingress-controller:0.8.2
name: nginx-ingress-lb
Expand Down Expand Up @@ -45,5 +45,5 @@ spec:
hostPort: 53
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --udp-services-configmap=default/udp-configmap-example
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --udp-services-configmap=$(POD_NAMESPACE)/udp-configmap-example
2 changes: 1 addition & 1 deletion controllers/nginx/rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ spec:
hostPort: 18080
args:
- /nginx-ingress-controller
- --default-backend-service=default/default-http-backend
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend

0 comments on commit c6a1b82

Please sign in to comment.