[WIP] [DNM] kubeconfig decouple - maximum destruction#3841
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gauron99 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
2aee563 to
94a4752
Compare
94a4752 to
672471b
Compare
672471b to
f74082e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3841 +/- ##
==========================================
- Coverage 53.90% 53.22% -0.68%
==========================================
Files 200 200
Lines 23652 23937 +285
==========================================
- Hits 12749 12740 -9
- Misses 9669 9969 +300
+ Partials 1234 1228 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
f74082e to
46ff7e2
Compare
46ff7e2 to
07b6cf0
Compare
208df13 to
176bb58
Compare
cmd/deploy_test.go (+ testdata global config.yaml): - TestDeploy_ClusterAuthPriorityFlow: ordered full ladder (config default -> stored local.yaml beats kubeconfig -> FUNC_CLUSTER(_TOKEN) env -> --cluster/--cluster-token flag), asserting func.yaml pin + .func/local.yaml token at each step, and that no token ever lands in func.yaml. - TestDeploy_SaveAuthGate: --save-auth / FUNC_SAVE_AUTH=false pins the cluster but caches no credentials; default caches. - TestDeploy_KubeconfigFallback_PinsAndStores: the 'old way' (active kubeconfig) still works and now pins + caches. - TestDeploy_ClusterTokenUpdatesStoredTokenPreservesCA: --cluster-token updates the stored token, preserves the stored cluster CA. Uses loopback cluster URLs so the IsOpenshift probe is refused instantly (avoids the multi-second DNS timeout an unreachable hostname incurs).
pkg/k8s/client_test.go:
- URLResolution_TrailingSlashNormalized: target with a trailing slash still matches.
- URLResolution_MultipleMatches_ErrorListsContexts: the ambiguity error names the
conflicting contexts + 'disambiguate'.
- ResolveKubeconfigAuth_NoteOn{Active,NonActive}Match: the 'Using kubeconfig context
<name>' note is printed on a single match (os.Stderr captured).
pkg/functions/function_unit_test.go:
- LocalAuth_LocalYAMLMode0600 + TightensPreexisting0644: credential file is 0600,
incl. re-tightening a pre-existing 0644 file.
- LocalAuth_NotInFuncYAML: credentials never serialize into func.yaml; the cluster URL
does.
176bb58 to
5823031
Compare
No description provided.