Checklists for adding Ingress annotations, VirtualServer/VSR fields, or Helm chart values to NIC. Use when adding new configuration options, new NGINX directives, new annotations, new CRD fields, or new Helm values.
74
91%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Annotations apply ONLY to Ingress objects, never to VirtualServer or VirtualServerRoute.
internal/configs/annotations.go (e.g., MyAnnotation = "nginx.org/my-annotation")ConfigParams in internal/configs/config_params.goparseAnnotations() in internal/configs/annotations.gomasterDenylist / minionDenylist if it should not be on master/miniongenerateNginxCfg() in internal/configs/ingress.gointernal/configs/version1/nginx.ingress.tmpl and internal/configs/version1/nginx-plus.ingress.tmplinternal/k8s/validation.go annotation validation chainsannotations_test.go and ingress_test.gocontainsDangerousChars() for any user-provided string that ends up in NGINX configparseAnnotations() silently ignores unknown annotations -- add the constant firstpkg/apis/configuration/v1/types.go with kubebuilder markersmake update-codegen and make update-crdspkg/apis/configuration/validation/virtualserver.gointernal/configs/version2/http.gointernal/configs/virtualserver.go (GenerateVirtualServerConfig or helper)nginx.virtualserver.tmpl / nginx-plus.virtualserver.tmplmake test-update-snapsjson:"lb-method", json:"fail-timeout")json:"ingressClassName", json:"rewritePath")*int, *bool, *SomeStruct = optional/nullableint, bool = required or zero-value defaultfalse must be non-pointer| Marker | Purpose |
|---|---|
+kubebuilder:validation:Required | Field must be present |
+kubebuilder:validation:Optional | Field is optional |
+kubebuilder:validation:Pattern= `regex` | Regex validation |
+kubebuilder:validation:Minimum=N | Numeric minimum |
+kubebuilder:validation:MinItems=N / MaxItems=N | Array length |
+kubebuilder:validation:MaxLength=N | Max string length |
+kubebuilder:default=value | Default value |
+kubebuilder:validation:XValidation:rule="CEL" | Cross-field CEL validation |
// Prevent wildcard origin with credentials
// +kubebuilder:validation:XValidation:rule="!(self.allowOrigin.exists(origin, origin == '*') && has(self.allowCredentials) && self.allowCredentials == true)",message="..."
// Require time when allowedCodes is set
// +kubebuilder:validation:XValidation:rule="!has(self.allowedCodes) || (has(self.allowedCodes) && has(self.time))",message="..."make update-codegen after changing types.gozz_generated.deepcopy.go manuallyServer block; Version 1 has multiple Server blockscharts/nginx-ingress/values.yaml with ## documentation above the fieldcharts/nginx-ingress/values.schema.jsonnginx-ingress.args in charts/nginx-ingress/templates/_helpers.tplcharts/nginx-ingress/templates/controller-configmap.yaml_helpers.tplcharts/tests/testdata/<feature>.yamlcharts/tests/helmunit_test.gomake test-update-snaps to capture the new snapshotvalues.schema.json alongside values.yamlcharts/tests/helmunit_test.go0eb3072
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.