Skip to content

Commit

Permalink
core: create rook resources with k8s recommended labels
Browse files Browse the repository at this point in the history
Adding Recommended Labels on the resources created by rook
and using Recommended Labels in the helm chart,
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 Dec 2, 2021
1 parent 4ec496d commit 5e520f8
Show file tree
Hide file tree
Showing 29 changed files with 623 additions and 423 deletions.
4 changes: 3 additions & 1 deletion build/rbac/keep-rbac-yaml.sh
Expand Up @@ -27,7 +27,9 @@ $YQ eval '
select(.kind == "Role"),
select(.kind == "RoleBinding")
' - | # select all RBAC resource Kinds
$YQ eval 'del(.metadata.labels.chart)' - | # remove the 'chart' label that only applies to Helm-managed resources
# $YQ eval 'del(.metadata.labels.helm.sh/chart)' - | # remove the 'chart' label that only applies to Helm-managed resources
# $YQ eval 'del(.metadata.labels.app.kubernetes.io/managed-by)' - | # remove the 'labels.app.kubernetes.io/managed-by' label that only applies to Helm-managed resources
# $YQ eval 'del(.metadata.labels.app.kubernetes.io/created-by)' - | # remove the 'app.kubernetes.io/created-by' label that only applies to Helm-managed resources
sed '/^$/d' | # remove empty lines caused by yq's display of header/footer comments
sed '/^# Source: /d' | # helm adds '# Source: <file>' comments atop of each yaml doc. Strip these
$YQ eval --split-exp '.kind + " " + .metadata.name + " "' - # split into files by <kind> <name> .yaml
Expand Down

0 comments on commit 5e520f8

Please sign in to comment.