kubernetes-sigs / cluster-api-provider-openstack

Cluster API implementation for OpenStack
https://cluster-api-openstack.sigs.k8s.io/
Apache License 2.0
288 stars 253 forks source link

Support clouds.yaml cacert file #1433

Closed alexandrevilain closed 1 year ago

alexandrevilain commented 1 year ago

/kind bug

What steps did you take and what happened:

clouds.yaml has a cacert key referencing a path to a ca certificate file. For now, the provider doesn't use this ca certificate when defined.

What did you expect to happen:

Creating a cluster with the following clouds.yaml file should work if file provided in clouds.openstack.cacert exists.

clouds:
  openstack:
    auth:
      auth_url: "HIDDEN"
      username: "HIDDEN"
      password: "HIDDEN"
      project_id:"HIDDEN"
      project_name: "HIDDEN"
      user_domain_name: "Default"
    cacert: /etc/ssl/certs/ca-certificates.crt
    region_name: "HIDDEN"
    interface: "public"
    identity_api_version: 3

Anything else you would like to add:

The field is supported by gophercloud: https://pkg.go.dev/github.com/gophercloud/utils/openstack/clientconfig#Cloud

Environment:

alexandrevilain commented 1 year ago

Closing in favor of #1439