Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{- if eq (include "understack.isEnabled" (list $.Values.site "ironic_hardware_exporter")) "true" }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: {{ printf "%s-%s" $.Release.Name "ironic-hardware-exporter" }}
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
{{- include "understack.appLabelsBlock" $ | nindent 2 }}
spec:
destination:
namespace: openstack
server: {{ $.Values.cluster_server }}
project: understack
sources:
- ref: understack
path: 'go/ironic-hardware-exporter/helm'
repoURL: {{ include "understack.understack_url" $ }}
targetRevision: {{ include "understack.understack_ref" $ }}
helm:
releaseName: ironic-hardware-exporter
valueFiles:
- $understack/go/ironic-hardware-exporter/helm/values.yaml
- $deploy/{{ include "understack.deploy_path" $ }}/ironic-hardware-exporter/values.yaml
ignoreMissingValueFiles: true
- ref: deploy
repoURL: {{ include "understack.deploy_url" $ }}
targetRevision: {{ include "understack.deploy_ref" $ }}
path: {{ include "understack.deploy_path" $ }}/ironic-hardware-exporter
syncPolicy:
automated:
prune: true
selfHeal: true
managedNamespaceMetadata:
annotations:
argocd.argoproj.io/sync-options: Delete=false
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
- RespectIgnoreDifferences=true
- ApplyOutOfSyncOnly=true
{{- end }}
6 changes: 6 additions & 0 deletions charts/argocd-understack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,12 @@ site:
# @default -- $understack/components/nautobot/nautobot_config.py
nautobot_config: '$understack/components/nautobot/nautobot_config.py'

# -- Ironic hardware exporter for bare-metal hardware metrics via RabbitMQ
ironic_hardware_exporter:
# -- Enable/disable deploying ironic-hardware-exporter
# @default -- false
enabled: false

# -- SNMP exporter for network device monitoring
snmp_exporter:
# -- Enable/disable deploying SNMP exporter
Expand Down
1 change: 1 addition & 0 deletions docs/deploy-guide/components/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ enablement defaults, validation, and troubleshooting notes.
| [glance](./glance.md) | site |
| [cinder](./cinder.md) | site |
| [ironic](./ironic.md) | site |
| [ironic-hardware-exporter](./ironic-hardware-exporter.md) | site |
| [neutron](./neutron.md) | site |
| [placement](./placement.md) | site |
| [nova](./nova.md) | site |
Expand Down
55 changes: 55 additions & 0 deletions docs/deploy-guide/components/ironic-hardware-exporter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
charts:
- ironic-hardware-exporter
source_text: ArgoCD renders both the exporter Helm chart and the deploy-repo
directory declared as a second source.
deploy_overrides:
helm:
mode: values
kustomize:
mode: second_source
---

# ironic-hardware-exporter

RabbitMQ-driven Prometheus exporter for Ironic hardware and node-state metrics.

## Deployment Scope

- Cluster scope: site
- Values key: `site.ironic_hardware_exporter`
- ArgoCD Application template: `charts/argocd-understack/templates/application-ironic-hardware-exporter.yaml`

## How ArgoCD Builds It

{{ component_argocd_builds() }}

## How to Enable

Enable this component in your site deployment values:

```yaml title="$CLUSTER_NAME/deploy.yaml"
site:
ironic_hardware_exporter:
enabled: true
```

## Deployment Repo Content

{{ secrets_disclaimer }}

Required or commonly required items:

- `values.yaml`: Provide site-specific Helm values such as RabbitMQ host, queue names, TLS settings, and optional `ServiceMonitor` tuning.
- `kustomization.yaml`: Include any Secrets or manifests that must be applied alongside the chart from the same deploy-repo directory.
- `RabbitMQ password Secret`: Create the Secret referenced by `rabbitmq.existingSecret`.

Optional additions:

- `RabbitMQ CA Secret`: Add a Secret containing `ca.crt` when `rabbitmq.tls.enabled=true` and the broker uses a private CA.
- `Additional overlay manifests`: Add SealedSecrets, ExternalSecrets, NetworkPolicies, or namespace-local overrides if this site needs extra deployment-specific resources.

## Notes

- This component uses a deploy-repo second source, so enabling it should normally create a site directory like `$CLUSTER_NAME/ironic-hardware-exporter/`.
- The chart itself lives in `go/ironic-hardware-exporter/helm` inside the UnderStack repo.
11 changes: 9 additions & 2 deletions go/ironic-hardware-exporter/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ import (
"github.com/rackerlabs/understack/go/ironic-hardware-exporter/internal/server"
)

func derefStr(s *string) string {
if s == nil {
return "<nil>"
}
return *s
}

func main() {
cfg, err := config.Load()
if err != nil {
Expand Down Expand Up @@ -63,8 +70,8 @@ func main() {
return
}
store.UpdateNodeState(stateMsg)
log.Printf("cached state node=%s power=%v provision=%v",
stateMsg.NodeName, stateMsg.PowerState, stateMsg.ProvisionState)
log.Printf("cached state node=%s power=%s provision=%s",
stateMsg.NodeName, derefStr(stateMsg.PowerState), derefStr(stateMsg.ProvisionState))
}); err != nil {
log.Fatalf("states consumer stopped: %v", err)
}
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ nav:
- deploy-guide/components/horizon.md
- deploy-guide/components/ingress-nginx.md
- deploy-guide/components/ironic.md
- deploy-guide/components/ironic-hardware-exporter.md
- deploy-guide/components/karma.md
- deploy-guide/components/keystone.md
- deploy-guide/components/mariadb-operator.md
Expand Down
Loading