Fixup #2970: Add Missing Label app.kubernetes.io/part-of: ingress-nginx
- Add missing label `app.kubernetes.io/part-of: ingress-nginx` for deploy example - Update new labels for docs/deploy and docs/examples - Update new labels for test/e2e and test/manifests - Update new labels for images/nginx Also close #3001
This commit is contained in:
parent
e60cbc4804
commit
6d3e9ea7d0
22 changed files with 131 additions and 53 deletions
|
|
@ -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())
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function on_exit {
|
|||
test $error_code == 0 && return;
|
||||
|
||||
echo "Obtaining ingress controller pod logs..."
|
||||
kubectl logs -l app=ingress-nginx -n $NAMESPACE
|
||||
kubectl logs -l app.kubernetes.io/name=ingress-nginx -n $NAMESPACE
|
||||
}
|
||||
trap on_exit EXIT
|
||||
|
||||
|
|
|
|||
|
|
@ -5,16 +5,19 @@ kind: Deployment
|
|||
metadata:
|
||||
name: default-http-backend
|
||||
labels:
|
||||
app: default-http-backend
|
||||
app.kubernetes.io/name: default-http-backend
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: default-http-backend
|
||||
app.kubernetes.io/name: default-http-backend
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: default-http-backend
|
||||
app.kubernetes.io/name: default-http-backend
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 60
|
||||
containers:
|
||||
|
|
@ -46,13 +49,15 @@ kind: Service
|
|||
metadata:
|
||||
name: default-http-backend
|
||||
labels:
|
||||
app: default-http-backend
|
||||
app.kubernetes.io/name: default-http-backend
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: default-http-backend
|
||||
app.kubernetes.io/name: default-http-backend
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
---
|
||||
|
||||
kind: ConfigMap
|
||||
|
|
@ -60,32 +65,44 @@ apiVersion: v1
|
|||
metadata:
|
||||
name: nginx-configuration
|
||||
labels:
|
||||
app: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
---
|
||||
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: tcp-services
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
---
|
||||
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: udp-services
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: nginx-ingress-serviceaccount
|
||||
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: nginx-ingress-clusterrole
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
|
|
@ -140,6 +157,9 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
|
|||
kind: Role
|
||||
metadata:
|
||||
name: nginx-ingress-role
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
|
|
@ -182,6 +202,9 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
|
|||
kind: RoleBinding
|
||||
metadata:
|
||||
name: nginx-ingress-role-${NAMESPACE}
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
|
|
@ -197,6 +220,9 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
|
|||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: nginx-ingress-clusterrole-${NAMESPACE}
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
|
|
@ -212,15 +238,20 @@ apiVersion: extensions/v1beta1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx-ingress-controller
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
annotations:
|
||||
prometheus.io/port: '10254'
|
||||
prometheus.io/scrape: 'true'
|
||||
|
|
@ -251,6 +282,14 @@ spec:
|
|||
- --publish-service=$(POD_NAMESPACE)/ingress-nginx
|
||||
- --annotations-prefix=nginx.ingress.kubernetes.io
|
||||
- --watch-namespace=${NAMESPACE}
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
add:
|
||||
- NET_BIND_SERVICE
|
||||
# www-data -> 33
|
||||
runAsUser: 33
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
|
|
@ -260,14 +299,6 @@ spec:
|
|||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
add:
|
||||
- NET_BIND_SERVICE
|
||||
# www-data -> 33
|
||||
runAsUser: 33
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
|
|
|
|||
|
|
@ -14,4 +14,5 @@ spec:
|
|||
targetPort: 443
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: ingress-nginx
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/part-of: ingress-nginx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue