@when('certificates.available')
def send_data(tls):
    'Send the data that is required to create a server certificate for\n    this server.'
    common_name = hookenv.unit_public_ip()
    kubernetes_service_ip = get_kubernetes_service_ip()
    domain = hookenv.config('dns_domain')
    sans = [hookenv.unit_public_ip(), hookenv.unit_private_ip(), socket.gethostname(), kubernetes_service_ip, 'kubernetes', 'kubernetes.{0}'.format(domain), 'kubernetes.default', 'kubernetes.default.svc', 'kubernetes.default.svc.{0}'.format(domain)]
    certificate_name = hookenv.local_unit().replace('/', '_')
    tls.request_server_cert(common_name, sans, certificate_name)
Send the data that is required to create a server certificate for
this server.
@when('certificates.available')
def send_data(tls):
    'Send the data that is required to create a server certificate for\n    this server.'
    common_name = hookenv.unit_public_ip()
    kubernetes_service_ip = get_kubernetes_service_ip()
    domain = hookenv.config('dns_domain')
    sans = [hookenv.unit_public_ip(), hookenv.unit_private_ip(), socket.gethostname(), kubernetes_service_ip, 'kubernetes', 'kubernetes.{0}'.format(domain), 'kubernetes.default', 'kubernetes.default.svc', 'kubernetes.default.svc.{0}'.format(domain)]
    certificate_name = hookenv.local_unit().replace('/', '_')
    tls.request_server_cert(common_name, sans, certificate_name)