Use K8s version with .GitVersion
Hello.
Everywhere in Kubernetes used GitVersion for demonstrated K8s version.
(For example kubectl get nodes returned exactly GitVersion of kubernetes)
It's important for me, bc i use ArgoCD for all Kubernetes Clusters and i want see Major.Minor.Patch version of kubernetes. But now i see only Major.Minor version.
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Codecov Report
Merging #429 (0fcaf87) into master (ed31317) will increase coverage by
1.12%. The diff coverage is69.23%.
@@ Coverage Diff @@
## master #429 +/- ##
==========================================
+ Coverage 54.37% 55.49% +1.12%
==========================================
Files 41 41
Lines 3110 4485 +1375
==========================================
+ Hits 1691 2489 +798
- Misses 1252 1805 +553
- Partials 167 191 +24
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/utils/kube/ctl.go | 7.17% <0.00%> (+0.46%) |
:arrow_up: |
| pkg/cache/cluster.go | 55.34% <100.00%> (+0.98%) |
:arrow_up: |
| pkg/cache/settings.go | 45.67% <100.00%> (+5.20%) |
:arrow_up: |
| pkg/diff/diff_options.go | 52.94% <0.00%> (-30.40%) |
:arrow_down: |
| pkg/health/health.go | 55.42% <0.00%> (-5.15%) |
:arrow_down: |
| pkg/sync/common/types.go | 54.16% <0.00%> (-4.66%) |
:arrow_down: |
| pkg/utils/kube/convert.go | 60.00% <0.00%> (-3.64%) |
:arrow_down: |
| pkg/diff/diff.go | 60.75% <0.00%> (-2.86%) |
:arrow_down: |
| pkg/sync/sync_tasks.go | 90.62% <0.00%> (-1.44%) |
:arrow_down: |
| pkg/health/health_argo.go | 57.14% <0.00%> (-1.20%) |
:arrow_down: |
| ... and 34 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
If this method used in many project, or need backward compatibility, i can add new method like GetFullServerVersion and don't change GetServerVersion
@alexmt @jannfis @jessesuen Guys?
Hey, sorry @vzemtsov for coming back so late to this PR!
I would suggest making this parameterizeable, e.g. add a new boolean field fullServerVersion here: https://github.com/argoproj/gitops-engine/blob/517c1fff4e2d5c70f0af05a98b43ead92742fba5/pkg/cache/cluster.go#L167
Then add an option to toggle it in https://github.com/argoproj/gitops-engine/blob/master/pkg/cache/settings.go
Then, modify https://github.com/argoproj/gitops-engine/blob/517c1fff4e2d5c70f0af05a98b43ead92742fba5/pkg/utils/kube/ctl.go#L299 to return the *version.Info instead of a string and finally modify https://github.com/argoproj/gitops-engine/blob/517c1fff4e2d5c70f0af05a98b43ead92742fba5/pkg/cache/cluster.go#L283 to return the value appropriate to the state of the fullServerVersion toggle.
This would give people an option and is backwards compatible in the API.
WDYT?
I add changes what you say. It's looks good, but ArgoCD for get Kubernetes Version use only this function
Can you tag this changes? I want add changes to ArgoCD, to make work correctly
Oh. Need some time for testing. I'm back later
@jannfis Do you can check?
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
@jannfis Hi. Can we finish this?
anyone?