Browse Source

Merge "Fix cert_manager_api with x509keypair"

changes/46/691646/4
Zuul 2 weeks ago
parent
commit
c6ba442c22
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      magnum/drivers/heat/k8s_fedora_template_def.py

+ 4
- 3
magnum/drivers/heat/k8s_fedora_template_def.py View File

@@ -119,7 +119,7 @@ class K8sFedoraTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
if not extra_params.get('max_node_count'):
extra_params['max_node_count'] = cluster.node_count + 1

self._set_cert_manager_params(cluster, extra_params)
self._set_cert_manager_params(context, cluster, extra_params)
self._get_keystone_auth_default_policy(extra_params)
self._set_volumes(context, cluster, extra_params)

@@ -128,11 +128,12 @@ class K8sFedoraTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
extra_params=extra_params,
**kwargs)

def _set_cert_manager_params(self, cluster, extra_params):
def _set_cert_manager_params(self, context, cluster, extra_params):
cert_manager_api = cluster.labels.get('cert_manager_api')
if strutils.bool_from_string(cert_manager_api):
extra_params['cert_manager_api'] = cert_manager_api
ca_cert = cert_manager.get_cluster_ca_certificate(cluster)
ca_cert = cert_manager.get_cluster_ca_certificate(cluster,
context=context)
if six.PY3 and isinstance(ca_cert.get_private_key_passphrase(),
six.text_type):
extra_params['ca_key'] = x509.decrypt_key(

Loading…
Cancel
Save