Skip to content

Commit

Permalink
Merge pull request #3035 from alvistack/2970-fixup
Browse files Browse the repository at this point in the history
Fixup #2970: Add Missing Label `app.kubernetes.io/part-of: ingress-nginx`
  • Loading branch information
k8s-ci-robot authored Sep 5, 2018
2 parents e60cbc4 + 6d3e9ea commit d0acf91
Show file tree
Hide file tree
Showing 22 changed files with 131 additions and 53 deletions.
2 changes: 1 addition & 1 deletion build/dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ echo "updating image..."
kubectl set image \
deployments \
--namespace ingress-nginx \
--selector app=ingress-nginx \
--selector app.kubernetes.io/name=ingress-nginx \
nginx-ingress-controller=${DEV_IMAGE}
3 changes: 3 additions & 0 deletions deploy/default-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: default-http-backend
app.kubernetes.io/part-of: ingress-nginx
template:
metadata:
labels:
app.kubernetes.io/name: default-http-backend
app.kubernetes.io/part-of: ingress-nginx
spec:
terminationGracePeriodSeconds: 60
containers:
Expand Down Expand Up @@ -57,3 +59,4 @@ spec:
targetPort: 8080
selector:
app.kubernetes.io/name: default-http-backend
app.kubernetes.io/part-of: ingress-nginx
4 changes: 4 additions & 0 deletions deploy/mandatory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: default-http-backend
app.kubernetes.io/part-of: ingress-nginx
template:
metadata:
labels:
Expand Down Expand Up @@ -64,6 +65,7 @@ spec:
targetPort: 8080
selector:
app.kubernetes.io/name: default-http-backend
app.kubernetes.io/part-of: ingress-nginx
---

kind: ConfigMap
Expand Down Expand Up @@ -259,10 +261,12 @@ spec:
selector:
matchLabels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
template:
metadata:
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
annotations:
prometheus.io/port: '10254'
prometheus.io/scrape: 'true'
Expand Down
1 change: 1 addition & 0 deletions deploy/provider/aws/service-l4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
type: LoadBalancer
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
ports:
- name: http
port: 80
Expand Down
1 change: 1 addition & 0 deletions deploy/provider/aws/service-l7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
type: LoadBalancer
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
ports:
- name: http
port: 80
Expand Down
1 change: 1 addition & 0 deletions deploy/provider/aws/service-nlb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
type: LoadBalancer
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
ports:
- name: http
port: 80
Expand Down
2 changes: 1 addition & 1 deletion deploy/provider/baremetal/service-nodeport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ metadata:
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx

spec:
type: NodePort
ports:
Expand All @@ -20,3 +19,4 @@ spec:
protocol: TCP
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
1 change: 1 addition & 0 deletions deploy/provider/cloud-generic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ spec:
type: LoadBalancer
selector:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
ports:
- name: http
port: 80
Expand Down
6 changes: 3 additions & 3 deletions docs/deploy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/mast
To check if the ingress controller pods have started, run the following command:

```console
kubectl get pods --all-namespaces -l app=ingress-nginx --watch
kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx --watch
```

Once the operator pods are running, you can cancel the above command by typing `Ctrl+C`.
Expand All @@ -153,7 +153,7 @@ To detect which version of the ingress controller is running, exec into the pod

```console
POD_NAMESPACE=ingress-nginx
POD_NAME=$(kubectl get pods -n $POD_NAMESPACE -l app=ingress-nginx -o jsonpath='{.items[0].metadata.name}')
POD_NAME=$(kubectl get pods -n $POD_NAMESPACE -l app.kubernetes.io/name=ingress-nginx -o jsonpath='{.items[0].metadata.name}')
kubectl exec -it $POD_NAME -n $POD_NAMESPACE -- /nginx-ingress-controller --version
```

Expand All @@ -175,7 +175,7 @@ helm install stable/nginx-ingress --name my-nginx --set rbac.create=true
Detect installed version:

```console
POD_NAME=$(kubectl get pods -l app=nginx-ingress -o jsonpath='{.items[0].metadata.name}')
POD_NAME=$(kubectl get pods -l app.kubernetes.io/name=ingress-nginx -o jsonpath='{.items[0].metadata.name}')
kubectl exec -it $POD_NAME -- /nginx-ingress-controller --version
```

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
data:
proxy-connect-timeout: "10"
proxy-read-timeout: "120"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ kind: Service
metadata:
name: nginx-errors
labels:
app: nginx-errors
app.kubernetes.io/name: nginx-errors
app.kubernetes.io/part-of: ingress-nginx
spec:
selector:
app: nginx-errors
app.kubernetes.io/name: nginx-errors
app.kubernetes.io/part-of: ingress-nginx
ports:
- port: 80
targetPort: 8080
Expand All @@ -18,15 +20,20 @@ kind: Deployment
apiVersion: apps/v1beta2
metadata:
name: nginx-errors
labels:
app.kubernetes.io/name: nginx-errors
app.kubernetes.io/part-of: ingress-nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx-errors
app.kubernetes.io/name: nginx-errors
app.kubernetes.io/part-of: ingress-nginx
template:
metadata:
labels:
app: nginx-errors
app.kubernetes.io/name: nginx-errors
app.kubernetes.io/part-of: ingress-nginx
spec:
containers:
- name: nginx-error-server
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/customization/custom-headers/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
6 changes: 4 additions & 2 deletions docs/examples/customization/ssl-dh-param/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
```

```console
Expand All @@ -40,7 +41,8 @@ metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
```

```console
Expand Down
3 changes: 2 additions & 1 deletion docs/examples/customization/ssl-dh-param/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
26 changes: 19 additions & 7 deletions docs/examples/multi-tls/multi-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,32 @@ kind: Service
metadata:
name: nginx
labels:
app: nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
selector:
app: nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
---
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
replicas: 1
template:
metadata:
labels:
app: nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
containers:
- name: nginx
Expand All @@ -35,26 +41,32 @@ kind: Service
metadata:
name: http-svc
labels:
app: http-svc
app.kubernetes.io/name: http-svc
app.kubernetes.io/part-of: ingress-nginx
spec:
ports:
- port: 80
targetPort: 8080
protocol: TCP
name: http
selector:
app: http-svc
app.kubernetes.io/name: http-svc
app.kubernetes.io/part-of: ingress-nginx
---
apiVersion: v1
kind: ReplicationController
metadata:
name: http-svc
labels:
app.kubernetes.io/name: http-svc
app.kubernetes.io/part-of: ingress-nginx
spec:
replicas: 1
template:
metadata:
labels:
app: http-svc
app.kubernetes.io/name: http-svc
app.kubernetes.io/part-of: ingress-nginx
spec:
containers:
- name: http-svc
Expand Down Expand Up @@ -113,4 +125,4 @@ spec:
- backend:
serviceName: nginx
servicePort: 80
path: /
path: /
9 changes: 6 additions & 3 deletions docs/examples/static-ip/nginx-ingress-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ kind: Deployment
metadata:
name: nginx-ingress-controller
labels:
k8s-app: nginx-ingress-controller
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
replicas: 1
selector:
matchLabels:
k8s-app: nginx-ingress-controller
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
template:
metadata:
labels:
k8s-app: nginx-ingress-controller
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
# hostNetwork makes it possible to use ipv6 and to preserve the source IP correctly regardless of docker configuration
# however, it is not a hard dependency of the nginx-ingress-controller itself and it may cause issues if port 10254 already is taken on the host
Expand Down
7 changes: 4 additions & 3 deletions docs/examples/static-ip/static-ip-svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ kind: Service
metadata:
name: nginx-ingress-lb
labels:
app: nginx-ingress-lb
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
externalTrafficPolicy: Local
type: LoadBalancer
Expand All @@ -18,5 +19,5 @@ spec:
targetPort: 443
selector:
# Selects nginx-ingress-controller pods
k8s-app: nginx-ingress-controller

app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
15 changes: 11 additions & 4 deletions images/nginx/rc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ kind: Service
metadata:
name: nginxsvc
labels:
app: nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
type: NodePort
ports:
Expand All @@ -14,20 +15,26 @@ spec:
protocol: TCP
name: https
selector:
app: nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
---
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
replicas: 1
selector:
app: nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
template:
metadata:
labels:
app: nginx
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
spec:
containers:
- name: nginx
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (f *Framework) BeforeEach() {
Expect(err).NotTo(HaveOccurred())

err = WaitForPodsReady(f.KubeClientSet, 5*time.Minute, 1, f.IngressController.Namespace, metav1.ListOptions{
LabelSelector: "app=ingress-nginx",
LabelSelector: "app.kubernetes.io/name=ingress-nginx",
})
Expect(err).NotTo(HaveOccurred())

Expand Down Expand Up @@ -200,7 +200,7 @@ func (f *Framework) WaitForNginxConfiguration(matcher func(cfg string) bool) err
// NginxLogs returns the logs of the nginx ingress controller pod running
func (f *Framework) NginxLogs() (string, error) {
l, err := f.KubeClientSet.CoreV1().Pods(f.IngressController.Namespace).List(metav1.ListOptions{
LabelSelector: "app=ingress-nginx",
LabelSelector: "app.kubernetes.io/name=ingress-nginx",
})
if err != nil {
return "", err
Expand All @@ -220,7 +220,7 @@ func (f *Framework) NginxLogs() (string, error) {
func (f *Framework) matchNginxConditions(name string, matcher func(cfg string) bool) wait.ConditionFunc {
return func() (bool, error) {
l, err := f.KubeClientSet.CoreV1().Pods(f.IngressController.Namespace).List(metav1.ListOptions{
LabelSelector: "app=ingress-nginx",
LabelSelector: "app.kubernetes.io/name=ingress-nginx",
})
if err != nil {
return false, err
Expand Down
Loading

0 comments on commit d0acf91

Please sign in to comment.