K8s Source Analysis----The apigroupversion of Apiserver
Reproduced in this article from my own space: http://user.qzone.qq.com/29185807/blog/1458892866
The previous 3 articles, mainly according to the program processing process to jump analysis. After these process jump analysis, the dark clouds finally see day.
We peel away the unimportant parts and go straight to the main frame. apigroupversion
In master, the initialization of API V1
Generates a default apigroupversion
Here's the most important data structure in the entire framework.
I. Main data structure
1, Mapper, the most important thing is the inside of the Restmapping function (in K8s.io\kubernetes\pkg\api\meta)
2, Codec, is mainly a coding, decoding the interface (in K8s.io\kubernetes\pkg\runtime)
3, Typer (in K8s.io\kubernetes\pkg\runtime)
4, creater (in K8s.io\kubernetes\pkg\runtime)
5, convertor, conversion between different versions (in K8s.io\kubernetes\pkg\runtime)
6, Linker (in K8s.io\kubernetes\pkg\runtime)
7, the remaining temporarily do not do analysis Two, the main work flow
K8s.io\kubernetes\pkg\apiserver\apiserver.go
Main process
Following the main process, the decomposition steps
1. Initialize Installer
2, New WebService
3. Start Registration
Insert a mapping structure.
Insert a Restscope interface.
We continue to
Continue skipping some of the code
To this all process.
We're going to track the process of getting.
From this process plus the previous 3 articles, then the main processing process, has been more clear. So the rest is the analysis of the implementations of these interfaces such as Mapper,codec,typer,creater,convertor,linker.
Hao Haohua
QQ Crescent moon Lonely Road length 29185807
March 25, 2016
(Copyright statement: This article for the author original, if you need to reprint, please notify me, and indicate the source and author.) Reproduced without authorization, reserve the right to pursue its infringement. )