From 8bf46f498d0425b55275db05bfa8a1d377a6d597 Mon Sep 17 00:00:00 2001 From: Anton Kachurin Date: Wed, 22 Sep 2021 10:51:55 +0300 Subject: [PATCH] [CCE] Fix `authenticating_proxy` cluster auth mode Make `authenticating_proxy_ca` deprecated. Add `authenticating_proxy` argument containing all `ca`, `cert`, and `private_key` for configuring authenticating proxy auth mode. --- docs/resources/cce_cluster_v3.md | 11 ++++ ...ce_opentelekomcloud_cce_cluster_v3_test.go | 65 +++++++++++------- ...esource_opentelekomcloud_cce_cluster_v3.go | 66 +++++++++++++++++-- .../cce-auth-proxy-63baf6c8c7e08aae.yaml | 8 +++ 4 files changed, 123 insertions(+), 27 deletions(-) create mode 100644 releasenotes/notes/cce-auth-proxy-63baf6c8c7e08aae.yaml diff --git a/docs/resources/cce_cluster_v3.md b/docs/resources/cce_cluster_v3.md index ee86df874..9001e78b6 100644 --- a/docs/resources/cce_cluster_v3.md +++ b/docs/resources/cce_cluster_v3.md @@ -124,6 +124,17 @@ The following arguments are supported: Defaults to `rbac`. Changing this parameter will create a new cluster resource. * `authenticating_proxy_ca` - (Optional) CA root certificate provided in the `authenticating_proxy` mode. + Deprecated, use `authenticating_proxy` instead. + +* `authenticating_proxy` - (Optional) Authenticating proxy configuration. Required if `authentication_mode` is set to `authenticating_proxy`. + * `ca` - X509 CA certificate configured in `authenticating_proxy` mode. The maximum size of the certificate is 1 MB. + * `cert` - Client certificate issued by the X509 CA certificate configured in `authenticating_proxy` mode. + This certificate is used for authentication from kube-apiserver to the extended API server. + * `private_key` - Private key of the client certificate issued by the X509 CA certificate configured in `authenticating_proxy` mode. + This key is used for authentication from kube-apiserver to the extended API server. + +~> + The private key used by the Kubernetes cluster does not support password encryption. Use an unencrypted private key. * `multi_az` - (Optional) Enable multiple AZs for the cluster, only when using HA flavors. Changing this parameter will create a new cluster resource. diff --git a/opentelekomcloud/acceptance/cce/resource_opentelekomcloud_cce_cluster_v3_test.go b/opentelekomcloud/acceptance/cce/resource_opentelekomcloud_cce_cluster_v3_test.go index 0cc25e8b8..ab533d656 100644 --- a/opentelekomcloud/acceptance/cce/resource_opentelekomcloud_cce_cluster_v3_test.go +++ b/opentelekomcloud/acceptance/cce/resource_opentelekomcloud_cce_cluster_v3_test.go @@ -281,31 +281,52 @@ resource "opentelekomcloud_cce_cluster_v3" "cluster_1" { container_network_type = "overlay_l2" kubernetes_svc_ip_range = "10.247.0.0/16" authentication_mode = "authenticating_proxy" - authenticating_proxy_ca = <`_) +deprecations: + - | + **[CCE]** Mark ``authenticating_proxy_ca`` argument of ``resource/opentelekomcloud_cce_cluster_v3`` as deprecated, + as passing only CA is not enough in current CCE version (`#1418 `_)