'Implements interface.'

def add_config(self, options, script):

    if (not options.k8s_account_credentials):
        return
    if (not options.k8s_account_docker_account):
        raise ValueError('--k8s_account_credentials    without    --k8s_account_docker_account')
    account_params = [options.k8s_account_name]
    account_params.extend(['--docker-registries', options.k8s_account_docker_account, '--kubeconfig-file', os.path.basename(options.k8s_account_credentials)])
    if options.k8s_account_context:
        account_params.extend(['--context', options.k8s_account_context])
    if options.k8s_account_namespaces:
        account_params.extend(['--namespaces', options.k8s_account_namespaces])
    script.append('hal    -q    --log=info    config    provider    kubernetes    enable')
    script.append('hal    -q    --log=info    config    provider    kubernetes    account    add    {params}'.format(params='    '.join(account_params)))
