File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,29 @@ manifests: controller-gen ensure-yq ## Generate WebhookConfiguration, ClusterRol
113113 if [ -d " ../helm/crds/templates/" ]; then \
114114 cp config/crd/bases/* .yaml ../helm/crds/templates/; \
115115 fi
116+ echo " Adding NVIDIA header to RBAC files"
117+ for file in config/rbac/* .yaml; do \
118+ if [ -f " $$ file" ] && ! head -20 " $$ file" | grep -q " NVIDIA CORPORATION" ; then \
119+ { printf ' %s\n' \
120+ ' # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.' \
121+ ' # SPDX-License-Identifier: Apache-2.0' \
122+ ' #' \
123+ ' # Licensed under the Apache License, Version 2.0 (the "License");' \
124+ ' # you may not use this file except in compliance with the License.' \
125+ ' # You may obtain a copy of the License at' \
126+ ' #' \
127+ ' # http://www.apache.org/licenses/LICENSE-2.0' \
128+ ' #' \
129+ ' # Unless required by applicable law or agreed to in writing, software' \
130+ ' # distributed under the License is distributed on an "AS IS" BASIS,' \
131+ ' # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.' \
132+ ' # See the License for the specific language governing permissions and' \
133+ ' # limitations under the License.' \
134+ ' ' ; \
135+ cat " $$ file" ; \
136+ } > " $$ file.tmp" && mv " $$ file.tmp" " $$ file" ; \
137+ fi ; \
138+ done
116139
117140.PHONY : generate
118141generate : controller-gen # # Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
You can’t perform that action at this time.
0 commit comments