Skip to content

Commit

Permalink
Merge pull request #516 from yadneshk/ipmi_secrets
Browse files Browse the repository at this point in the history
Create new secret to store ipmi configuration files
  • Loading branch information
openshift-merge-bot[bot] authored Oct 22, 2024
2 parents 58d8511 + 7097782 commit 380c601
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 2 deletions.
24 changes: 22 additions & 2 deletions controllers/ceilometer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
envVars *map[string]env.Setter,
) error {
cmLabels := labels.GetLabels(instance, labels.GetGroupLabel(ceilometer.ComputeServiceName), map[string]string{})
ipmiLabels := labels.GetLabels(instance, labels.GetGroupLabel(ceilometer.IpmiServiceName), map[string]string{})
customData := map[string]string{common.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig}
for key, data := range instance.Spec.DefaultConfigOverwrite {
customData[key] = data
Expand Down Expand Up @@ -922,7 +923,7 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
}

cms := []util.Template{
// ScriptsConfigMap
// CeilometerCompute ScriptsConfigMap
{
Name: fmt.Sprintf("%s-scripts", ceilometer.ComputeServiceName),
Namespace: instance.Namespace,
Expand All @@ -931,7 +932,7 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
AdditionalTemplate: map[string]string{"common.sh": "/common/common.sh"},
Labels: cmLabels,
},
// ConfigMap
// CeilometerCompute ConfigMap
{
Name: fmt.Sprintf("%s-config-data", ceilometer.ComputeServiceName),
Namespace: instance.Namespace,
Expand All @@ -941,6 +942,25 @@ func (r *CeilometerReconciler) generateComputeServiceConfig(
ConfigOptions: templateParameters,
Labels: cmLabels,
},
// CeilometerIpmi ScriptsConfigMap
{
Name: fmt.Sprintf("%s-scripts", ceilometer.IpmiServiceName),
Namespace: instance.Namespace,
Type: util.TemplateTypeScripts,
InstanceType: "ceilometeripmi",
AdditionalTemplate: map[string]string{"common.sh": "/common/common.sh"},
Labels: ipmiLabels,
},
// CeilometerIpmi ConfigMap
{
Name: fmt.Sprintf("%s-config-data", ceilometer.IpmiServiceName),
Namespace: instance.Namespace,
Type: util.TemplateTypeConfig,
InstanceType: "ceilometeripmi",
CustomData: customData,
ConfigOptions: templateParameters,
Labels: ipmiLabels,
},
}
return secret.EnsureSecrets(ctx, h, instance, cms, envVars)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/ceilometer/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const (
ServiceName = "ceilometer"
// ComputeServiceName -
ComputeServiceName = "ceilometer-compute"
// IpmiServiceName -
IpmiServiceName = "ceilometer-ipmi"
// ServiceType -
ServiceType = "Ceilometer"

Expand Down
Empty file.
49 changes: 49 additions & 0 deletions templates/ceilometeripmi/config/ceilometer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[DEFAULT]
tenant_name_discovery=False
debug=True
log_dir=/var/log/ceilometer
rpc_response_timeout=60
polling_namespaces=ipmi
transport_url={{ .TransportURL }}

[service_credentials]
auth_type=password
auth_url={{ .KeystoneInternalURL }}
project_name=service
project_domain_name=Default
username=ceilometer
user_domain_name=Default
password={{ .CeilometerPassword }}
interface = internalURL

[coordination]
backend_url=

[oslo_messaging_amqp]
rpc_address_prefix=
notify_address_prefix=

[oslo_messaging_notifications]
driver=messagingv2
topics=notifications
transport_url={{ .TransportURL }}

[publisher]
telemetry_secret=eQ5qb0yysfJ8lx82Vl061vSyY

[cache]
[event]
[ipmi]
[meter]
[monasca]
[notification]
[oslo_concurrency]
[oslo_messaging_kafka]
[oslo_messaging_rabbit]
[oslo_reports]
[polling]
[publisher_notifier]
[rgw_admin_credentials]
[rgw_client]
[service_types]
[vmware]
6 changes: 6 additions & 0 deletions templates/ceilometeripmi/config/polling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sources:
- name: pollsters
interval: 120
meters:
- hardware.*

0 comments on commit 380c601

Please sign in to comment.