-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat: add kal maxlength #7895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add kal maxlength #7895
Conversation
Signed-off-by: Hélia Barroso <helia_barroso@hotmail.com>
7d3b0bc to
f2f4608
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting limits is going to be a hard call. We should probably err on the safe side and set exceptions when unsure (though I don't know how we can tell KAL to exclude only one linter vs. all).
| // Each Secret is added to the StatefulSet definition as a volume named `secret-<secret-name>`. | ||
| // The Secrets are mounted into `/etc/alertmanager/secrets/<secret-name>` in the 'alertmanager' container. | ||
| // +kubebuilder:validation:MaxItems=50 | ||
| // +kubebuilder:validation:items:MaxLength=253 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that secret names can't exceed 63 chars. For the max number of secrets, I'm not sure what a reasonable limit would be TBH.
| // Each ConfigMap is added to the StatefulSet definition as a volume named `configmap-<configmap-name>`. | ||
| // The ConfigMaps are mounted into `/etc/alertmanager/configmaps/<configmap-name>` in the 'alertmanager' container. | ||
| // +kubebuilder:validation:MaxItems=50 | ||
| // +kubebuilder:validation:items:MaxLength=253 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| Host string `json:"host"` | ||
| // Defines the host's port, it can be a literal port number or a port name. | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be more than 5.
Description
From issue #7870, add https://github.com/kubernetes-sigs/kube-api-linter/blob/main/docs/linters.md#maxlength
CHANGE(fix or feature that would cause existing functionality to not work as expected)FEATURE(non-breaking change which adds functionality)BUGFIX(non-breaking change which fixes an issue)ENHANCEMENT(non-breaking change which improves existing functionality)NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Verification
Please check the Prometheus-Operator testing guidelines for recommendations about automated tests.
Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.