Skip to content

Commit

Permalink
build: create resources with k8s recommended labels
Browse files Browse the repository at this point in the history
Adding Recommended Labels on the rook resources,
for better visuals and management of k8s object

Closes: rook#8400
Signed-off-by: parth-gr <paarora@redhat.com>
  • Loading branch information
parth-gr committed Sep 14, 2021
1 parent 235d5a3 commit 63c10c4
Show file tree
Hide file tree
Showing 18 changed files with 81 additions and 81 deletions.
28 changes: 14 additions & 14 deletions cluster/charts/rook-ceph/templates/clusterrole.yaml
Expand Up @@ -4,8 +4,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-system
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
# Most resources are represented by a string representation of their name, such as “pods”, just as it appears in the URL for the relevant API endpoint.
# However, some Kubernetes APIs involve a “subresource”, such as the logs for a pod. [...]
Expand All @@ -24,8 +24,8 @@ kind: ClusterRole
metadata:
name: rook-ceph-cluster-mgmt
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -54,8 +54,8 @@ kind: ClusterRole
metadata:
name: rook-ceph-global
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -174,8 +174,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-mgr-cluster
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -227,8 +227,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-object-bucket
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -272,8 +272,8 @@ kind: ClusterRole
metadata:
name: rook-ceph-agent-mount
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -458,8 +458,8 @@ kind: ClusterRole
metadata:
name: 'psp:rook'
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
rules:
- apiGroups:
Expand Down
20 changes: 10 additions & 10 deletions cluster/charts/rook-ceph/templates/clusterrolebinding.yaml
Expand Up @@ -4,8 +4,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-system
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand All @@ -21,8 +21,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-global
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down Expand Up @@ -120,8 +120,8 @@ kind: ClusterRoleBinding
metadata:
name: rook-ceph-system-psp
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -138,8 +138,8 @@ metadata:
name: rook-ceph-default-psp
namespace: {{ .Release.Namespace }}
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -155,8 +155,8 @@ kind: ClusterRoleBinding
metadata:
name: rook-ceph-system-psp-users
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down
6 changes: 3 additions & 3 deletions cluster/charts/rook-ceph/templates/deployment.yaml
Expand Up @@ -3,8 +3,8 @@ kind: Deployment
metadata:
name: rook-ceph-operator
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
replicas: 1
Expand All @@ -15,7 +15,7 @@ spec:
metadata:
labels:
app: rook-ceph-operator
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
app.kubernetes.io/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- if .Values.annotations }}
annotations:
{{ toYaml .Values.annotations | indent 8 }}
Expand Down
4 changes: 2 additions & 2 deletions cluster/charts/rook-ceph/templates/role.yaml
Expand Up @@ -6,8 +6,8 @@ metadata:
name: rook-ceph-system
namespace: {{ .Release.Namespace }}
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down
4 changes: 2 additions & 2 deletions cluster/charts/rook-ceph/templates/rolebinding.yaml
Expand Up @@ -6,8 +6,8 @@ metadata:
name: rook-ceph-system
namespace: {{ .Release.Namespace }}
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down
16 changes: 8 additions & 8 deletions cluster/charts/rook-ceph/templates/serviceaccount.yaml
Expand Up @@ -5,8 +5,8 @@ metadata:
name: rook-ceph-system
namespace: {{ .Release.Namespace }}
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
Expand All @@ -17,8 +17,8 @@ metadata:
name: rook-ceph-osd
namespace: {{ .Release.Namespace }}
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
Expand All @@ -29,8 +29,8 @@ metadata:
name: rook-ceph-mgr
namespace: {{ .Release.Namespace }}
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
Expand All @@ -40,8 +40,8 @@ metadata:
name: rook-ceph-cmd-reporter
namespace: {{ .Release.Namespace }}
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{ template "imagePullSecrets" . }}
---
Expand Down
40 changes: 20 additions & 20 deletions cluster/examples/kubernetes/ceph/common.yaml
Expand Up @@ -38,8 +38,8 @@ kind: ClusterRole
metadata:
name: rook-ceph-cluster-mgmt
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -67,8 +67,8 @@ kind: ClusterRole
metadata:
name: rook-ceph-system
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
# Most resources are represented by a string representation of their name, such as “pods”, just as it appears in the URL for the relevant API endpoint.
# However, some Kubernetes APIs involve a “subresource”, such as the logs for a pod. [...]
Expand All @@ -88,8 +88,8 @@ metadata:
name: rook-ceph-system
namespace: rook-ceph # namespace:operator
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -132,8 +132,8 @@ kind: ClusterRole
metadata:
name: rook-ceph-global
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -252,8 +252,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-mgr-cluster
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -290,8 +290,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-object-bucket
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -324,8 +324,8 @@ metadata:
name: rook-ceph-system
namespace: rook-ceph # namespace:operator
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
# imagePullSecrets:
# - name: my-registry-secret

Expand All @@ -339,8 +339,8 @@ metadata:
name: rook-ceph-system
namespace: rook-ceph # namespace:operator
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand All @@ -355,8 +355,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-system
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand All @@ -372,8 +372,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-global
labels:
operator: rook
storage-backend: ceph
app.kubernetes.io/operator: rook
app.kubernetes.io/storage-backend: ceph
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
Expand Up @@ -17,8 +17,8 @@ metadata:
name: kube-registry
namespace: kube-system
labels:
k8s-app: kube-registry
kubernetes.io/cluster-service: "true"
app.kubernetes.io/k8s-app: kube-registry
app.kubernetes.io/cluster-service: "true"
spec:
replicas: 3
selector:
Expand All @@ -27,8 +27,8 @@ spec:
template:
metadata:
labels:
k8s-app: kube-registry
kubernetes.io/cluster-service: "true"
app.kubernetes.io/k8s-app: kube-registry
app.kubernetes.io/cluster-service: "true"
spec:
containers:
- name: registry
Expand Down
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: rook-ceph # namespace:cluster
labels:
app: rook-ceph-mgr
rook_cluster: rook-ceph # namespace:cluster
app.kubernetes.io/rook_cluster: rook-ceph # namespace:cluster
spec:
ports:
- name: dashboard
Expand Down
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: rook-ceph # namespace:cluster
labels:
app: rook-ceph-mgr
rook_cluster: rook-ceph # namespace:cluster
app.kubernetes.io/rook_cluster: rook-ceph # namespace:cluster
spec:
ports:
- name: dashboard
Expand Down
Expand Up @@ -5,7 +5,7 @@ metadata:
namespace: rook-ceph # namespace:cluster
labels:
app: rook-ceph-mgr
rook_cluster: rook-ceph # namespace:cluster
app.kubernetes.io/rook_cluster: rook-ceph # namespace:cluster
spec:
ports:
- name: dashboard
Expand Down
8 changes: 4 additions & 4 deletions cluster/examples/kubernetes/ceph/flex/kube-registry.yaml
Expand Up @@ -4,8 +4,8 @@ metadata:
name: kube-registry
namespace: kube-system
labels:
k8s-app: kube-registry
kubernetes.io/cluster-service: "true"
app.kubernetes.io/k8s-app: kube-registry
app.kubernetes.io/cluster-service: "true"
spec:
replicas: 3
selector:
Expand All @@ -14,8 +14,8 @@ spec:
template:
metadata:
labels:
k8s-app: kube-registry
kubernetes.io/cluster-service: "true"
app.kubernetes.io/k8s-app: kube-registry
app.kubernetes.io/cluster-service: "true"
spec:
containers:
- name: registry
Expand Down

0 comments on commit 63c10c4

Please sign in to comment.