)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23781,"name":"Stanislav Egorov","email":"realsystem@gmail.com","username":"StasEgorov"},"change_message_id":"61e320941e20e7fea55e8092ca9c13f419ae94a0","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Kubeconfig builder will be a single source of kubeconfig, allowing"},{"line_number":10,"context_line":"to make a decision how to build kubeconfig based on different"},{"line_number":11,"context_line":"pareameters, such as path to kubeconfig, dynamic kubeconfig"},{"line_number":12,"context_line":"options, or kubeconfig based on document bundle."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ia63e11a6f0b327e283d3e7fce169a35d54684dfb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9f560f44_c86e3bc8","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":11},"updated":"2020-09-01 21:10:18.000000000","message":"typo","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"4bdd28952c14eb763b415b45326dad982523ab99","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Kubeconfig builder will be a single source of kubeconfig, allowing"},{"line_number":10,"context_line":"to make a decision how to build kubeconfig based on different"},{"line_number":11,"context_line":"pareameters, such as path to kubeconfig, dynamic kubeconfig"},{"line_number":12,"context_line":"options, or kubeconfig based on document bundle."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: Ia63e11a6f0b327e283d3e7fce169a35d54684dfb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"9f560f44_e8205ffb","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":11},"in_reply_to":"9f560f44_c86e3bc8","updated":"2020-09-01 21:41:33.000000000","message":"Done","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"}],"pkg/api/v1alpha1/cluster_map_types.go":[{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":28,"context_line":"\tMap map[string]*Cluster"},{"line_number":29,"context_line":"}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"// Cluster uniquely identifies a cluster and it\u0027s parent cluster"},{"line_number":32,"context_line":"type Cluster struct {"},{"line_number":33,"context_line":"\t// Parent is a key in ClusterMap.Map that identifies the name of the parent(management) cluster"},{"line_number":34,"context_line":"\tParent string `json:\"parent,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_948d7a2c","line":31,"range":{"start_line":31,"start_character":45,"end_line":31,"end_character":49},"updated":"2020-09-02 06:52:49.000000000","message":"its","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":28,"context_line":"\tMap map[string]*Cluster"},{"line_number":29,"context_line":"}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"// Cluster uniquely identifies a cluster and it\u0027s parent cluster"},{"line_number":32,"context_line":"type Cluster struct {"},{"line_number":33,"context_line":"\t// Parent is a key in ClusterMap.Map that identifies the name of the parent(management) cluster"},{"line_number":34,"context_line":"\tParent string `json:\"parent,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_605bb6f5","line":31,"range":{"start_line":31,"start_character":45,"end_line":31,"end_character":49},"in_reply_to":"9f560f44_948d7a2c","updated":"2020-09-02 19:42:12.000000000","message":"Done","commit_id":"e03ef4229604625009a57688db0eddc02020b938"}],"pkg/k8s/kubeconfig/builder.go":[{"author":{"_account_id":23781,"name":"Stanislav Egorov","email":"realsystem@gmail.com","username":"StasEgorov"},"change_message_id":"61e320941e20e7fea55e8092ca9c13f419ae94a0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"\treturn b"},{"line_number":56,"context_line":"}"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"// WithClusterMap allows to set a parent cluster, that can be used to extract kubeconfig for taget cluster"},{"line_number":59,"context_line":"func (b *Builder) WithClusterMap(plan *v1alpha1.ClusterMap) *Builder {"},{"line_number":60,"context_line":"\tb.clusterMap \u003d plan"},{"line_number":61,"context_line":"\treturn b"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_285d3715","line":58,"range":{"start_line":58,"start_character":93,"end_line":58,"end_character":98},"updated":"2020-09-01 21:10:18.000000000","message":"typo","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"4bdd28952c14eb763b415b45326dad982523ab99","unresolved":false,"context_lines":[{"line_number":55,"context_line":"\treturn b"},{"line_number":56,"context_line":"}"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"// WithClusterMap allows to set a parent cluster, that can be used to extract kubeconfig for taget cluster"},{"line_number":59,"context_line":"func (b *Builder) WithClusterMap(plan *v1alpha1.ClusterMap) *Builder {"},{"line_number":60,"context_line":"\tb.clusterMap \u003d plan"},{"line_number":61,"context_line":"\treturn b"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_a8e827b3","line":58,"range":{"start_line":58,"start_character":93,"end_line":58,"end_character":98},"in_reply_to":"9f560f44_285d3715","updated":"2020-09-01 21:41:33.000000000","message":"Done","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":29,"context_line":"const KubeconfigDefaultFileName \u003d \"kubeconfig\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"// NewBuilder returns instance of kubeconfig builder."},{"line_number":32,"context_line":"func NewBuilder() *Builder {"},{"line_number":33,"context_line":"\treturn \u0026Builder{}"},{"line_number":34,"context_line":"}"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"// Builder is an object that allows to build a kubeconfig based on various provided sources"},{"line_number":37,"context_line":"// such as path to kubeconfig, path to bundle that should contain kubeconfig and parent cluster"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_34d46ee9","line":34,"range":{"start_line":32,"start_character":0,"end_line":34,"end_character":1},"updated":"2020-09-02 06:52:49.000000000","message":"why explicit constructor required if you don\u0027t perform any specific actions inside and type Builder is a public one?","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":29,"context_line":"const KubeconfigDefaultFileName \u003d \"kubeconfig\""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"// NewBuilder returns instance of kubeconfig builder."},{"line_number":32,"context_line":"func NewBuilder() *Builder {"},{"line_number":33,"context_line":"\treturn \u0026Builder{}"},{"line_number":34,"context_line":"}"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"// Builder is an object that allows to build a kubeconfig based on various provided sources"},{"line_number":37,"context_line":"// such as path to kubeconfig, path to bundle that should contain kubeconfig and parent cluster"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_c0e44211","line":34,"range":{"start_line":32,"start_character":0,"end_line":34,"end_character":1},"in_reply_to":"9f560f44_34d46ee9","updated":"2020-09-02 19:42:12.000000000","message":"to use builder OOP pattern and this is probably going to be extended with more logic later.","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":61,"context_line":"\treturn b"},{"line_number":62,"context_line":"}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"// WithClusterName allows to reach out to a cluster do download kubeconfig from there"},{"line_number":65,"context_line":"func (b *Builder) WithClusterName(clusterName string) *Builder {"},{"line_number":66,"context_line":"\tb.clusterName \u003d clusterName"},{"line_number":67,"context_line":"\treturn b"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_74b9c6c9","line":64,"range":{"start_line":64,"start_character":52,"end_line":64,"end_character":54},"updated":"2020-09-02 06:52:49.000000000","message":"to?","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":61,"context_line":"\treturn b"},{"line_number":62,"context_line":"}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"// WithClusterName allows to reach out to a cluster do download kubeconfig from there"},{"line_number":65,"context_line":"func (b *Builder) WithClusterName(clusterName string) *Builder {"},{"line_number":66,"context_line":"\tb.clusterName \u003d clusterName"},{"line_number":67,"context_line":"\treturn b"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_e0ece6bc","line":64,"range":{"start_line":64,"start_character":52,"end_line":64,"end_character":54},"in_reply_to":"9f560f44_74b9c6c9","updated":"2020-09-02 19:42:12.000000000","message":"Done","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":71,"context_line":"func (b *Builder) Build() Interface {"},{"line_number":72,"context_line":"\tswitch {"},{"line_number":73,"context_line":"\tcase b.path !\u003d \"\":"},{"line_number":74,"context_line":"\t\tfs :\u003d document.NewDocumentFs()"},{"line_number":75,"context_line":"\t\treturn NewKubeConfig(FromFile(b.path, fs), InjectFilePath(b.path, fs))"},{"line_number":76,"context_line":"\tcase b.fromParent():"},{"line_number":77,"context_line":"\t\t// TODO add method that would get kubeconfig from parent cluster and glue it together"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_742c2601","line":74,"range":{"start_line":74,"start_character":2,"end_line":74,"end_character":32},"updated":"2020-09-02 06:52:49.000000000","message":"if you are using default FS and your kubeconfig interface initialize it by default itself, why you\u0027re explicitly defining FS object here?","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":72,"context_line":"\tswitch {"},{"line_number":73,"context_line":"\tcase b.path !\u003d \"\":"},{"line_number":74,"context_line":"\t\tfs :\u003d document.NewDocumentFs()"},{"line_number":75,"context_line":"\t\treturn NewKubeConfig(FromFile(b.path, fs), InjectFilePath(b.path, fs))"},{"line_number":76,"context_line":"\tcase b.fromParent():"},{"line_number":77,"context_line":"\t\t// TODO add method that would get kubeconfig from parent cluster and glue it together"},{"line_number":78,"context_line":"\t\t// with parent kubeconfig if needed"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_f4d316d2","line":75,"range":{"start_line":75,"start_character":23,"end_line":75,"end_character":71},"updated":"2020-09-02 06:52:49.000000000","message":"that looks weird and controversial, you are passing the same variables into one object twice. Why do you need to inject path and fs again? I think just FromFile is enough. Otherwise, if it\u0027s really required, the internal design and logic of Kubeconfig interface is really over complicated.","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":72,"context_line":"\tswitch {"},{"line_number":73,"context_line":"\tcase b.path !\u003d \"\":"},{"line_number":74,"context_line":"\t\tfs :\u003d document.NewDocumentFs()"},{"line_number":75,"context_line":"\t\treturn NewKubeConfig(FromFile(b.path, fs), InjectFilePath(b.path, fs))"},{"line_number":76,"context_line":"\tcase b.fromParent():"},{"line_number":77,"context_line":"\t\t// TODO add method that would get kubeconfig from parent cluster and glue it together"},{"line_number":78,"context_line":"\t\t// with parent kubeconfig if needed"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_e0d34600","line":75,"range":{"start_line":75,"start_character":23,"end_line":75,"end_character":71},"in_reply_to":"9f560f44_f4d316d2","updated":"2020-09-02 19:42:12.000000000","message":"we can remove FS completely, we don\u0027t actually needed it for running, however it does simplify tests, allows to increase coverage. Also why is it passed twice? that can be removed quite easily as well, but idea was, that you can read from one place, write to different one. I know it is complicated, and can be overall simplified, like we did with NewBundleByPath(path) vs NewBundle(root, fs), simply low level function, that allows for some flexibility and test coverage.","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"\tcase b.bundlePath !\u003d \"\":"},{"line_number":83,"context_line":"\t\treturn NewKubeConfig(FromBundle(b.bundlePath))"},{"line_number":84,"context_line":"\tdefault:"},{"line_number":85,"context_line":"\t\tfs :\u003d document.NewDocumentFs()"},{"line_number":86,"context_line":"\t\t// return default path to kubeconfig file in airship workdir"},{"line_number":87,"context_line":"\t\tpath :\u003d filepath.Join(util.UserHomeDir(), config.AirshipConfigDir, KubeconfigDefaultFileName)"},{"line_number":88,"context_line":"\t\treturn NewKubeConfig(FromFile(path, fs), InjectFilePath(path, fs))"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_54e3e2a4","line":85,"range":{"start_line":85,"start_character":2,"end_line":85,"end_character":32},"updated":"2020-09-02 06:52:49.000000000","message":"same here","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":85,"context_line":"\t\tfs :\u003d document.NewDocumentFs()"},{"line_number":86,"context_line":"\t\t// return default path to kubeconfig file in airship workdir"},{"line_number":87,"context_line":"\t\tpath :\u003d filepath.Join(util.UserHomeDir(), config.AirshipConfigDir, KubeconfigDefaultFileName)"},{"line_number":88,"context_line":"\t\treturn NewKubeConfig(FromFile(path, fs), InjectFilePath(path, fs))"},{"line_number":89,"context_line":"\t}"},{"line_number":90,"context_line":"}"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_34de2eda","line":88,"range":{"start_line":88,"start_character":23,"end_line":88,"end_character":67},"updated":"2020-09-02 06:52:49.000000000","message":"same here","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":96,"context_line":"\t}"},{"line_number":97,"context_line":"\tcurrentCluster, exists :\u003d b.clusterMap.Map[b.clusterName]"},{"line_number":98,"context_line":"\tif !exists {"},{"line_number":99,"context_line":"\t\tlog.Debugf(\"Cluster %s is not defined in cluster map %v\", b.clusterName, b.clusterMap)"},{"line_number":100,"context_line":"\t\treturn false"},{"line_number":101,"context_line":"\t}"},{"line_number":102,"context_line":"\t// Check if DynamicKubeConfig is enabled, if so that means, we should get kubeconfig"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_54fc823d","line":99,"range":{"start_line":99,"start_character":14,"end_line":99,"end_character":21},"updated":"2020-09-02 06:52:49.000000000","message":"shouldn\u0027t it be lowercase?","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":96,"context_line":"\t}"},{"line_number":97,"context_line":"\tcurrentCluster, exists :\u003d b.clusterMap.Map[b.clusterName]"},{"line_number":98,"context_line":"\tif !exists {"},{"line_number":99,"context_line":"\t\tlog.Debugf(\"Cluster %s is not defined in cluster map %v\", b.clusterName, b.clusterMap)"},{"line_number":100,"context_line":"\t\treturn false"},{"line_number":101,"context_line":"\t}"},{"line_number":102,"context_line":"\t// Check if DynamicKubeConfig is enabled, if so that means, we should get kubeconfig"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_6001f66a","line":99,"range":{"start_line":99,"start_character":14,"end_line":99,"end_character":21},"in_reply_to":"9f560f44_54fc823d","updated":"2020-09-02 19:42:12.000000000","message":"Done","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":100,"context_line":"\t\treturn false"},{"line_number":101,"context_line":"\t}"},{"line_number":102,"context_line":"\t// Check if DynamicKubeConfig is enabled, if so that means, we should get kubeconfig"},{"line_number":103,"context_line":"\t// for this cluster from it\u0027s parent"},{"line_number":104,"context_line":"\tif currentCluster.Parent \u003d\u003d \"\" || !currentCluster.DynamicKubeConfig {"},{"line_number":105,"context_line":"\t\tlog.Debugf(\"Dynamic kubeconfig or parent cluster is not set for cluster %s\", b.clusterName)"},{"line_number":106,"context_line":"\t\treturn false"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_7496e6f1","line":103,"range":{"start_line":103,"start_character":26,"end_line":103,"end_character":30},"updated":"2020-09-02 06:52:49.000000000","message":"its","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":100,"context_line":"\t\treturn false"},{"line_number":101,"context_line":"\t}"},{"line_number":102,"context_line":"\t// Check if DynamicKubeConfig is enabled, if so that means, we should get kubeconfig"},{"line_number":103,"context_line":"\t// for this cluster from it\u0027s parent"},{"line_number":104,"context_line":"\tif currentCluster.Parent \u003d\u003d \"\" || !currentCluster.DynamicKubeConfig {"},{"line_number":105,"context_line":"\t\tlog.Debugf(\"Dynamic kubeconfig or parent cluster is not set for cluster %s\", b.clusterName)"},{"line_number":106,"context_line":"\t\treturn false"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_c0f7228c","line":103,"range":{"start_line":103,"start_character":26,"end_line":103,"end_character":30},"in_reply_to":"9f560f44_7496e6f1","updated":"2020-09-02 19:42:12.000000000","message":"Done","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":102,"context_line":"\t// Check if DynamicKubeConfig is enabled, if so that means, we should get kubeconfig"},{"line_number":103,"context_line":"\t// for this cluster from it\u0027s parent"},{"line_number":104,"context_line":"\tif currentCluster.Parent \u003d\u003d \"\" || !currentCluster.DynamicKubeConfig {"},{"line_number":105,"context_line":"\t\tlog.Debugf(\"Dynamic kubeconfig or parent cluster is not set for cluster %s\", b.clusterName)"},{"line_number":106,"context_line":"\t\treturn false"},{"line_number":107,"context_line":"\t}"},{"line_number":108,"context_line":"\treturn true"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_d49d320b","line":105,"range":{"start_line":105,"start_character":14,"end_line":105,"end_character":21},"updated":"2020-09-02 06:52:49.000000000","message":"same here","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":102,"context_line":"\t// Check if DynamicKubeConfig is enabled, if so that means, we should get kubeconfig"},{"line_number":103,"context_line":"\t// for this cluster from it\u0027s parent"},{"line_number":104,"context_line":"\tif currentCluster.Parent \u003d\u003d \"\" || !currentCluster.DynamicKubeConfig {"},{"line_number":105,"context_line":"\t\tlog.Debugf(\"Dynamic kubeconfig or parent cluster is not set for cluster %s\", b.clusterName)"},{"line_number":106,"context_line":"\t\treturn false"},{"line_number":107,"context_line":"\t}"},{"line_number":108,"context_line":"\treturn true"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_a0f2ee99","line":105,"range":{"start_line":105,"start_character":14,"end_line":105,"end_character":21},"in_reply_to":"9f560f44_d49d320b","updated":"2020-09-02 19:42:12.000000000","message":"Done","commit_id":"e03ef4229604625009a57688db0eddc02020b938"}],"pkg/k8s/kubeconfig/builder_test.go":[{"author":{"_account_id":23781,"name":"Stanislav Egorov","email":"realsystem@gmail.com","username":"StasEgorov"},"change_message_id":"61e320941e20e7fea55e8092ca9c13f419ae94a0","unresolved":false,"context_lines":[{"line_number":92,"context_line":"\t\tassert.Equal(t, path, actualPath)"},{"line_number":93,"context_line":"\t})"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"\tt.Run(\"No parrent cluster is defined, fall to default\", func(t *testing.T) {"},{"line_number":96,"context_line":"\t\tchildCluster :\u003d \"child\""},{"line_number":97,"context_line":"\t\tclusterMap :\u003d \u0026v1alpha1.ClusterMap{"},{"line_number":98,"context_line":"\t\t\tMap: map[string]*v1alpha1.Cluster{"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_48b7cb3b","line":95,"range":{"start_line":95,"start_character":11,"end_line":95,"end_character":18},"updated":"2020-09-01 21:10:18.000000000","message":"typo","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"4bdd28952c14eb763b415b45326dad982523ab99","unresolved":false,"context_lines":[{"line_number":92,"context_line":"\t\tassert.Equal(t, path, actualPath)"},{"line_number":93,"context_line":"\t})"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"\tt.Run(\"No parrent cluster is defined, fall to default\", func(t *testing.T) {"},{"line_number":96,"context_line":"\t\tchildCluster :\u003d \"child\""},{"line_number":97,"context_line":"\t\tclusterMap :\u003d \u0026v1alpha1.ClusterMap{"},{"line_number":98,"context_line":"\t\t\tMap: map[string]*v1alpha1.Cluster{"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_08cf9357","line":95,"range":{"start_line":95,"start_character":11,"end_line":95,"end_character":18},"in_reply_to":"9f560f44_48b7cb3b","updated":"2020-09-01 21:41:33.000000000","message":"Done","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"38c3b2611d3a2e28b366c0a6cbddf894e1cb44dc","unresolved":false,"context_lines":[{"line_number":86,"context_line":"\t\tkube :\u003d builder.Build()"},{"line_number":87,"context_line":"\t\t// We should get a default value for cluster since we don\u0027t have some-cluster set"},{"line_number":88,"context_line":"\t\tactualPath, cleanup, err :\u003d kube.GetFile()"},{"line_number":89,"context_line":"\t\tdefer cleanup()"},{"line_number":90,"context_line":"\t\trequire.NoError(t, err)"},{"line_number":91,"context_line":"\t\tpath :\u003d filepath.Join(util.UserHomeDir(), config.AirshipConfigDir, kubeconfig.KubeconfigDefaultFileName)"},{"line_number":92,"context_line":"\t\tassert.Equal(t, path, actualPath)"},{"line_number":93,"context_line":"\t})"}],"source_content_type":"text/x-go","patch_set":13,"id":"9f560f44_66b90e78","line":90,"range":{"start_line":89,"start_character":0,"end_line":90,"end_character":25},"updated":"2020-09-02 22:12:10.000000000","message":"nit: these lines should be flipped","commit_id":"6326e360b9eb9572d0e356e3fe409ad9a9b5481f"}],"pkg/phase/ifc/executor.go":[{"author":{"_account_id":23781,"name":"Stanislav Egorov","email":"realsystem@gmail.com","username":"StasEgorov"},"change_message_id":"61e320941e20e7fea55e8092ca9c13f419ae94a0","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\tPhaseName   string"},{"line_number":57,"context_line":"\tClusterName string"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tClsuterPlan      *v1alpha1.ClusterMap"},{"line_number":60,"context_line":"\tExecutorDocument document.Document"},{"line_number":61,"context_line":"\tExecutorBundle   document.Bundle"},{"line_number":62,"context_line":"\tAirshipSettings  *environment.AirshipCTLSettings"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_c87c7b74","line":59,"range":{"start_line":59,"start_character":1,"end_line":59,"end_character":12},"updated":"2020-09-01 21:10:18.000000000","message":"typo","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"4bdd28952c14eb763b415b45326dad982523ab99","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\tPhaseName   string"},{"line_number":57,"context_line":"\tClusterName string"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tClsuterPlan      *v1alpha1.ClusterMap"},{"line_number":60,"context_line":"\tExecutorDocument document.Document"},{"line_number":61,"context_line":"\tExecutorBundle   document.Bundle"},{"line_number":62,"context_line":"\tAirshipSettings  *environment.AirshipCTLSettings"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_682c4f01","line":59,"range":{"start_line":59,"start_character":1,"end_line":59,"end_character":12},"in_reply_to":"9f560f44_c87c7b74","updated":"2020-09-01 21:41:33.000000000","message":"Done","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"}],"pkg/phase/phase.go":[{"author":{"_account_id":23781,"name":"Stanislav Egorov","email":"realsystem@gmail.com","username":"StasEgorov"},"change_message_id":"61e320941e20e7fea55e8092ca9c13f419ae94a0","unresolved":false,"context_lines":[{"line_number":153,"context_line":"\t\treturn nil, err"},{"line_number":154,"context_line":"\t}"},{"line_number":155,"context_line":"\tvar executorDocBundle document.Bundle"},{"line_number":156,"context_line":"\t// if entrypoint is defined, used it, if not, just pass nil bundle, executors should be ready"},{"line_number":157,"context_line":"\tif phaseConfig.DocumentEntryPoint !\u003d \"\" {"},{"line_number":158,"context_line":"\t\tbundlePath :\u003d filepath.Join(targetPath, phaseConfig.DocumentEntryPoint)"},{"line_number":159,"context_line":"\t\texecutorDocBundle, err \u003d document.NewBundleByPath(bundlePath)"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_08967395","line":156,"range":{"start_line":156,"start_character":30,"end_line":156,"end_character":34},"updated":"2020-09-01 21:10:18.000000000","message":"use?","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"4bdd28952c14eb763b415b45326dad982523ab99","unresolved":false,"context_lines":[{"line_number":153,"context_line":"\t\treturn nil, err"},{"line_number":154,"context_line":"\t}"},{"line_number":155,"context_line":"\tvar executorDocBundle document.Bundle"},{"line_number":156,"context_line":"\t// if entrypoint is defined, used it, if not, just pass nil bundle, executors should be ready"},{"line_number":157,"context_line":"\tif phaseConfig.DocumentEntryPoint !\u003d \"\" {"},{"line_number":158,"context_line":"\t\tbundlePath :\u003d filepath.Join(targetPath, phaseConfig.DocumentEntryPoint)"},{"line_number":159,"context_line":"\t\texecutorDocBundle, err \u003d document.NewBundleByPath(bundlePath)"}],"source_content_type":"text/x-go","patch_set":8,"id":"9f560f44_a8366750","line":156,"range":{"start_line":156,"start_character":30,"end_line":156,"end_character":34},"in_reply_to":"9f560f44_08967395","updated":"2020-09-01 21:41:33.000000000","message":"Done","commit_id":"1b3eb03c5da01cc5cfb5a3c60c814b2554e7e68a"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":106,"context_line":"\treturn phaseConfig, nil"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"// GetClusterMap returns cluster plan object"},{"line_number":110,"context_line":"func (p *Cmd) GetClusterMap() (*airshipv1.ClusterMap, error) {"},{"line_number":111,"context_line":"\tbundle, err :\u003d p.getBundle()"},{"line_number":112,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_c858f632","line":109,"range":{"start_line":109,"start_character":33,"end_line":109,"end_character":37},"updated":"2020-09-02 06:52:49.000000000","message":"map?","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":106,"context_line":"\treturn phaseConfig, nil"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"// GetClusterMap returns cluster plan object"},{"line_number":110,"context_line":"func (p *Cmd) GetClusterMap() (*airshipv1.ClusterMap, error) {"},{"line_number":111,"context_line":"\tbundle, err :\u003d p.getBundle()"},{"line_number":112,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_202c1e00","line":109,"range":{"start_line":109,"start_character":33,"end_line":109,"end_character":37},"in_reply_to":"9f560f44_c858f632","updated":"2020-09-02 19:42:12.000000000","message":"Done","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":179,"context_line":"\t}"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"\tkubeConfig :\u003d kubeconfig.NewBuilder()."},{"line_number":182,"context_line":"\t\tWithPath(p.AirshipCTLSettings.Config.KubeConfigPath())."},{"line_number":183,"context_line":"\t\tWithBundle(meta.PhaseMeta.Path)."},{"line_number":184,"context_line":"\t\tWithClusterMap(plan)."},{"line_number":185,"context_line":"\t\tWithClusterName(phase.ClusterName)."}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_286892b8","line":182,"range":{"start_line":182,"start_character":11,"end_line":182,"end_character":55},"updated":"2020-09-02 06:52:49.000000000","message":"p.Config.KubeConfigPath()","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":179,"context_line":"\t}"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"\tkubeConfig :\u003d kubeconfig.NewBuilder()."},{"line_number":182,"context_line":"\t\tWithPath(p.AirshipCTLSettings.Config.KubeConfigPath())."},{"line_number":183,"context_line":"\t\tWithBundle(meta.PhaseMeta.Path)."},{"line_number":184,"context_line":"\t\tWithClusterMap(plan)."},{"line_number":185,"context_line":"\t\tWithClusterName(phase.ClusterName)."}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_009d9a65","line":182,"range":{"start_line":182,"start_character":11,"end_line":182,"end_character":55},"in_reply_to":"9f560f44_286892b8","updated":"2020-09-02 19:42:12.000000000","message":"Done","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":16768,"name":"Ruslan Aliev","email":"raliev@mirantis.com","username":"raliev"},"change_message_id":"a2587832f91729174465514aaed4de0285794fb6","unresolved":false,"context_lines":[{"line_number":178,"context_line":"\t\treturn nil, err"},{"line_number":179,"context_line":"\t}"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"\tkubeConfig :\u003d kubeconfig.NewBuilder()."},{"line_number":182,"context_line":"\t\tWithPath(p.AirshipCTLSettings.Config.KubeConfigPath())."},{"line_number":183,"context_line":"\t\tWithBundle(meta.PhaseMeta.Path)."},{"line_number":184,"context_line":"\t\tWithClusterMap(plan)."},{"line_number":185,"context_line":"\t\tWithClusterName(phase.ClusterName)."},{"line_number":186,"context_line":"\t\tBuild()"},{"line_number":187,"context_line":"\treturn executorFactory("},{"line_number":188,"context_line":"\t\tifc.ExecutorConfig{"},{"line_number":189,"context_line":"\t\t\tExecutorBundle:   executorDocBundle,"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_889c3ec0","line":186,"range":{"start_line":181,"start_character":1,"end_line":186,"end_character":9},"updated":"2020-09-02 06:52:49.000000000","message":"it\u0027s not easy to follow such patterns","commit_id":"e03ef4229604625009a57688db0eddc02020b938"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"17a142c526442cd8696f8d4d82a1cc2cde26edae","unresolved":false,"context_lines":[{"line_number":178,"context_line":"\t\treturn nil, err"},{"line_number":179,"context_line":"\t}"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"\tkubeConfig :\u003d kubeconfig.NewBuilder()."},{"line_number":182,"context_line":"\t\tWithPath(p.AirshipCTLSettings.Config.KubeConfigPath())."},{"line_number":183,"context_line":"\t\tWithBundle(meta.PhaseMeta.Path)."},{"line_number":184,"context_line":"\t\tWithClusterMap(plan)."},{"line_number":185,"context_line":"\t\tWithClusterName(phase.ClusterName)."},{"line_number":186,"context_line":"\t\tBuild()"},{"line_number":187,"context_line":"\treturn executorFactory("},{"line_number":188,"context_line":"\t\tifc.ExecutorConfig{"},{"line_number":189,"context_line":"\t\t\tExecutorBundle:   executorDocBundle,"}],"source_content_type":"text/x-go","patch_set":12,"id":"9f560f44_600f3688","line":186,"range":{"start_line":181,"start_character":1,"end_line":186,"end_character":9},"in_reply_to":"9f560f44_889c3ec0","updated":"2020-09-02 19:42:12.000000000","message":"unfortunately, building kubeconfig from different sources is quite complicated process, this simply allows to hide the decision logic, and use it in different components, and gate same results instead of scattering kubeconfig creation all over the airshipctl code.","commit_id":"e03ef4229604625009a57688db0eddc02020b938"}]}
