-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: support license #709
Conversation
@arkbriar |
Could you try remove the local |
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.
The kernel uses the term of license_key
and accepts env var of RW_LICENSE_KEY
to initialize the system parameter. Shall we unify the terms here?
type RisingWaveLicense struct { | ||
// SecretName that contains the license. The license must be JWT formatted JSON. | ||
// +optional | ||
SecretName string `json:"secretName,omitempty"` |
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.
Mark it a required field.
SecretName string `json:"secretName,omitempty"` | |
SecretName string `json:"secretName"` |
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.
Please also clarify the secret key that will be used.
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.
Mark it a required field.
Can you explain the motivation? I learned from
SecretName string `json:"secretName,omitempty"` |
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.
It probably makes the semantic more clear. The example you quoted seems untuned 😄
Currently,
# valid but has no effect
spec:
license:
secretName: ""
# valid and effective
spec:
license:
secretName: "abc"
# valid and won't be misunderstood
spec:
# no license field
After change, the k8s API service will reject
# no longer valid
spec:
license:
secretName: ""
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.
Either LGTM, but I'd like to keep it consistent with TLS config (RisingWaveTLSConfiguration
). Do you think we need to change it as well?
|
||
package v1alpha1 | ||
|
||
const RisingWaveLicenseLicenseSecretKey = "licenseKey" |
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.
const RisingWaveLicenseLicenseSecretKey = "licenseKey" | |
const RisingWaveLicenseKeySecretKey = "licenseKey" |
? 🤔
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #709 +/- ##
==========================================
+ Coverage 55.01% 55.03% +0.01%
==========================================
Files 40 40
Lines 6645 6679 +34
==========================================
+ Hits 3656 3676 +20
- Misses 2864 2877 +13
- Partials 125 126 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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!
What's changed and what's your intention?
To use a license, users need to
license
.license.secretName
to the secret nameChecklist
Refer to a related PR or issue link (optional)