kubeconfig file is written for every hook

Bug #1837930 reported by Kevin W Monroe
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubernetes Control Plane Charm
Fix Released
Critical
Cory Johns

Bug Description

This is a follow-up to:

https://bugs.launchpad.net/charm-kubernetes-master/+bug/1822021

We call build_kubeconfig every time certs and auth are available (which is every hook once the cluster is up). The initial fix guarded the write with a data_changed, but that proved problematic because we weren't catching important fields that were changing:

https://github.com/charmed-kubernetes/charm-kubernetes-master/pull/41

We *could* re-implement that and add all the config opts that we care about (server, ca, pass, ks, etc), but that's awfully easy to miss a future config value. It's better to write an accurate config every hook than to miss a write when config changed.

We could also implement a "generate_kubeconfig" helper that would spit out what the config will look like, compare that to what's on disk, and write when the 2 differ.

Tags: seg sts
Changed in charm-kubernetes-master:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Cory Johns (johnsca) wrote :
Changed in charm-kubernetes-master:
status: Triaged → In Progress
assignee: nobody → Cory Johns (johnsca)
importance: Low → High
importance: High → Critical
milestone: none → 1.21+ck2
tags: added: review-needed
Cory Johns (johnsca)
tags: added: backport-needed
Revision history for this message
Cory Johns (johnsca) wrote :
Changed in charm-kubernetes-master:
status: In Progress → Fix Committed
tags: removed: backport-needed review-needed
tags: added: seg sts
Revision history for this message
Cory Johns (johnsca) wrote :

This was released on May 28th with bundle rev 679 / kubernetes-master rev 1008.

Changed in charm-kubernetes-master:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.