Current code assumes single image for each daemon-service. However,
Samba's metrics-exporter requires different image then the one used by
main samba server. Use the auxiliary 'config_blobs' map to propagate
the metrics image downwards to samba-service, plus metrics port number.
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
class SMBService(CephService):
TYPE = 'smb'
+ DEFAULT_EXPORTER_PORT = 9922
smb_pool = '.smb' # minor layering violation. try to clean up later.
def config(self, spec: ServiceSpec) -> None:
smb_spec, daemon_spec.daemon_id, ceph_users
)
)
+ config_blobs['metrics_image'] = (
+ self.mgr.container_image_samba_metrics
+ )
+ config_blobs['metrics_port'] = SMBService.DEFAULT_EXPORTER_PORT
+
logger.debug('smb generate_config: %r', config_blobs)
self._configure_cluster_meta(smb_spec, daemon_spec)
return config_blobs, []
'config': '',
'keyring': '[client.smb.config.tango.briskly]\nkey = None\n',
'config_auth_entity': 'client.smb.config.tango.briskly',
+ 'metrics_image': 'quay.io/samba.org/samba-metrics:latest',
+ 'metrics_port': 9922,
},
}
with with_host(cephadm_module, 'hostx'):
'[client.smb.fs.fs2.share3]\nkey = None\n'
),
'config_auth_entity': 'client.smb.config.tango.briskly',
+ 'metrics_image': 'quay.io/samba.org/samba-metrics:latest',
+ 'metrics_port': 9922,
},
}
with with_host(cephadm_module, 'hostx'):