如何将证书作为 Helm Chart 的 Values.yaml 中的变量传递

Dar*_*hah 6 kubernetes kubernetes-helm

这是需要作为字符串传递的证书。

-----BEGIN CERTIFICATE-----
MIICyTCCAbTCEF+F3G/7tLCJj9mZ/RiaPQEwDQYJKoZIhvcNAQELBQAwIzEhMB8G
A1UEAxMYc2FjLWh2bTAwODc5LnN3aW5mcmEubmV0MB4XDTE5MDkyMDEwMDk1NloX
DTQ0MDkxMzEwMDk1NlowIzEhMB8GA1UEAxMYc2FjLWh2bTAwODc5LnN3aW5mcmEu
bmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtmBCXjv7/8pjzUyq
O52/NAVgOpVAj+i4d1bMdFvfonUzZVzvTfmTxLoHVXAAYrivYq5Y9hpTVIxM0rWj
AsomYfH3AEgGYax8YGSdF0LW0USEeXZiaMf+Z5+N43d8BoCdGOkPZZQEIMaQwnxM
ouLisTV113x0vzHZR7b1JzZyMF5zYw88Lsul+TEOfkpY0zjmoptFM26pYSkx8J87
n0aTe1ZN7TFDZ3zu629BHYfcwvy2F/m0E6rnFRa7o4o6qXJSfZIe1kqqvbRc
-----END CERTIFICATE-----

Run Code Online (Sandbox Code Playgroud)

舵图中的变量是

global:
  dbvalues:
    dbcacertificate:  
Run Code Online (Sandbox Code Playgroud)

Dar*_*hah 6

我找到了一种有效的通过证书的方法。

global:
 dbvalues:
   dbcacertificate: |
          -----BEGIN CERTIFICATE-----
          MIICyTCCAbTCEF+F3G/7tLCJj9mZ/RiaPQEwDQYJKoZIhvcNAQELBQAwIzEhMB8G
          A1UEAxMYc2FjLWh2bTAwODc5LnN3aW5mcmEubmV0MB4XDTE5MDkyMDEwMDk1NloX
          DTQ0MDkxMzEwMDk1NlowIzEhMB8GA1UEAxMYc2FjLWh2bTAwODc5LnN3aW5mcmEu
          bmV0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtmBCXjv7/8pjzUyq
          O52/NAVgOpVAj+i4d1bMdFvfonUzZVzvTfmTxLoHVXAAYrivYq5Y9hpTVIxM0rWj
          AsomYfH3AEgGYax8YGSdF0LW0USEeXZiaMf+Z5+N43d8BoCdGOkPZZQEIMaQwnxM
          ouLisTV113x0vzHZR7b1JzZyMF5zYw88Lsul+TEOfkpY0zjmoptFM26pYSkx8J87
          n0aTe1ZN7TFDZ3zu629BHYfcwvy2F/m0E6rnFRa7o4o6qXJSfZIe1kqqvbRc
          -----END CERTIFICATE-----
Run Code Online (Sandbox Code Playgroud)