Closed illume closed 3 years ago
The issue seems to be here: headlamp/backend/cmd/cluster.go
func (c *Cluster) getCAData() []byte {
if c.config.CertificateAuthority != "" {
pemBytes, err := ioutil.ReadFile(c.config.CertificateAuthority)
if err == nil {
return pemBytes
}
log.Fatal("Failed to add certificate:", err)
}
if caData := c.config.CertificateAuthorityData; len(caData) > 0 {
return caData
}
return nil
}
Description
Relative paths are not handled properly in the kubeconfig (at least for certificate-authority).
@marians identified an issue at https://github.com/kinvolk/headlamp/issues/112#issuecomment-762953053
Impact
Configuration is broken where people rely on the documented relative path behaviour.
Environment and steps to reproduce
echo "no" > ~/.kube/ca.crt
Add the line to ~/.kube/ca.crt
The error is:
Expected behavior
It should read the ca.crt file in the config folder.