Skip to content

feat: enable cluster-api metrics for operator/controlplane/bootstrap providers #237

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

Merged
merged 13 commits into from
Apr 29, 2025
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
2 changes: 2 additions & 0 deletions argocd/applications/custom/capi-operator.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ env:
value: "{{ .Values.argo.proxy.noProxy }}"
{{- end }}
{{- end }}
diagnosticsAddress: ":8080"
insecureDiagnostics: true
containerSecurityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
31 changes: 30 additions & 1 deletion argocd/applications/custom/capi-providers-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
# SPDX-License-Identifier: Apache-2.0

metrics:
enabled: true

# CAPI providers are managed using the CAPI operator and configured through its CRDs.
# The Helm chart .spec is directly passed to the CRD .spec without modification.

Expand All @@ -22,6 +25,15 @@ core:
RuntimeSDK: false
MachineSetPreflightChecks: true
MachineWaitForVolumeDetachConsiderVolumeAttachments: true
deployment:
containers:
- name: manager
args:
"--insecure-diagnostics": "true"
additionalManifests:
name: core-additional-manifest
namespace: capi-system


# https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-operator/operator.cluster.x-k8s.io/BootstrapProvider/v1alpha2@v0.15.1
bootstrap:
Expand All @@ -32,6 +44,14 @@ bootstrap:
configSecret:
namespace: capi-variables
name: capi-variables
deployment:
containers:
- name: manager
args:
"--insecure-diagnostics": "true"
additionalManifests:
name: bootstrap-additional-manifest
namespace: capr-system

# https://doc.crds.dev/github.com/kubernetes-sigs/cluster-api-operator/operator.cluster.x-k8s.io/ControlPlaneProvider/v1alpha2@v0.15.1
controlplane:
Expand All @@ -42,10 +62,19 @@ controlplane:
configSecret:
namespace: capi-variables
name: capi-variables
deployment:
containers:
- name: manager
args:
"--insecure-diagnostics": "true"
additionalManifests:
name: controlplane-additional-manifest
namespace: capr-system
# example deployment configuration
# deployment:
# containers:
# - name: manager
# imageUrl: docker.io/user/patched-rke2-controlplane:latest
# args:
# "-- concurrency": "5"
# "-- concurrency": "5"

2 changes: 1 addition & 1 deletion argocd/applications/templates/capi-providers-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
sources:
- repoURL: {{ required "A valid chartRepoURL entry required!" .Values.argo.chartRepoURL }}
chart: common/charts/{{$appName}}
targetRevision: 0.0.1
targetRevision: 0.0.2
helm:
releaseName: {{$appName}}
valuesObject:
Expand Down