Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
aed1273
K8s agent as addon
vijayaraghavanr31 Sep 26, 2025
a058be0
Minor changes
vijayaraghavanr31 Oct 3, 2025
4154973
Removing unnessary values from values template file
vijayaraghavanr31 Oct 3, 2025
b6d53b7
added unit testing code
vijayaraghavanr31 Oct 5, 2025
3f85238
minor changes
vijayaraghavanr31 Oct 8, 2025
21c3b71
formatting changes
vijayaraghavanr31 Oct 8, 2025
b97bf9b
build: Update Kubernetes patch versions for tests (#1310)
jimmidyson Sep 18, 2025
9033ac8
test: reduce polling frequency on PC API (#1312)
dkoshkin Sep 20, 2025
fa833d8
docs: Upgrade to docsy 0.12.0 with hugo >= 0.146.0 support (#1315)
jimmidyson Sep 22, 2025
29aff8f
build: go1.25.1 to fix CVE (#1314)
jimmidyson Sep 22, 2025
5efb3c4
feat: Enable configurable parallel image pulls (#1306)
jimmidyson Sep 22, 2025
b218907
feat: add identityRef for AWS and EKS clusters (#1311)
dkoshkin Sep 24, 2025
25abbb3
feat: add volume APIs to AWS and EKS Nodes (#1309)
dkoshkin Sep 24, 2025
5087af9
fix: Ciliums kube-proxy replacement rollout and wait (#1307)
dkoshkin Sep 25, 2025
41148e1
build(deps): Bump the all-go-mod-patch-and-minor group across 4 direc…
dependabot[bot] Sep 25, 2025
50cf565
feat: update Cilium to latest version (#1318)
dkoshkin Sep 26, 2025
0f14fc8
refactor: Use metallb APIs instead of unstructured (#1317)
jimmidyson Sep 26, 2025
3c132cd
refactor: add new kube-proxy mode disable option (#1319)
dkoshkin Sep 26, 2025
b02af3f
ci: Upgrade devbox install action and remove custom golangci-lint (#1…
jimmidyson Sep 26, 2025
24c0b25
build(deps): Bump blackduck-inc/black-duck-security-scan from 2.4.0 t…
dependabot[bot] Sep 29, 2025
70d9119
build(deps): Bump the all-go-mod-patch-and-minor group across 1 direc…
dependabot[bot] Sep 29, 2025
f183df3
build: Update all tools via devbox update (#1328)
jimmidyson Sep 29, 2025
1a0c86a
feat: cilium configuration overrides for EKS provider (#1316)
supershal Sep 29, 2025
bbd8175
release(main): v0.34.0 (#1331)
supershal Sep 30, 2025
91cf315
build: downgrade clusterctl version (#1330)
dkoshkin Sep 30, 2025
0766f1d
feat: enable Cilium source IP preservation (#1295)
dkoshkin Oct 1, 2025
daaab18
feat: update capa with nutanix fork (#1329)
faiq Oct 1, 2025
6e01788
fix: use nodeadm mutations (#1332)
faiq Oct 2, 2025
fc33e25
feat: additionalTags handlers for AWS and EKS (#1333)
dkoshkin Oct 2, 2025
bb9d836
release(main): v0.35.0 (#1335)
faiq Oct 2, 2025
065bcab
fix: Remove Cilium chainingMode when kubeproxyreplacement is enabled …
supershal Oct 6, 2025
367ddba
build(deps): Bump sigs.k8s.io/cluster-api-addon-provider-helm from 0.…
dependabot[bot] Oct 6, 2025
83fc3b6
build(deps): Bump the all-go-mod-patch-and-minor group across 2 direc…
dependabot[bot] Oct 6, 2025
1f496a2
refactor: move handler directories (#1321)
dkoshkin Oct 6, 2025
eecdbf0
fix: Align validation with upstream Kubeadm Bootstrap Provider types …
dlipovetsky Oct 7, 2025
5f98b63
release(main): v0.35.1 (#1343)
dlipovetsky Oct 7, 2025
48619d2
K8s agent as addon
vijayaraghavanr31 Sep 26, 2025
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
21 changes: 21 additions & 0 deletions api/v1alpha1/addon_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ type NutanixAddons struct {

// +kubebuilder:validation:Optional
COSI *NutanixCOSI `json:"cosi,omitempty"`

// +kubebuilder:validation:Optional
K8sRegistrationAgent *NutanixK8sRegistrationAgent `json:"k8sRegistrationAgent,omitempty"`
}

type GenericAddons struct {
Expand Down Expand Up @@ -359,3 +362,21 @@ type RegistryAddon struct {
// +kubebuilder:validation:Enum="CNCF Distribution"
Provider string `json:"provider"`
}

type NutanixK8sRegistrationAgent struct {
// A reference to the Secret for credential information for the target Prism Central instance
// +kubebuilder:validation:Optional
Credentials *NutanixK8sAgentCredentials `json:"credentials,omitempty"`

// Addon strategy used to deploy the Nutanix k8s-registration-agent to the k8s cluster.
// +kubebuilder:default=HelmAddon
// +kubebuilder:validation:Optional
// +kubebuilder:validation:Enum=ClusterResourceSet;HelmAddon
Strategy AddonStrategy `json:"strategy,omitzero"`
}

type NutanixK8sAgentCredentials struct {
// A reference to the Secret containing the credentials used by the CCM provider.
// +kubebuilder:validation:Required
SecretRef LocalObjectReference `json:"secretRef"`
}
2 changes: 2 additions & 0 deletions api/v1alpha1/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const (
ServiceLoadBalancerVariableName = "serviceLoadBalancer"
// RegistryAddonVariableName is the OCI registry config patch variable name.
RegistryAddonVariableName = "registry"
// K8sRegistrationAgentVariableName is the Nutanix k8s-registration-agent addon config patch variable name.
K8sRegistrationAgentVariableName = "k8sRegistrationAgent"

// GlobalMirrorVariableName is the global image registry mirror patch variable name.
GlobalMirrorVariableName = "globalImageRegistryMirror"
Expand Down
29 changes: 29 additions & 0 deletions api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,35 @@ spec:
- defaultStorage
- providers
type: object
k8sRegistrationAgent:
properties:
credentials:
description: A reference to the Secret for credential information for the target Prism Central instance
properties:
secretRef:
description: A reference to the Secret containing the credentials used by the CCM provider.
properties:
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
maxLength: 253
minLength: 1
type: string
required:
- name
type: object
required:
- secretRef
type: object
strategy:
default: HelmAddon
description: Addon strategy used to deploy the Nutanix k8s-registration-agent to the k8s cluster.
enum:
- ClusterResourceSet
- HelmAddon
type: string
type: object
nfd:
description: NFD tells us to enable or disable the node feature discovery addon.
properties:
Expand Down
41 changes: 41 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

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

6 changes: 6 additions & 0 deletions api/variables/aggregate_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ type Addons struct {
CSI *CSI `json:"csi,omitempty"`

COSI *COSI `json:"cosi,omitempty"`

NutanixK8sRegistrationAgent *NutanixK8sRegistrationAgent `json:"k8sRegistrationAgent,omitempty"`
}

type NutanixK8sRegistrationAgent struct {
carenv1.NutanixK8sRegistrationAgent `json:",inline"`
}

type CSI struct {
Expand Down
2 changes: 2 additions & 0 deletions charts/cluster-api-runtime-extensions-nutanix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ A Helm chart for cluster-api-runtime-extensions-nutanix
| hooks.registrySyncer.defaultValueTemplateConfigMap.name | string | `"default-registry-syncer-helm-values-template"` | |
| hooks.serviceLoadBalancer.metalLB.defaultValueTemplateConfigMap.create | bool | `true` | |
| hooks.serviceLoadBalancer.metalLB.defaultValueTemplateConfigMap.name | string | `"default-metallb-helm-values-template"` | |
| hooks.k8sRegistrationAgent.helmAddonStrategy.defaultValueTemplateConfigMap.create | bool | `true` | |
| hooks.k8sRegistrationAgent.helmAddonStrategy.defaultValueTemplateConfigMap.name | string | `"default-k8s-registrationagent-helm-values-template"` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ghcr.io/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix"` | |
| image.tag | string | `""` | |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
agent:
name: {{ .AgentName}}

pc:
port: {{ .PrismCentralPort }}
insecure: {{ .PrismCentralInsecure }} #set this to true if PC does not have https enabled
endpoint: {{ .PrismCentralHost }} # eg: ip or fqdn
k8sClusterName: {{ .ClusterName }}

createSecret: false

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ spec:
- --csi.snapshot-controller.helm-addon.default-values-template-configmap-name={{ (index .Values.hooks.csi "snapshot-controller").helmAddonStrategy.defaultValueTemplateConfigMap.name }}
- --ccm.aws.helm-addon.default-values-template-configmap-name={{ .Values.hooks.ccm.aws.helmAddonStrategy.defaultValueTemplateConfigMap.name }}
- --cosi.controller.helm-addon.default-values-template-configmap-name={{ .Values.hooks.cosi.controller.helmAddonStrategy.defaultValueTemplateConfigMap.name }}
- --k8s-registration-agent.helm-addon.default-values-template-configmap-name={{ .Values.hooks.k8sRegistrationAgent.helmAddonStrategy.defaultValueTemplateConfigMap.name }}
{{- range $k, $v := .Values.hooks.ccm.aws.k8sMinorVersionToCCMVersion }}
- --ccm.aws.aws-ccm-versions={{ $k }}={{ $v }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ data:
ChartName: cosi
ChartVersion: 0.0.1-alpha.5
RepositoryURL: '{{ if .Values.helmRepository.enabled }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}https://mesosphere.github.io/charts/stable/{{ end }}'
k8s-registration-agent: |
ChartName: nutanix-k8s-agent
ChartVersion: 0.0.1-alpha.1
RepositoryURL: '{{ if .Values.helmRepository.enabled }}oci://helm-repository.{{ .Release.Namespace }}.svc/charts{{ else }}http://192.168.1.16:8080{{ end }}'
local-path-provisioner-csi: |
ChartName: local-path-provisioner
ChartVersion: 0.0.31
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2025 Nutanix. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

{{- if .Values.hooks.k8sRegistrationAgent.helmAddonStrategy.defaultValueTemplateConfigMap.name }}
apiVersion: v1
kind: ConfigMap
metadata:
name: '{{ .Values.hooks.k8sRegistrationAgent.helmAddonStrategy.defaultValueTemplateConfigMap.name }}'
data:
values.yaml: |-
{{- .Files.Get "addons/k8s-registration-agent/values-template.yaml" | nindent 4 }}
{{- end -}}
21 changes: 21 additions & 0 deletions charts/cluster-api-runtime-extensions-nutanix/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,27 @@
},
"type": "object"
},
"k8sRegistrationAgent": {
"properties": {
"helmAddonStrategy": {
"properties": {
"defaultValueTemplateConfigMap": {
"properties": {
"create": {
"type": "boolean"
},
"name": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"csi": {
"properties": {
"aws-ebs": {
Expand Down
5 changes: 5 additions & 0 deletions charts/cluster-api-runtime-extensions-nutanix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ hooks:
defaultValueTemplateConfigMap:
create: true
name: default-metallb-helm-values-template
k8sRegistrationAgent:
helmAddonStrategy:
defaultValueTemplateConfigMap:
create: true
name: default-k8s-registrationagent-helm-values-template
cosi:
controller:
helmAddonStrategy:
Expand Down
30 changes: 30 additions & 0 deletions docs/content/addons/k8s-registration-agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
+++
title = " Kubernets cluster registration addon"
icon = "fa-solid fa-object-group"
+++

By leveraging CAPI cluster lifecycle hooks, this handler deploys [Kubernetes cluster registration agent]
on the new cluster at the `AfterControlPlaneInitialized` phase.

The hook uses the [Cluster API Add-on Provider for Helm] to deploy the k8s-registration resources.

## Example

To enable deployment of kubernets registration agent on a cluster, specify the following values:

```yaml
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: <NAME>
spec:
topology:
variables:
- name: clusterConfig
value:
addons:
k8sRegistrationAgent: {}
```

[Container Object Storage Interface]: https://github.com/nutanix-core/k8s-agent
[Cluster API Add-on Provider for Helm]: https://github.com/kubernetes-sigs/cluster-api-addon-provider-helm
1 change: 1 addition & 0 deletions examples/capi-quick-start/nutanix-cluster-calico-crs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ spec:
provider: Calico
strategy: ClusterResourceSet
cosi: {}
k8sRegistrationAgent: {}
csi:
defaultStorage:
provider: nutanix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
cni:
provider: Calico
cosi: {}
k8sRegistrationAgent: {}
csi:
defaultStorage:
provider: nutanix
Expand Down
1 change: 1 addition & 0 deletions examples/capi-quick-start/nutanix-cluster-cilium-crs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ spec:
provider: Cilium
strategy: ClusterResourceSet
cosi: {}
k8sRegistrationAgent: {}
csi:
defaultStorage:
provider: nutanix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ spec:
cni:
provider: Cilium
cosi: {}
k8sRegistrationAgent: {}
csi:
defaultStorage:
provider: nutanix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ spec:
provider: Cilium
strategy: ClusterResourceSet
cosi: {}
k8sRegistrationAgent: {}
csi:
defaultStorage:
provider: nutanix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ spec:
cni:
provider: Cilium
cosi: {}
k8sRegistrationAgent: {}
csi:
defaultStorage:
provider: nutanix
Expand Down
5 changes: 5 additions & 0 deletions hack/addons/helm-chart-bundler/repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ repositories:
charts:
nutanix-csi-storage:
- 3.3.4
nutanix-k8s-agent:
repoURL: http://192.168.1.16:8080
charts:
nutanix-k8s-agent:
- 0.0.1-alpha.1
registry-syncer:
repoURL: https://mesosphere.github.io/charts/staging/
charts:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2025 Nutanix. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

metadata:
name: k8s-registration-agent-kustomize

helmCharts:
- name: nutanix-k8s-agent
namespace: kube-system
#repo: https://mesosphere.github.io/charts/stable
repo: http://192.168.1.16:8080
releaseName: k8s-registration-agent
version: ${K8S_REGISTRATION_AGENT_VERSION}
includeCRDs: true
skipTests: true
3 changes: 3 additions & 0 deletions hack/examples/bases/nutanix/cluster/kustomization.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ patches:
- target:
kind: Cluster
path: ../../../patches/nutanix/cosi.yaml
- target:
kind: Cluster
path: ../../../patches/nutanix/k8s-registration-agent.yaml
- target:
kind: Cluster
path: ../../../patches/nutanix/ccm.yaml
Expand Down
6 changes: 6 additions & 0 deletions hack/examples/patches/nutanix/k8s-registration-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2025 Nutanix. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

- op: "add"
path: "/spec/topology/variables/0/value/addons/k8sRegistrationAgent"
value: {}
2 changes: 2 additions & 0 deletions hack/tools/fetch-images/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ func getValuesFileForChartIfNeeded(chartName, carenChartDirectory string) (strin
return tempFile.Name(), nil
case "cosi-controller":
return filepath.Join(carenChartDirectory, "addons", "cosi", "controller", defaultHelmAddonFilename), nil
case "k8s-registration-agent":
return filepath.Join(carenChartDirectory, "addons", "k8s-registration-agent", defaultHelmAddonFilename), nil
case "metallb":
return filepath.Join(
carenChartDirectory,
Expand Down
2 changes: 2 additions & 0 deletions make/addons.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export METALLB_CHART_VERSION := 0.15.2

export COSI_CONTROLLER_VERSION := 0.0.1-alpha.5

export K8S_REGISTRATION_AGENT_VERSION := 0.0.1-alpha.1

.PHONY: addons.sync
addons.sync: $(addprefix update-addon.,calico cilium nfd cluster-autoscaler snapshot-controller local-path-provisioner-csi aws-ebs-csi kube-vip)
addons.sync: $(addprefix update-addon.aws-ccm.,130 131 132 133)
Expand Down
1 change: 1 addition & 0 deletions pkg/handlers/generic/lifecycle/config/cm.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const (
COSIController Component = "cosi-controller"
CNCFDistributionRegistry Component = "cncf-distribution-registry"
RegistrySyncer Component = "registry-syncer"
K8sRegistrationAgent Component = "k8s-registration-agent"
)

type HelmChartGetter struct {
Expand Down
Loading
Loading