So I tried auto devops and everything went fine, I was able to deploy to production without problem.
Suddenly it stopped working today with
error: Error loading config file "/csoc/slowfield.tmp/KUBECONFIG": v1.Config: Contexts: []v1.NamedContext: Clusters: []v1.NamedCluster: v1.NamedCluster: Name: Cluster: v1.Cluster: Server: CertificateAuthorityData: decode base64: illegal base64 data at input byte 60, parsing 1600 ...S0tLS0=\n"... at {"apiVersion":"v1","clusters":[{"cluster":{"certificate-authority-data":BLOCK1\BLOCK2\BLOCK3\n
I noticed that certificate-authority-data has a lot of new lines, should it have one?
I am facing the same issue. In the certificate new line characters has appeared.
Getting the same thing too. After digging around, it looks like this has been broken for at least 2 months as a result of this change:
This developer used Ruby’s Base64.encode64() function which according to https://ruby-doc.org/stdlib-2.1.3/libdoc/base64/rdoc/Base64.html:
Returns the Base64-encoded version of bin. This method complies with RFC 2045. Line feeds are added to every 60 encoded characters.
What the developer should have used was Base64.strict_encode64():
Returns the Base64-encoded version of bin. This method complies with RFC 4648. No line feeds are added.
It really wierd because I was able to run the job just the day before.
Also getting this error. Curious if anyone has found a solution or a work around?
Here’s my workaround if you’re using omnibus
- Open /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/kubernetes.rb
- Find the line
cluster[:'certificate-authority-data'] = Base64.encode64(ca_pem)
- Change it to
cluster[:'certificate-authority-data'] = Base64.strict_encode64(ca_pem)
- gitlab-ctl restart
I’m filing a issue right now to make it fixed.
Looks like they fixed it in 10.0.3 in this commit: