-
Notifications
You must be signed in to change notification settings - Fork 476
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
Remove configuration constraint for k8s_psat #5216
Changes from 1 commit
82249d9
1acda0b
d4d70ad
36113e8
dcd9d16
dc96106
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 |
---|---|---|
|
@@ -215,6 +215,7 @@ func (p *AttestorPlugin) Attest(stream nodeattestorv1.NodeAttestor_AttestServer) | |
|
||
func (p *AttestorPlugin) Configure(_ context.Context, req *configv1.ConfigureRequest) (*configv1.ConfigureResponse, error) { | ||
hclConfig := new(AttestorConfig) | ||
|
||
if err := hcl.Decode(hclConfig, req.HclConfiguration); err != nil { | ||
return nil, status.Errorf(codes.InvalidArgument, "unable to decode configuration: %v", err) | ||
} | ||
|
@@ -225,10 +226,6 @@ func (p *AttestorPlugin) Configure(_ context.Context, req *configv1.ConfigureReq | |
return nil, status.Error(codes.InvalidArgument, "core configuration missing trust domain") | ||
} | ||
|
||
if len(hclConfig.Clusters) == 0 { | ||
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. Not having any clusters defined would be a misconfiguration for (most?) users that aren't dynamically adjusting the list. To aid debuggability, can you change this to emit a warning log instead? The warning log should be emitted down below, just before the call to p.setConfig, so that we only emit the warning when the configuration is actually going to change. 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. A WARNING log message is appropriate. Expect an update today. |
||
return nil, status.Error(codes.InvalidArgument, "configuration must have at least one cluster") | ||
} | ||
|
||
config := &attestorConfig{ | ||
trustDomain: req.CoreConfiguration.TrustDomain, | ||
clusters: make(map[string]*clusterConfig), | ||
|
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.
This renders as a separate row in the markdown and looks a little funny. I feel like we should just add this to the end of the sentence in the description 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.
Altered to be a warning note in the next push.