Skip to content

Commit

Permalink
Bring back the spec.apiEndpoint but make it optional.
Browse files Browse the repository at this point in the history
We need this indirection because we need to make the removal in two
steps so that the potentially different versions of the CRD in host and
member stay compatible.
  • Loading branch information
metlos committed Oct 8, 2024
1 parent 176149d commit c49a47f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
11 changes: 9 additions & 2 deletions api/v1alpha1/docs/apiref.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3063,8 +3063,6 @@ Supported condition types: ConditionReady + | |
|===




[id="{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-tiertemplate"]
==== TierTemplate

Expand Down Expand Up @@ -3336,6 +3334,15 @@ ToolchainClusterSpec defines the desired state of ToolchainCluster
[cols="20a,50a,15a,15a", options="header"]
|===
| Field | Description | Default | Validation
| *`apiEndpoint`* __string__ | The API endpoint of the member cluster. This can be a hostname, +
hostname:port, IP or IP:port. +


Be aware that this is kept in the spec only for compatibility reasons +
and doesn't serve any purpose. Use the Status.APIEndpoint instead. +


Deprecated: This is not used for anything. + | |
| *`secretRef`* __xref:{anchor_prefix}-github-com-codeready-toolchain-api-api-v1alpha1-localsecretreference[$$LocalSecretReference$$]__ | Name of the secret containing the kubeconfig required to connect +
to the cluster. + | |
|===
Expand Down
10 changes: 10 additions & 0 deletions api/v1alpha1/toolchaincluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ const (
// ToolchainClusterSpec defines the desired state of ToolchainCluster
// +k8s:openapi-gen=true
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 is kept in the spec only for compatibility reasons
// and doesn't serve any purpose. Use the Status.APIEndpoint instead.
//
// Deprecated: This is not used for anything.
// +optional
APIEndpoint string `json:"apiEndpoint,omitempty"`

// Name of the secret containing the kubeconfig required to connect
// to the cluster.
SecretRef LocalSecretReference `json:"secretRef"`
Expand Down
7 changes: 7 additions & 0 deletions api/v1alpha1/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c49a47f

Please sign in to comment.