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

Move info into tc status #433

Merged
merged 9 commits into from
Jul 8, 2024

Conversation

metlos
Copy link
Contributor

@metlos metlos commented Jul 4, 2024

Description

This introduces new fields into the ToolchainCluster status: apiEndpoint and operatorNamespace are introduced into the status because these fields will be read from the kubeconfig contained in the ToolchainCluster secret instead of explicitly being set in the ToolchainCluster's spec.

Checks

  1. Did you run make generate target? yes

  2. Did make generate change anything in other projects (host-operator, member-operator)? yes

  3. In case of new CRD, did you the following? no new CRD

  4. In case other projects are changed, please provides PR links.

the changes after we migrate to kubeconfig-based connections.

Add fields to the ToolchainCluster.Status that will advertise info
from kubeconfig.
Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Looks good 👍

I have only one small comment.

api/v1alpha1/toolchaincluster_types.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mfrancisc mfrancisc left a comment

Choose a reason for hiding this comment

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

Thanks for the additional notes and comments on the fields 👍

api/v1alpha1/toolchaincluster_types.go Show resolved Hide resolved
@@ -34,20 +34,33 @@ const (
type ToolchainClusterSpec struct {
// The API endpoint of the member cluster. This can be a hostname,
// hostname:port, IP or IP:port.
//
// Be aware that this field is going to be replaced with
// the Status.APIEndpoint in the future.
APIEndpoint string `json:"apiEndpoint"`
Copy link
Contributor

Choose a reason for hiding this comment

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

btw, you could have made this field optional as well, so you can drop populating it before you remove it from the API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure what's better from the client's POV. A hard error from using a removed field or a soft error caused by empty values.

@metlos metlos merged commit 0af5a9a into codeready-toolchain:master Jul 8, 2024
2 checks passed
@metlos metlos deleted the move-info-into-tc-status branch July 31, 2024 14:29
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.

3 participants