-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
📖 Adds a cluster controller document #1390
Conversation
|
||
| secret name | field name | content | | ||
|:---:|:---:|:---:| | ||
|`<cluster-name>-kubeconfig`|none required|none required| |
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 filed name should be value
and the content should be a base64 encoded kubeconfig
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.
Do you think it's worth adding that check to ClusterReconciler.reconcileKubeconfig
Or do you think it's enough to look for a properly named secret? Right now that function is only checking for the existence of the secret.
But yes, this is the expected value, I'll definitely add these changes, thanks
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 should definitely error today if the value isn't found, I can dig up the code later
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 only checks for the existence of the secret, not the contents.
cluster-api/controllers/cluster_controller_phases.go
Lines 181 to 188 in 2c4cbfa
_, err := secret.Get(r.Client, cluster, secret.Kubeconfig) | |
switch { | |
case apierrors.IsNotFound(err): | |
return kubeconfig.CreateSecret(ctx, r.Client, cluster) | |
case err != nil: | |
return errors.Wrapf(err, "failed to retrieve Kubeconfig Secret for Cluster %q in namespace %q", cluster.Name, cluster.Namespace) | |
} | |
return nil |
f609a2f
to
97a775d
Compare
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.
/approve
/assign @detiber
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chuckha, vincepri The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
* `ready` - a boolean field that is true when the infrastructure is ready to be used. | ||
* `apiEndpoints` - a slice of strings that identifies each control plane node's apiserver endpoint or a slice with only | ||
one endpoint that is a load balancer for all control plane nodes. |
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.
Should ErrorMessage
and ErrorReason
also be listed here?
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.
Ah indeed it should
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.
Upon further inspection these are not required, but I will add another section outlining how these are used.
97a775d
to
88fcf95
Compare
Signed-off-by: Chuck Ha <chuckh@vmware.com>
88fcf95
to
fa96a1d
Compare
/lgtm I think we can iterate on any additional changes after merge. |
Signed-off-by: Chuck Ha chuckh@vmware.com
What this PR does / why we need it:
This PR adds some formalization around what the cluster controller is responsible for and the contracts it defines within its code.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Related to #1370