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

fix: write kubeconfig if not in deploying #284

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [1.1.7]
### Fixes:
- Write kubeconfig to k8s cluster, only if not in deploying state.

## [1.1.6]
- **Chore**:
### Chore
- Update crossplane-runtime to 1.18.0

## [1.1.4]
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/k8s/k8scluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ func (c *externalCluster) Observe(ctx context.Context, mg resource.Managed) (man
if kubeconfig, _, err = c.service.GetKubeConfig(ctx, cr.Status.AtProvider.ClusterID); err != nil {
c.log.Info(fmt.Sprintf("failed to get connection details. error: %v", err))
}
mo.ConnectionDetails = createKubernetesConnectionDetails(c, kubeconfig, mg)
}
mo.ConnectionDetails = createKubernetesConnectionDetails(c, kubeconfig, mg)

return mo, nil
}
Expand Down
1 change: 0 additions & 1 deletion internal/controller/k8s/k8scluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ func TestExternalControlPlaneClientObserve(t *testing.T) {
ResourceExists: true,
ResourceUpToDate: true,
ResourceLateInitialized: false,
ConnectionDetails: managed.ConnectionDetails{"kubeconfig": []byte("")},
Diff: "",
},
wantErr: false,
Expand Down
Loading