-
Couldn't load subscription status.
- Fork 68
Operator Spec PackageName #80
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
Conversation
| app.kubernetes.io/created-by: operator-controller | ||
| name: operator-sample | ||
| spec: | ||
| # TODO(user): Add fields here |
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.
Keep the TODO comment for future field adders?
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.
Sure!
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.
Updated
| to remove/update | ||
| packageName: | ||
| maxLength: 48 | ||
| pattern: ^[a-z0-9]+(-[a-z0-9]+)*$ |
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.
Rules out camelCase, but I did see the discussion that this matches all current catalogs.
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.
True, but I think there's a good chance we'll be generating cluster resources with these names, and if that's the case we'd need to restrict camel case anyway
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.
/lgtm
|
/approve |
| // Foo is an example field of Operator. Edit operator_types.go to remove/update | ||
| Foo string `json:"foo,omitempty"` | ||
| //+kubebuilder:validation:MaxLength:=48 | ||
| //+kubebuilder:validation:Pattern:=^[a-z0-9]+(-[a-z0-9]+)*$ |
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.
Should we support a packageName that starts with a number?
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.
hmm, 3scale operator jumps to mind.
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.
Yup, that's exactly why I allowed the numeral in there
|
Any other approval needed? @awgreene ? |
|
Merged. Thank you! |
Addresses Issue #69
Add package name to spec with validation, clear generated comments, run make, update sample CR
Tested by running: