-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix policy docs for different scopes for different policies #295
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
==========================================
- Coverage 25.39% 25.31% -0.09%
==========================================
Files 155 156 +1
Lines 13591 13636 +45
==========================================
Hits 3452 3452
- Misses 9982 10027 +45
Partials 157 157
☔ 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.
Thank you @Shubbhang351 for making this change :-)
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.
Run acceptance tests for all updated resources and attach output screenshots.
scope.WithDescription(fmt.Sprintf("Scope for the image policy, having one of the valid scopes: %v.", strings.Join(ScopesAllowed[:], `, `))), | ||
scope.WithScopes(ScopesAllowed[:])) | ||
) | ||
|
||
var imagePolicySchema = map[string]*schema.Schema{ |
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.
nit: Merge the var blocks together
scope.WithDescription(fmt.Sprintf("Scope for the network policy, having one of the valid scopes: %v.", strings.Join(ScopesAllowed[:], `, `))), | ||
scope.WithScopes(ScopesAllowed[:])) | ||
) | ||
|
||
var networkPolicySchema = map[string]*schema.Schema{ |
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.
nit: combine the var together
var ( | ||
ScopesAllowed = [...]string{scope.ClusterKey, scope.ClusterGroupKey, scope.OrganizationKey} | ||
ScopeSchema = scope.GetScopeSchema( | ||
scope.WithDescription(fmt.Sprintf("Scope for the security policy, having one of the valid scopes: %v.", strings.Join(ScopesAllowed[:], `, `))), |
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.
%s instead of %v?
0c63249
to
b38b497
Compare
Signed-off-by: vshubhang <[email protected]>
b30dbab
to
4fed2bc
Compare
Rebased and merge conflicts resolved. |
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.
Error: internal/resources/policy/kind/mutation/resource/resource_mutation_policy.go:41:24: undefined: scope.ScopeSchema
Fix policy docs for different scopes for different policies