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

Use base64 for cluster certificate authority #53

Open
HenryXie1 opened this issue Oct 20, 2021 · 2 comments
Open

Use base64 for cluster certificate authority #53

HenryXie1 opened this issue Oct 20, 2021 · 2 comments
Assignees

Comments

@HenryXie1
Copy link

HenryXie1 commented Oct 20, 2021

We are automating deploy loginapp + dex. We have difficulty on replace cluster certificate-authority strings.

          -----BEGIN CERTIFICATE-----
          MIIC5zCCAc+gAwIBAgIBADANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDEwprdWJl
          ******
          -----END CERTIFICATE-----

It has pem format which has many lines and /n. The automation has difficulty to replace certficate-authority strings for different clusters.
Do you support base64 encode string for this certificate-authority? like

    # Clusters list for CLI configuration
    clusters:
      - name: test1
        server: https://****:6443
        certificate-authority: |
          <base64 encoded string>
        insecure-skip-tls-verify: false
        # Alternative context name for this cluster
        contextName: test

or any workaround would be much appreciated.

Thank you
Henry

@fydrah
Copy link
Owner

fydrah commented Oct 20, 2021

HI @HenryXie1 ,

Yes that's something we could do.

Currently we use the certificate-authority value, what we could change is:

I'll take a look at this.

@fsdrw08
Copy link

fsdrw08 commented Jan 23, 2022

I am in the same situation, for work around, I use yq to manipulate the content of ca, e.g.
yq -i e '.config.clusters[0].certificate-authority = "'"$(sudo cat /var/lib/rancher/k3s/server/tls/server-ca.crt)"'"' /vagrant/HelmWorkShop/loginapp/values.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants