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

Add license restrictions #1382

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Add license restrictions #1382

merged 1 commit into from
Jan 13, 2025

Conversation

tamalsaha
Copy link
Member

No description provided.

kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Jan 13, 2025
Comment on lines 19 to 25
type LicenseConstraints map[string]Restrictions

type Restrictions struct {
Constraint string `json:"constraint"`
// +optional
Distributions []string `json:"distributions,omitempty"`
}
Copy link
Member

@ArnobKumarSaha ArnobKumarSaha Jan 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about ..

type LicenseRestrictions map[string]Restriction

type Restriction struct {
	Constraint string `json:"constraint"`
	// +optional
	Distributions []string `json:"distributions,omitempty"`
}

LicenseConstraints -> LicenseRestrictions
Restrictions -> Restriction

Not mixing "constraint" & "restriction" stufffs

if err != nil || !ok {
return false, err
}
if !contains(restriction.Distributions, strDistro) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can support disrtibution * here.

kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Jan 13, 2025
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Jan 13, 2025
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Jan 13, 2025
kodiak-appscode[bot]
kodiak-appscode bot previously approved these changes Jan 13, 2025
Signed-off-by: Tamal Saha <[email protected]>
@tamalsaha tamalsaha merged commit ce659b3 into master Jan 13, 2025
3 checks passed
@tamalsaha tamalsaha deleted the lic-cons branch January 13, 2025 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants