Skip to content
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

Remove no more needed check on reserved keyword for kamelet #1578

Merged
merged 1 commit into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions script/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ import (
)

var (
// Needed until this is fixed: https://issues.apache.org/jira/browse/CAMEL-16788
forbiddenParameterNames = []string{"home", "hostname", "language", "lang", "namespace", "path", "podname", "pod-name", "port", "pwd", "shell", "term"}

paramRegexp = regexp.MustCompile(`{{[?]?([A-Za-z0-9-._]+)(?:[:][^}]*)?}}`)
)

Expand Down Expand Up @@ -270,11 +267,6 @@ func verifyParameters(kamelets []KameletInfo) (errors []error) {
errors = append(errors, fmt.Errorf("kamelet %q does not contain a definition of type \"object\"", kamelet.Name))
}
for k, p := range kamelet.Spec.Definition.Properties {
for _, f := range forbiddenParameterNames {
if strings.EqualFold(k, f) {
errors = append(errors, fmt.Errorf("property name %q is using a reserved keyword in kamelet %q", k, kamelet.Name))
}
}
if p.Type == "" {
errors = append(errors, fmt.Errorf("property %q in kamelet %q does not contain type", k, kamelet.Name))
}
Expand Down