Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed add private registry with certificate #677

Open
omega31 opened this issue Apr 10, 2024 · 0 comments
Open

Failed add private registry with certificate #677

omega31 opened this issue Apr 10, 2024 · 0 comments

Comments

@omega31
Copy link

omega31 commented Apr 10, 2024

Nutanix Cluster Information

  • AOS = 6.5.5.5
  • Prism Central = 2022.6.010

Terraform Version

1.5.7

Affected Resource(s)

resource nutanix_karbon_private_registry

Terraform Configuration Files

resource "nutanix_karbon_private_registry" "harbor" {
  name     = "registry-test"
  cert     =  filebase64("${path.module}/CA.pem")
  url      = "10.1.x.x"
  port     = 443
  username = "robot$nke"
  password = "xxxxxxxxxxx"
}

Debug Output

On the pcvm /home/data/nutanix/logs_karbon_core there is a log saying
illegal base64 data at input byte 0

I tried multiple ways to implement certificate in base64 :

  • As shown is the terraform configuration files part
  • With the content of the certificate encoded in base64
  • With a file already encoded and the fonction file()
  • with the content as string passed with the function base64()
  • And even with the certificate already encoded in string

Expected Behavior

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Actual Behavior

│ Error: error occurred during private registry creation: error: map[Private Registry Create:Failed to add new private registry to NKE]
│
│   with nutanix_karbon_private_registry.harbor,
│   on 03_registry.tf line 1, in resource "nutanix_karbon_private_registry" "harbor":
│    1: resource "nutanix_karbon_private_registry" "harbor" {
│
╵

Steps to Reproduce

  1. terraform apply

Important Factors

  • The creation of the private registry works without the parameter "cert".
  • The test environment is airgapped.
  • The account use with terraform is admin.
  • The manual way to declare a private registry with a certificate works
  • The CA certificate has been checked many times and it is in the right format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant