Skip to content

Commit 4ba1594

Browse files
feat: Unit test fixes
1 parent ef92b3e commit 4ba1594

File tree

2 files changed

+8
-42
lines changed

2 files changed

+8
-42
lines changed

docs/content/addons/konnector-agent.md

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title = "Konnector Agent Addon"
33
icon = "fa-solid fa-plug"
44
+++
55

6-
The Konnector Agent addon enables automatic registration of Kubernetes clusters with Nutanix Prism Central. This addon leverages Cluster API lifecycle hooks to deploy the [Konnector Agent](https://github.com/nutanix-core/k8s-agent) on the new clusters.
6+
The Konnector Agent addon enables automatic registration of Kubernetes clusters with Nutanix Prism Central. This addon leverages Cluster API lifecycle hooks to deploy the [Konnector Agent](https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_7_3:mul-cluster-kubernetes-clusters-manage-pc-c.html) on the new clusters.
77

88
## Overview
99

@@ -43,24 +43,6 @@ The addon implements the following Cluster API lifecycle hooks:
4343

4444
## Configuration
4545

46-
### Basic Configuration
47-
48-
```yaml
49-
apiVersion: cluster.x-k8s.io/v1beta1
50-
kind: Cluster
51-
metadata:
52-
name: my-cluster
53-
spec:
54-
topology:
55-
variables:
56-
- name: clusterConfig
57-
value:
58-
addons:
59-
konnectorAgent: {}
60-
```
61-
62-
### Advanced Configuration
63-
6446
```yaml
6547
apiVersion: cluster.x-k8s.io/v1beta1
6648
kind: Cluster
@@ -76,7 +58,7 @@ spec:
7658
strategy: HelmAddon
7759
credentials:
7860
secretRef:
79-
name: prism-central-credentials-for-konnector-agent
61+
name: cluster-name-pc-credentials-for-konnector-agent
8062
```
8163
8264
## Configuration Reference
@@ -104,7 +86,7 @@ Create a secret containing Prism Central credentials:
10486
apiVersion: v1
10587
kind: Secret
10688
metadata:
107-
name: prism-central-credentials-for-konnector-agent
89+
name: cluster-name-pc-credentials-for-konnector-agent
10890
namespace: default
10991
type: Opaque
11092
stringData:
@@ -114,23 +96,7 @@ stringData:
11496

11597
## Examples
11698

117-
### Minimal Configuration
118-
119-
```yaml
120-
apiVersion: cluster.x-k8s.io/v1beta1
121-
kind: Cluster
122-
metadata:
123-
name: minimal-cluster
124-
spec:
125-
topology:
126-
variables:
127-
- name: clusterConfig
128-
value:
129-
addons:
130-
konnectorAgent: {}
131-
```
132-
133-
### With Custom Credentials
99+
### Configuration
134100

135101
```yaml
136102
apiVersion: cluster.x-k8s.io/v1beta1
@@ -147,7 +113,7 @@ spec:
147113
strategy: HelmAddon
148114
credentials:
149115
secretRef:
150-
name: prism-central-credentials-for-konnector-agent
116+
name: cluster-name-pc-credentials-for-konnector-agent
151117
```
152118

153119
## Default Values
@@ -185,14 +151,14 @@ Monitor the Konnector Agent deployment:
185151

186152
```bash
187153
# Check HelmChartProxy status
188-
kubectl get helmchartproxy -A
154+
kubectl get hcp -A
189155
190156
# Check agent logs
191157
kubectl logs hook-preinstall -n ntnx-system
192158
```
193159

194160
## References
195161

196-
- [Konnector Agent ](https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_7_3:mul-cluster-kubernetes-clusters-manage-pc-c.html)
162+
- [Konnector Agent](https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_7_3:mul-cluster-kubernetes-clusters-manage-pc-c.html)
197163
- [Cluster API Add-on Provider for Helm](https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm)
198164
- [Cluster API Runtime Hooks](https://cluster-api.sigs.k8s.io/tasks/experimental-features/runtime-sdk/hooks.html)

pkg/handlers/lifecycle/konnectoragent/variables_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ func TestApply_InvalidVariableJSON(t *testing.T) {
439439
handler.apply(context.Background(), cluster, resp)
440440

441441
assert.Equal(t, runtimehooksv1.ResponseStatusFailure, resp.Status)
442-
assert.Contains(t, resp.Message, "failed to read K8s Registration agent variable from cluster definition")
442+
assert.Contains(t, resp.Message, "failed to read Konnector Agent variable from cluster definition")
443443
}
444444

445445
// Test template values function

0 commit comments

Comments
 (0)