Skip to content

Commit 4fab82d

Browse files
authored
Merge pull request #125 from rikatz/add-doc-to-statussubresource
Add documentation comment to statussubresource analyzer
2 parents b566fe8 + bc7fd32 commit 4fab82d

File tree

1 file changed

+12
-0
lines changed
  • pkg/analysis/statussubresource

1 file changed

+12
-0
lines changed

pkg/analysis/statussubresource/doc.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16+
17+
/*
18+
The statussubresource linter ensures that a type marked with
19+
kubebuilder:object:root:=true and containing a status field is marked with
20+
kubebuilder:subresource:status
21+
22+
Status fields should always be considered a subresource for the API, and this
23+
way the linter guarantees that the right marker is added on this field.
24+
25+
The linter will report an issue if the root object has a status field and does
26+
not contain the marker 'kubebuilder:subresource:status'
27+
*/
1628
package statussubresource

0 commit comments

Comments
 (0)