- 
                Notifications
    You must be signed in to change notification settings 
- Fork 99
Add support for additional license fields in template context #5420
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -44,6 +44,8 @@ | |
| return strconv.FormatBool(ctx.License.Spec.IsSnapshotSupported) | ||
| case "IsDisasterRecoverySupported": | ||
| return strconv.FormatBool(ctx.License.Spec.IsDisasterRecoverySupported) | ||
| case "isDisasterRecoverySupported": | ||
| return strconv.FormatBool(ctx.License.Spec.IsDisasterRecoverySupported) | ||
| case "isGitOpsSupported": | ||
| return strconv.FormatBool(ctx.License.Spec.IsGitOpsSupported) | ||
| case "isSupportBundleUploadSupported": | ||
|  | @@ -76,6 +78,10 @@ | |
| return util.ReplicatedAppEndpoint(ctx.License) | ||
| case "licenseID", "licenseId": | ||
| return ctx.License.Spec.LicenseID | ||
| case "isKotsInstallEnabled": | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh interesting, do I go ahead and add it in there? The field is currently on our license.yamls. | ||
| return strconv.FormatBool(ctx.License.Spec.IsKotsInstallEnabled) | ||
| Check failure on line 82 in pkg/template/license_context.go 
     | ||
| case "isEmbeddedClusterDownloadEnabled": | ||
| return strconv.FormatBool(ctx.License.Spec.IsEmbeddedClusterDownloadEnabled) | ||
| default: | ||
| entitlement, ok := ctx.License.Spec.Entitlements[name] | ||
| if ok { | ||
|  | ||
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.
looks like a duplicate of what's above?
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.
Specifically this is a normal camelCase option, leaving the other one there for backwards compatibility in case users are currently using the
Isvsis