)]}'
{"cmd/cluster/checkexpiration/checkexpiration.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"4c98bf3fa5028c7875579e1a6ad0b6a73255894c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\t\"fmt\""},{"line_number":19,"context_line":"\t\"strings\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"\t\"github.com/spf13/cobra\""},{"line_number":22,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/cluster/checkexpiration\""},{"line_number":23,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/config\""},{"line_number":24,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/util/json\""},{"line_number":25,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/util/yaml\""}],"source_content_type":"text/x-go","patch_set":33,"id":"9f560f44_63796991","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":61},"updated":"2020-09-11 16:32:02.000000000","message":"add a space between these 2 lines","commit_id":"abd5251ae090bad052a06f0810057d640bbcaacb"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/util/json\""},{"line_number":26,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/util/yaml\""},{"line_number":27,"context_line":")"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"// NewCheckCommand creates a new command for generating secret information"},{"line_number":30,"context_line":"func NewCheckCommand(cfgFactory config.Factory) *cobra.Command {"},{"line_number":31,"context_line":"\tvar threshold string"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_9604861a","line":28,"updated":"2020-09-15 19:55:08.000000000","message":"This command could use some further documentation by adding the `Long` attribute to the command object. For example - which kubernetes cluster is going to be checked?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/util/json\""},{"line_number":26,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/util/yaml\""},{"line_number":27,"context_line":")"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"// NewCheckCommand creates a new command for generating secret information"},{"line_number":30,"context_line":"func NewCheckCommand(cfgFactory config.Factory) *cobra.Command {"},{"line_number":31,"context_line":"\tvar threshold string"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_b142460c","line":28,"in_reply_to":"9f560f44_9604861a","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":34,"context_line":"\t\tUse:   \"check-certificate-expiration\","},{"line_number":35,"context_line":"\t\tShort: \"Check for expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster\","},{"line_number":36,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":37,"context_line":"\t\t\tif strings.EqualFold(contentType, \"json\") \u0026\u0026 strings.EqualFold(contentType, \"yaml\") {"},{"line_number":38,"context_line":"\t\t\t\treturn fmt.Errorf(\"invalid output format specified. Allowed values are json|yaml\")"},{"line_number":39,"context_line":"\t\t\t}"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_9656462a","line":37,"range":{"start_line":37,"start_character":6,"end_line":37,"end_character":86},"updated":"2020-09-15 19:55:08.000000000","message":"this condition is never true","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"\t\tUse:   \"check-certificate-expiration\","},{"line_number":35,"context_line":"\t\tShort: \"Check for expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster\","},{"line_number":36,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":37,"context_line":"\t\t\tif strings.EqualFold(contentType, \"json\") \u0026\u0026 strings.EqualFold(contentType, \"yaml\") {"},{"line_number":38,"context_line":"\t\t\t\treturn fmt.Errorf(\"invalid output format specified. Allowed values are json|yaml\")"},{"line_number":39,"context_line":"\t\t\t}"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_515daaea","line":37,"range":{"start_line":37,"start_character":6,"end_line":37,"end_character":86},"in_reply_to":"9f560f44_9656462a","updated":"2020-09-17 14:12:56.000000000","message":"Fixed - mismatch in logic","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"\t\tUse:   \"check-certificate-expiration\","},{"line_number":35,"context_line":"\t\tShort: \"Check for expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster\","},{"line_number":36,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":37,"context_line":"\t\t\tif strings.EqualFold(contentType, \"json\") \u0026\u0026 strings.EqualFold(contentType, \"yaml\") {"},{"line_number":38,"context_line":"\t\t\t\treturn fmt.Errorf(\"invalid output format specified. Allowed values are json|yaml\")"},{"line_number":39,"context_line":"\t\t\t}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"\t\t\tsecretStore, err :\u003d checkexpiration.NewStore(cfgFactory, nil)"},{"line_number":42,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":43,"context_line":"\t\t\t\treturn err"},{"line_number":44,"context_line":"\t\t\t}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"\t\t\texpirationInfo, err :\u003d secretStore.GetExpiringSecrets(threshold)"},{"line_number":47,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":48,"context_line":"\t\t\t\treturn fmt.Errorf(\"failed to check expiry: %s\", err.Error())"},{"line_number":49,"context_line":"\t\t\t}"},{"line_number":50,"context_line":"\t\t\tif contentType \u003d\u003d \"yaml\" {"},{"line_number":51,"context_line":"\t\t\t\terr \u003d yaml.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":52,"context_line":"\t\t\t} else {"},{"line_number":53,"context_line":"\t\t\t\terr \u003d json.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":54,"context_line":"\t\t\t}"},{"line_number":55,"context_line":"\t\t\treturn err"},{"line_number":56,"context_line":"\t\t},"},{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_bcea490b","line":56,"range":{"start_line":37,"start_character":0,"end_line":56,"end_character":4},"updated":"2020-09-15 18:12:50.000000000","message":"this is not tested, it is unclear what input should work here, can we put it into separate function or command object? We are trying to keep cmd module free of logic, other then returning cobra command itself","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"\t\tUse:   \"check-certificate-expiration\","},{"line_number":35,"context_line":"\t\tShort: \"Check for expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster\","},{"line_number":36,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":37,"context_line":"\t\t\tif strings.EqualFold(contentType, \"json\") \u0026\u0026 strings.EqualFold(contentType, \"yaml\") {"},{"line_number":38,"context_line":"\t\t\t\treturn fmt.Errorf(\"invalid output format specified. Allowed values are json|yaml\")"},{"line_number":39,"context_line":"\t\t\t}"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"\t\t\tsecretStore, err :\u003d checkexpiration.NewStore(cfgFactory, nil)"},{"line_number":42,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":43,"context_line":"\t\t\t\treturn err"},{"line_number":44,"context_line":"\t\t\t}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"\t\t\texpirationInfo, err :\u003d secretStore.GetExpiringSecrets(threshold)"},{"line_number":47,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":48,"context_line":"\t\t\t\treturn fmt.Errorf(\"failed to check expiry: %s\", err.Error())"},{"line_number":49,"context_line":"\t\t\t}"},{"line_number":50,"context_line":"\t\t\tif contentType \u003d\u003d \"yaml\" {"},{"line_number":51,"context_line":"\t\t\t\terr \u003d yaml.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":52,"context_line":"\t\t\t} else {"},{"line_number":53,"context_line":"\t\t\t\terr \u003d json.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":54,"context_line":"\t\t\t}"},{"line_number":55,"context_line":"\t\t\treturn err"},{"line_number":56,"context_line":"\t\t},"},{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_915742cb","line":56,"range":{"start_line":37,"start_character":0,"end_line":56,"end_character":4},"in_reply_to":"9f560f44_bcea490b","updated":"2020-09-17 14:12:56.000000000","message":"Fixed - Allowed inputs are yaml and json","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\t\t},"},{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","},{"line_number":60,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":61,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":62,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_767a92ba","line":59,"range":{"start_line":59,"start_character":18,"end_line":59,"end_character":28},"updated":"2020-09-15 19:55:08.000000000","message":"This should be IntVarP","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\t\t},"},{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","},{"line_number":60,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":61,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":62,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_d648be8b","line":59,"range":{"start_line":59,"start_character":59,"end_line":59,"end_character":63},"updated":"2020-09-15 19:55:08.000000000","message":"this should be 30","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\t\t},"},{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","},{"line_number":60,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":61,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":62,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_d1709a76","line":59,"range":{"start_line":59,"start_character":18,"end_line":59,"end_character":28},"in_reply_to":"9f560f44_767a92ba","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\t\t},"},{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","},{"line_number":60,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":61,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":62,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_d1f53ace","line":59,"range":{"start_line":59,"start_character":59,"end_line":59,"end_character":63},"in_reply_to":"9f560f44_d648be8b","updated":"2020-09-17 14:12:56.000000000","message":"Actually, by default airshipctl cluster check-certificate-expiration command should show all the entities. So this would be -1. Updated the desc accordingly","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","},{"line_number":60,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":61,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":62,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"},{"line_number":63,"context_line":"\t\t\"output to yaml or json, defaults to json\")"},{"line_number":64,"context_line":"\treturn checkCmd"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_36701adb","line":61,"range":{"start_line":60,"start_character":0,"end_line":61,"end_character":59},"updated":"2020-09-15 19:55:08.000000000","message":"This could be more concise: \"number of days until a secret is considered close to expiring\"","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"\t}"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026threshold, \"threshold\", \"t\", \"-1\","},{"line_number":60,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":61,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":62,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"},{"line_number":63,"context_line":"\t\t\"output to yaml or json, defaults to json\")"},{"line_number":64,"context_line":"\treturn checkCmd"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_b1f086dc","line":61,"range":{"start_line":60,"start_character":0,"end_line":61,"end_character":59},"in_reply_to":"9f560f44_36701adb","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"const ("},{"line_number":29,"context_line":"\tcheckLong \u003d `"},{"line_number":30,"context_line":"# Command basically checks for the expiring entities in the both the"},{"line_number":31,"context_line":"Management and the Workload Clusters or in a self-managed cluster and"},{"line_number":32,"context_line":"reports with the intention on alerting the operator to take"},{"line_number":33,"context_line":"necessary actions. Checks for TLS Secrets, kubeconf secrets (which gets"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_89ba17de","line":30,"range":{"start_line":30,"start_character":2,"end_line":30,"end_character":19},"updated":"2020-09-23 16:07:27.000000000","message":"This is redundant, please remove it","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"const ("},{"line_number":29,"context_line":"\tcheckLong \u003d `"},{"line_number":30,"context_line":"# Command basically checks for the expiring entities in the both the"},{"line_number":31,"context_line":"Management and the Workload Clusters or in a self-managed cluster and"},{"line_number":32,"context_line":"reports with the intention on alerting the operator to take"},{"line_number":33,"context_line":"necessary actions. Checks for TLS Secrets, kubeconf secrets (which gets"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_29faebb8","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":2},"updated":"2020-09-23 16:07:27.000000000","message":"delete this to be uniform with other command descriptions","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"const ("},{"line_number":29,"context_line":"\tcheckLong \u003d `"},{"line_number":30,"context_line":"# Command basically checks for the expiring entities in the both the"},{"line_number":31,"context_line":"Management and the Workload Clusters or in a self-managed cluster and"},{"line_number":32,"context_line":"reports with the intention on alerting the operator to take"},{"line_number":33,"context_line":"necessary actions. Checks for TLS Secrets, kubeconf secrets (which gets"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_cfba45be","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":2},"in_reply_to":"9f560f44_29faebb8","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"const ("},{"line_number":29,"context_line":"\tcheckLong \u003d `"},{"line_number":30,"context_line":"# Command basically checks for the expiring entities in the both the"},{"line_number":31,"context_line":"Management and the Workload Clusters or in a self-managed cluster and"},{"line_number":32,"context_line":"reports with the intention on alerting the operator to take"},{"line_number":33,"context_line":"necessary actions. Checks for TLS Secrets, kubeconf secrets (which gets"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_d873244d","line":30,"range":{"start_line":30,"start_character":2,"end_line":30,"end_character":19},"in_reply_to":"9f560f44_89ba17de","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"\tcheckExample \u003d `"},{"line_number":38,"context_line":"# To display all the expirying entities in the cluster"},{"line_number":39,"context_line":" airshipctl cluster check-certificate-expiration"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# To display the entities whose expiry is within threshold of 30 days"},{"line_number":42,"context_line":" airshipctl cluster check-certificate-expiration -t 30"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_49163ff4","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":1},"updated":"2020-09-23 16:07:27.000000000","message":"unnecessary leading spaces on these examples","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"\tcheckExample \u003d `"},{"line_number":38,"context_line":"# To display all the expirying entities in the cluster"},{"line_number":39,"context_line":" airshipctl cluster check-certificate-expiration"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# To display the entities whose expiry is within threshold of 30 days"},{"line_number":42,"context_line":" airshipctl cluster check-certificate-expiration -t 30"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_b86e3061","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":1},"in_reply_to":"9f560f44_49163ff4","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":61,"context_line":"\tcheckCmd :\u003d \u0026cobra.Command{"},{"line_number":62,"context_line":"\t\tUse:     \"check-certificate-expiration\","},{"line_number":63,"context_line":"\t\tShort:   \"Check for expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster\","},{"line_number":64,"context_line":"\t\tLong:    checkLong,"},{"line_number":65,"context_line":"\t\tExample: checkExample,"},{"line_number":66,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":67,"context_line":"\t\t\tif !strings.EqualFold(contentType, \"json\") \u0026\u0026 !strings.EqualFold(contentType, \"yaml\") {"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_c9e1afd1","line":64,"range":{"start_line":64,"start_character":11,"end_line":64,"end_character":20},"updated":"2020-09-23 16:07:27.000000000","message":"strip off the leading newline here:\n\n  checkLong[1:]\n\nNote that we should keep the leading newline on checkExample","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":61,"context_line":"\tcheckCmd :\u003d \u0026cobra.Command{"},{"line_number":62,"context_line":"\t\tUse:     \"check-certificate-expiration\","},{"line_number":63,"context_line":"\t\tShort:   \"Check for expiring TLS certificates, secrets and kubeconfigs in the kubernetes cluster\","},{"line_number":64,"context_line":"\t\tLong:    checkLong,"},{"line_number":65,"context_line":"\t\tExample: checkExample,"},{"line_number":66,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":67,"context_line":"\t\t\tif !strings.EqualFold(contentType, \"json\") \u0026\u0026 !strings.EqualFold(contentType, \"yaml\") {"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_f891c847","line":64,"range":{"start_line":64,"start_character":11,"end_line":64,"end_character":20},"in_reply_to":"9f560f44_c9e1afd1","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":64,"context_line":"\t\tLong:    checkLong,"},{"line_number":65,"context_line":"\t\tExample: checkExample,"},{"line_number":66,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":67,"context_line":"\t\t\tif !strings.EqualFold(contentType, \"json\") \u0026\u0026 !strings.EqualFold(contentType, \"yaml\") {"},{"line_number":68,"context_line":"\t\t\t\treturn ErrInvalidFormat{}"},{"line_number":69,"context_line":"\t\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\t\tsecretStore, err :\u003d checkexpiration.NewStore(cfgFactory, nil)"},{"line_number":72,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":73,"context_line":"\t\t\t\treturn err"},{"line_number":74,"context_line":"\t\t\t}"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"\t\t\texpirationInfo, err :\u003d secretStore.GetExpiringSecrets(threshold)"},{"line_number":77,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":78,"context_line":"\t\t\t\treturn ErrCheckExpirationFail{Err: err.Error()}"},{"line_number":79,"context_line":"\t\t\t}"},{"line_number":80,"context_line":"\t\t\tif contentType \u003d\u003d \"yaml\" {"},{"line_number":81,"context_line":"\t\t\t\terr \u003d yaml.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":82,"context_line":"\t\t\t} else {"},{"line_number":83,"context_line":"\t\t\t\terr \u003d json.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":84,"context_line":"\t\t\t}"},{"line_number":85,"context_line":"\t\t\treturn err"},{"line_number":86,"context_line":"\t\t},"},{"line_number":87,"context_line":"\t}"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_276d0b03","line":85,"range":{"start_line":67,"start_character":0,"end_line":85,"end_character":13},"updated":"2020-09-22 21:27:51.000000000","message":"same here, move this code to pkg please, if you can do unit tests for this, it would be great as well.","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":64,"context_line":"\t\tLong:    checkLong,"},{"line_number":65,"context_line":"\t\tExample: checkExample,"},{"line_number":66,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":67,"context_line":"\t\t\tif !strings.EqualFold(contentType, \"json\") \u0026\u0026 !strings.EqualFold(contentType, \"yaml\") {"},{"line_number":68,"context_line":"\t\t\t\treturn ErrInvalidFormat{}"},{"line_number":69,"context_line":"\t\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\t\tsecretStore, err :\u003d checkexpiration.NewStore(cfgFactory, nil)"},{"line_number":72,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":73,"context_line":"\t\t\t\treturn err"},{"line_number":74,"context_line":"\t\t\t}"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"\t\t\texpirationInfo, err :\u003d secretStore.GetExpiringSecrets(threshold)"},{"line_number":77,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":78,"context_line":"\t\t\t\treturn ErrCheckExpirationFail{Err: err.Error()}"},{"line_number":79,"context_line":"\t\t\t}"},{"line_number":80,"context_line":"\t\t\tif contentType \u003d\u003d \"yaml\" {"},{"line_number":81,"context_line":"\t\t\t\terr \u003d yaml.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":82,"context_line":"\t\t\t} else {"},{"line_number":83,"context_line":"\t\t\t\terr \u003d json.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":84,"context_line":"\t\t\t}"},{"line_number":85,"context_line":"\t\t\treturn err"},{"line_number":86,"context_line":"\t\t},"},{"line_number":87,"context_line":"\t}"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_98a24c99","line":85,"range":{"start_line":67,"start_character":0,"end_line":85,"end_character":13},"in_reply_to":"9f560f44_276d0b03","updated":"2020-09-24 11:24:39.000000000","message":"Done.. Unit tests - WIP","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":87,"context_line":"\t}"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"\tcheckCmd.Flags().IntVarP(\u0026threshold, \"threshold\", \"t\", -1,"},{"line_number":90,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret is\"+"},{"line_number":91,"context_line":"\t\t\t\" expiring. Displays all the secrets by default\")"},{"line_number":92,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"},{"line_number":93,"context_line":"\t\t\"output to yaml or json, defaults to json\")"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_29966b4a","line":90,"range":{"start_line":90,"start_character":3,"end_line":90,"end_character":24},"updated":"2020-09-23 16:07:27.000000000","message":"same here, please remove this","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":87,"context_line":"\t}"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"\tcheckCmd.Flags().IntVarP(\u0026threshold, \"threshold\", \"t\", -1,"},{"line_number":90,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret is\"+"},{"line_number":91,"context_line":"\t\t\t\" expiring. Displays all the secrets by default\")"},{"line_number":92,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert \"+"},{"line_number":93,"context_line":"\t\t\"output to yaml or json, defaults to json\")"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_789db855","line":90,"range":{"start_line":90,"start_character":3,"end_line":90,"end_character":24},"in_reply_to":"9f560f44_29966b4a","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"cmd/cluster/checkexpiration/testdata/TestCheckExpirationGoldenOutput/check-expiration-with-help.golden":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Flags:"},{"line_number":33,"context_line":"  -h, --help            help for check-certificate-expiration"},{"line_number":34,"context_line":"  -o, --output string   convert output to yaml or json, defaults to json (default \"json\")"},{"line_number":35,"context_line":"  -t, --threshold int   Threshold represents the max expiration threshold in days before a secret is expiring. Displays all the secrets by default (default -1)"}],"source_content_type":"application/octet-stream","patch_set":53,"id":"9f560f44_29d2ebfd","line":34,"range":{"start_line":34,"start_character":54,"end_line":34,"end_character":72},"updated":"2020-09-23 16:07:27.000000000","message":"redundant","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Flags:"},{"line_number":33,"context_line":"  -h, --help            help for check-certificate-expiration"},{"line_number":34,"context_line":"  -o, --output string   convert output to yaml or json, defaults to json (default \"json\")"},{"line_number":35,"context_line":"  -t, --threshold int   Threshold represents the max expiration threshold in days before a secret is expiring. Displays all the secrets by default (default -1)"}],"source_content_type":"application/octet-stream","patch_set":53,"id":"9f560f44_f82d48fd","line":34,"range":{"start_line":34,"start_character":54,"end_line":34,"end_character":72},"in_reply_to":"9f560f44_29d2ebfd","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"cmd/cluster/resetsatoken/errors.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":12,"context_line":" limitations under the License."},{"line_number":13,"context_line":"*/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"// Package resetsatoken consists of command sto reset service account(sa) tokens"},{"line_number":16,"context_line":"package resetsatoken"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import ("}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_89c5f70c","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":80},"updated":"2020-09-23 16:53:07.000000000","message":"We haven\u0027t defined a package documentation standard yet, I think it\u0027s probably best to forego these until we have","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":12,"context_line":" limitations under the License."},{"line_number":13,"context_line":"*/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"// Package resetsatoken consists of command sto reset service account(sa) tokens"},{"line_number":16,"context_line":"package resetsatoken"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"import ("}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_380d008f","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":80},"in_reply_to":"9f560f44_89c5f70c","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"cmd/cluster/resetsatoken/resetsatoken.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"4c98bf3fa5028c7875579e1a6ad0b6a73255894c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"import ("},{"line_number":19,"context_line":"\t\"fmt\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"\t\"github.com/spf13/cobra\""},{"line_number":22,"context_line":"\tresetsatoken \"opendev.org/airship/airshipctl/pkg/cluster/resetsatoken\""},{"line_number":23,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/config\""},{"line_number":24,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":25,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/log\""}],"source_content_type":"text/x-go","patch_set":33,"id":"9f560f44_a36f01c2","line":22,"range":{"start_line":21,"start_character":0,"end_line":22,"end_character":71},"updated":"2020-09-11 16:32:02.000000000","message":"Add a space between these 2 lines","commit_id":"abd5251ae090bad052a06f0810057d640bbcaacb"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"4c98bf3fa5028c7875579e1a6ad0b6a73255894c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\t\"fmt\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"\t\"github.com/spf13/cobra\""},{"line_number":22,"context_line":"\tresetsatoken \"opendev.org/airship/airshipctl/pkg/cluster/resetsatoken\""},{"line_number":23,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/config\""},{"line_number":24,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":25,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/log\""}],"source_content_type":"text/x-go","patch_set":33,"id":"9f560f44_639e89b8","line":22,"range":{"start_line":22,"start_character":1,"end_line":22,"end_character":13},"updated":"2020-09-11 16:32:02.000000000","message":"this alais isn\u0027t need here, please delete it","commit_id":"abd5251ae090bad052a06f0810057d640bbcaacb"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":26,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":27,"context_line":")"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"// NewResetCommand creates a new command for generating secret information"},{"line_number":30,"context_line":"func NewResetCommand(cfgFactory config.Factory, factory client.Factory) *cobra.Command {"},{"line_number":31,"context_line":"\tvar namespace, secretName string"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_f90a131e","line":28,"updated":"2020-09-15 19:55:08.000000000","message":"Likewise, this command would benefit from additional documentation. What happens when --secret-name is passed? What happens when it isn\u0027t? Does this rotate all tokens in a namespace?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":26,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/log\""},{"line_number":27,"context_line":")"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"// NewResetCommand creates a new command for generating secret information"},{"line_number":30,"context_line":"func NewResetCommand(cfgFactory config.Factory, factory client.Factory) *cobra.Command {"},{"line_number":31,"context_line":"\tvar namespace, secretName string"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_89d1cecf","line":28,"in_reply_to":"9f560f44_f90a131e","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":57,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":58,"context_line":"\t\t\t\treturn fmt.Errorf(\"failed to rotate token: %s\", err.Error())"},{"line_number":59,"context_line":"\t\t\t}"},{"line_number":60,"context_line":"\t\t\tfmt.Fprint(cmd.OutOrStdout(), \"Successfully rotated token\\n\")"},{"line_number":61,"context_line":"\t\t\treturn nil"},{"line_number":62,"context_line":"\t\t},"},{"line_number":63,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_191f075c","line":60,"range":{"start_line":60,"start_character":60,"end_line":60,"end_character":62},"updated":"2020-09-15 19:55:08.000000000","message":"nit: prefer fmt.Fprintln and drop this character","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":29,"context_line":"const ("},{"line_number":30,"context_line":"\tresetLong \u003d `"},{"line_number":31,"context_line":"# Use to reset/rotate the Service Account(SA) tokens and additionally restart"},{"line_number":32,"context_line":" the corresponding pods to get the latest token data refelected in the pod spec"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Secret-namespace is a mandatory field and secret-name is optional. If secret"},{"line_number":35,"context_line":"-name is not given, all the SA tokens in that particular ns is considered, else"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_c9e40fab","line":32,"range":{"start_line":32,"start_character":53,"end_line":32,"end_character":63},"updated":"2020-09-23 16:53:07.000000000","message":"reflected","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":29,"context_line":"const ("},{"line_number":30,"context_line":"\tresetLong \u003d `"},{"line_number":31,"context_line":"# Use to reset/rotate the Service Account(SA) tokens and additionally restart"},{"line_number":32,"context_line":" the corresponding pods to get the latest token data refelected in the pod spec"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Secret-namespace is a mandatory field and secret-name is optional. If secret"},{"line_number":35,"context_line":"-name is not given, all the SA tokens in that particular ns is considered, else"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_09d9e7f2","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":1},"updated":"2020-09-23 16:53:07.000000000","message":"ws","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"const ("},{"line_number":30,"context_line":"\tresetLong \u003d `"},{"line_number":31,"context_line":"# Use to reset/rotate the Service Account(SA) tokens and additionally restart"},{"line_number":32,"context_line":" the corresponding pods to get the latest token data refelected in the pod spec"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Secret-namespace is a mandatory field and secret-name is optional. If secret"},{"line_number":35,"context_line":"-name is not given, all the SA tokens in that particular ns is considered, else"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_b8a3d09a","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":1},"in_reply_to":"9f560f44_09d9e7f2","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"const ("},{"line_number":30,"context_line":"\tresetLong \u003d `"},{"line_number":31,"context_line":"# Use to reset/rotate the Service Account(SA) tokens and additionally restart"},{"line_number":32,"context_line":" the corresponding pods to get the latest token data refelected in the pod spec"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Secret-namespace is a mandatory field and secret-name is optional. If secret"},{"line_number":35,"context_line":"-name is not given, all the SA tokens in that particular ns is considered, else"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_18b8fcc5","line":32,"range":{"start_line":32,"start_character":53,"end_line":32,"end_character":63},"in_reply_to":"9f560f44_c9e40fab","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Secret-namespace is a mandatory field and secret-name is optional. If secret"},{"line_number":35,"context_line":"-name is not given, all the SA tokens in that particular ns is considered, else"},{"line_number":36,"context_line":" only that particular input secret-name`"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"\tresetExample \u003d `"},{"line_number":39,"context_line":"# To rotate a particular SA token"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_e9d593b8","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":1},"updated":"2020-09-23 16:53:07.000000000","message":"ws","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Secret-namespace is a mandatory field and secret-name is optional. If secret"},{"line_number":35,"context_line":"-name is not given, all the SA tokens in that particular ns is considered, else"},{"line_number":36,"context_line":" only that particular input secret-name`"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"\tresetExample \u003d `"},{"line_number":39,"context_line":"# To rotate a particular SA token"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_58aef480","line":36,"range":{"start_line":36,"start_character":0,"end_line":36,"end_character":1},"in_reply_to":"9f560f44_e9d593b8","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"\tresetExample \u003d `"},{"line_number":39,"context_line":"# To rotate a particular SA token"},{"line_number":40,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# To rotate all the SA tokens in cert-manager namespace"},{"line_number":43,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_49df5fd6","line":40,"range":{"start_line":40,"start_character":0,"end_line":40,"end_character":1},"updated":"2020-09-23 16:53:07.000000000","message":"ws","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"\tresetExample \u003d `"},{"line_number":39,"context_line":"# To rotate a particular SA token"},{"line_number":40,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# To rotate all the SA tokens in cert-manager namespace"},{"line_number":43,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_38b180e1","line":40,"range":{"start_line":40,"start_character":0,"end_line":40,"end_character":1},"in_reply_to":"9f560f44_49df5fd6","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":40,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# To rotate all the SA tokens in cert-manager namespace"},{"line_number":43,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager"},{"line_number":44,"context_line":"`"},{"line_number":45,"context_line":")"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_89ee9788","line":43,"range":{"start_line":43,"start_character":0,"end_line":43,"end_character":1},"updated":"2020-09-23 16:53:07.000000000","message":"ws","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":40,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager -s cert-manager-token-vvn9p"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# To rotate all the SA tokens in cert-manager namespace"},{"line_number":43,"context_line":" airshipctl cluster rotate-sa-token -n cert-manager"},{"line_number":44,"context_line":"`"},{"line_number":45,"context_line":")"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_98cb6c51","line":43,"range":{"start_line":43,"start_character":0,"end_line":43,"end_character":1},"in_reply_to":"9f560f44_89ee9788","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":45,"context_line":")"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"// NewResetCommand creates a new command for generating secret information"},{"line_number":48,"context_line":"func NewResetCommand(cfgFactory config.Factory, factory client.Factory) *cobra.Command {"},{"line_number":49,"context_line":"\tvar namespace, secretName string"},{"line_number":50,"context_line":"\tresetCmd :\u003d \u0026cobra.Command{"},{"line_number":51,"context_line":"\t\tUse:     \"rotate-sa-token\","}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_23ecde27","line":48,"range":{"start_line":48,"start_character":48,"end_line":48,"end_character":70},"updated":"2020-09-22 21:27:51.000000000","message":"don\u0027t pass it from higher level, you can create this in place instead, we are going to change that in cluster status as well.","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":45,"context_line":")"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"// NewResetCommand creates a new command for generating secret information"},{"line_number":48,"context_line":"func NewResetCommand(cfgFactory config.Factory, factory client.Factory) *cobra.Command {"},{"line_number":49,"context_line":"\tvar namespace, secretName string"},{"line_number":50,"context_line":"\tresetCmd :\u003d \u0026cobra.Command{"},{"line_number":51,"context_line":"\t\tUse:     \"rotate-sa-token\","}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_78c6584b","line":48,"range":{"start_line":48,"start_character":48,"end_line":48,"end_character":70},"in_reply_to":"9f560f44_23ecde27","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\tresetCmd :\u003d \u0026cobra.Command{"},{"line_number":51,"context_line":"\t\tUse:     \"rotate-sa-token\","},{"line_number":52,"context_line":"\t\tShort:   \"Rotate tokens of Service Accounts\","},{"line_number":53,"context_line":"\t\tLong:    resetLong,"},{"line_number":54,"context_line":"\t\tExample: resetExample,"},{"line_number":55,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":56,"context_line":"\t\t\tairshipconfig, err :\u003d cfgFactory()"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_89933700","line":53,"range":{"start_line":53,"start_character":11,"end_line":53,"end_character":20},"updated":"2020-09-23 16:53:07.000000000","message":"same here, trim off the leading newline","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\tresetCmd :\u003d \u0026cobra.Command{"},{"line_number":51,"context_line":"\t\tUse:     \"rotate-sa-token\","},{"line_number":52,"context_line":"\t\tShort:   \"Rotate tokens of Service Accounts\","},{"line_number":53,"context_line":"\t\tLong:    resetLong,"},{"line_number":54,"context_line":"\t\tExample: resetExample,"},{"line_number":55,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":56,"context_line":"\t\t\tairshipconfig, err :\u003d cfgFactory()"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_d8c16431","line":53,"range":{"start_line":53,"start_character":11,"end_line":53,"end_character":20},"in_reply_to":"9f560f44_89933700","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\t\tLong:    resetLong,"},{"line_number":54,"context_line":"\t\tExample: resetExample,"},{"line_number":55,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":56,"context_line":"\t\t\tairshipconfig, err :\u003d cfgFactory()"},{"line_number":57,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":58,"context_line":"\t\t\t\treturn err"},{"line_number":59,"context_line":"\t\t\t}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"\t\t\tvar kclient client.Interface"},{"line_number":62,"context_line":"\t\t\tif factory !\u003d nil {"},{"line_number":63,"context_line":"\t\t\t\tkclient, err \u003d factory(airshipconfig)"},{"line_number":64,"context_line":"\t\t\t} else {"},{"line_number":65,"context_line":"\t\t\t\tkclient, err \u003d client.DefaultClient(airshipconfig)"},{"line_number":66,"context_line":"\t\t\t}"},{"line_number":67,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":68,"context_line":"\t\t\t\treturn err"},{"line_number":69,"context_line":"\t\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\t\tmanager, err :\u003d resetsatoken.NewTokenManager(kclient.ClientSet())"},{"line_number":72,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":73,"context_line":"\t\t\t\treturn err"},{"line_number":74,"context_line":"\t\t\t}"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"\t\t\terr \u003d manager.RotateToken(namespace, secretName)"},{"line_number":77,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":78,"context_line":"\t\t\t\treturn ErrRotateTokenFail{Err: err.Error()}"},{"line_number":79,"context_line":"\t\t\t}"},{"line_number":80,"context_line":"\t\t\tfmt.Fprintln(cmd.OutOrStdout(), \"Successfully rotated token\")"},{"line_number":81,"context_line":"\t\t\treturn nil"},{"line_number":82,"context_line":"\t\t},"},{"line_number":83,"context_line":"\t}"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_c78d2fd5","line":81,"range":{"start_line":56,"start_character":0,"end_line":81,"end_character":13},"updated":"2020-09-22 21:27:51.000000000","message":"As i\u0027ve said before, we are trying to keep cmd package free of logic, there is work happening right now to remove it in other packages, and this seems like extends that work for no reason.\n\nCan we please move all the logic into pkg module?\n\nFor example you can create the same function there in pkg/.../command.go file, like it\u0027s done for example in here https://github.com/airshipit/airshipctl/blob/master/pkg/phase/command.go\nand here \nhttps://github.com/airshipit/airshipctl/blob/master/cmd/phase/run.go#L49-L52","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":53,"context_line":"\t\tLong:    resetLong,"},{"line_number":54,"context_line":"\t\tExample: resetExample,"},{"line_number":55,"context_line":"\t\tRunE: func(cmd *cobra.Command, args []string) error {"},{"line_number":56,"context_line":"\t\t\tairshipconfig, err :\u003d cfgFactory()"},{"line_number":57,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":58,"context_line":"\t\t\t\treturn err"},{"line_number":59,"context_line":"\t\t\t}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"\t\t\tvar kclient client.Interface"},{"line_number":62,"context_line":"\t\t\tif factory !\u003d nil {"},{"line_number":63,"context_line":"\t\t\t\tkclient, err \u003d factory(airshipconfig)"},{"line_number":64,"context_line":"\t\t\t} else {"},{"line_number":65,"context_line":"\t\t\t\tkclient, err \u003d client.DefaultClient(airshipconfig)"},{"line_number":66,"context_line":"\t\t\t}"},{"line_number":67,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":68,"context_line":"\t\t\t\treturn err"},{"line_number":69,"context_line":"\t\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\t\tmanager, err :\u003d resetsatoken.NewTokenManager(kclient.ClientSet())"},{"line_number":72,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":73,"context_line":"\t\t\t\treturn err"},{"line_number":74,"context_line":"\t\t\t}"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"\t\t\terr \u003d manager.RotateToken(namespace, secretName)"},{"line_number":77,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":78,"context_line":"\t\t\t\treturn ErrRotateTokenFail{Err: err.Error()}"},{"line_number":79,"context_line":"\t\t\t}"},{"line_number":80,"context_line":"\t\t\tfmt.Fprintln(cmd.OutOrStdout(), \"Successfully rotated token\")"},{"line_number":81,"context_line":"\t\t\treturn nil"},{"line_number":82,"context_line":"\t\t},"},{"line_number":83,"context_line":"\t}"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_f8df0809","line":81,"range":{"start_line":56,"start_character":0,"end_line":81,"end_character":13},"in_reply_to":"9f560f44_c78d2fd5","updated":"2020-09-24 11:24:39.000000000","message":"Done- Thanks a lot for the sample implementation.","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"cmd/cluster/resetsatoken/resetsatoken_test.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":12,"context_line":" limitations under the License."},{"line_number":13,"context_line":"*/"},{"line_number":14,"context_line":"// resetsatoken consists of command sto reset service account(sa) tokens"},{"line_number":15,"context_line":"package resetsatoken"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import ("},{"line_number":18,"context_line":"\t\"testing\""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_e983d3a7","line":15,"range":{"start_line":15,"start_character":8,"end_line":15,"end_character":20},"updated":"2020-09-23 16:53:07.000000000","message":"this should be resetsatoken_test","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":12,"context_line":" limitations under the License."},{"line_number":13,"context_line":"*/"},{"line_number":14,"context_line":"// resetsatoken consists of command sto reset service account(sa) tokens"},{"line_number":15,"context_line":"package resetsatoken"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"import ("},{"line_number":18,"context_line":"\t\"testing\""}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_7850185f","line":15,"range":{"start_line":15,"start_character":8,"end_line":15,"end_character":20},"in_reply_to":"9f560f44_e983d3a7","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"cmd/secret/checkexpiration/checkexpiration.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":28,"context_line":")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"// NewCheckCommand creates a new command for generating secret information"},{"line_number":31,"context_line":"func NewCheckCommand(rootSettings *environment.AirshipCTLSettings, factory client.Factory) *cobra.Command {"},{"line_number":32,"context_line":"\tvar duration string"},{"line_number":33,"context_line":"\tvar contentType string"},{"line_number":34,"context_line":"\tcheckCmd :\u003d \u0026cobra.Command{"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_0513c367","line":31,"range":{"start_line":31,"start_character":5,"end_line":31,"end_character":20},"updated":"2020-09-04 17:57:33.000000000","message":"We\u0027ve tried to keep our root commands pretty targeted thus far-\n\nairshipctl baremetal\nairshipctl config\nairshipctl cluster\nairshipctl ...\n\nAs a new person looking at airshipctl, how do I know when to use the CheckCommand? This is a perfect fit for the cluster command, airshipctl cluster validate-certificates or something like that.","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":28,"context_line":")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"// NewCheckCommand creates a new command for generating secret information"},{"line_number":31,"context_line":"func NewCheckCommand(rootSettings *environment.AirshipCTLSettings, factory client.Factory) *cobra.Command {"},{"line_number":32,"context_line":"\tvar duration string"},{"line_number":33,"context_line":"\tvar contentType string"},{"line_number":34,"context_line":"\tcheckCmd :\u003d \u0026cobra.Command{"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_313b5bea","line":31,"range":{"start_line":31,"start_character":5,"end_line":31,"end_character":20},"in_reply_to":"9f560f44_0513c367","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":49,"context_line":"\t\t\t\treturn fmt.Errorf(\"failed to check expiry: %s\", err.Error())"},{"line_number":50,"context_line":"\t\t\t}"},{"line_number":51,"context_line":"\t\t\tif contentType \u003d\u003d \"yaml\" {"},{"line_number":52,"context_line":"\t\t\t\terr \u003d yaml.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":53,"context_line":"\t\t\t} else {"},{"line_number":54,"context_line":"\t\t\t\terr \u003d json.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":55,"context_line":"\t\t\t}"},{"line_number":56,"context_line":"\t\t\treturn err"},{"line_number":57,"context_line":"\t\t},"},{"line_number":58,"context_line":"\t}"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_00561107","line":56,"range":{"start_line":51,"start_character":3,"end_line":56,"end_character":13},"updated":"2020-09-04 17:57:33.000000000","message":"Why doesn\u0027t this command just write tabular data to stdout? YAML or JSON is a nice enhancement, but it\u0027s not exactly human readable if someone is querying a cluster.","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":49,"context_line":"\t\t\t\treturn fmt.Errorf(\"failed to check expiry: %s\", err.Error())"},{"line_number":50,"context_line":"\t\t\t}"},{"line_number":51,"context_line":"\t\t\tif contentType \u003d\u003d \"yaml\" {"},{"line_number":52,"context_line":"\t\t\t\terr \u003d yaml.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":53,"context_line":"\t\t\t} else {"},{"line_number":54,"context_line":"\t\t\t\terr \u003d json.WriteOut(cmd.OutOrStdout(), expirationInfo)"},{"line_number":55,"context_line":"\t\t\t}"},{"line_number":56,"context_line":"\t\t\treturn err"},{"line_number":57,"context_line":"\t\t},"},{"line_number":58,"context_line":"\t}"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_3114fb4c","line":56,"range":{"start_line":51,"start_character":3,"end_line":56,"end_character":13},"in_reply_to":"9f560f44_00561107","updated":"2020-09-10 10:06:56.000000000","message":"Thanks for the comments. Will add the changes to include human readable tabular output in the upcoming patchset releases","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":57,"context_line":"\t\t},"},{"line_number":58,"context_line":"\t}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"\tcheckCmd.Flags().StringVar(\u0026duration, \"threshold\", \"30\","},{"line_number":61,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":62,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":63,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert output to yaml or json, defaults to json\")"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_a0000502","line":60,"range":{"start_line":60,"start_character":28,"end_line":60,"end_character":37},"updated":"2020-09-04 17:57:33.000000000","message":"nit: for readability, this should probably match the name of the flag.\n\nAs far as usability goes, have you considered allowing the user to specify a range? I would typically expect to see all certificates by default and filter that down using a range value. For example, I could filter certificates expiring in the next 60 days.","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"\t\t},"},{"line_number":58,"context_line":"\t}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"\tcheckCmd.Flags().StringVar(\u0026duration, \"threshold\", \"30\","},{"line_number":61,"context_line":"\t\t\"Threshold represents the max expiration threshold in days before a secret should be\"+"},{"line_number":62,"context_line":"\t\t\t\" considered to be close to expiration. Defaults to 30\")"},{"line_number":63,"context_line":"\tcheckCmd.Flags().StringVarP(\u0026contentType, \"output\", \"o\", \"json\", \"convert output to yaml or json, defaults to json\")"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_910ea738","line":60,"range":{"start_line":60,"start_character":28,"end_line":60,"end_character":37},"in_reply_to":"9f560f44_a0000502","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"}],"cmd/secret/resetsatoken/doc.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":12,"context_line":" limitations under the License."},{"line_number":13,"context_line":"*/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"// resetsatoken consists of commands to reset service account(sa) tokens"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"package resetsatoken"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_60670db9","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":72},"updated":"2020-09-04 17:57:33.000000000","message":"Can we add this documentation to the other source code file in this package? We can create a separate file later if we expand on this further.","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":12,"context_line":" limitations under the License."},{"line_number":13,"context_line":"*/"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"// resetsatoken consists of commands to reset service account(sa) tokens"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"package resetsatoken"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_2ee77ae5","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":72},"in_reply_to":"9f560f44_60670db9","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"}],"cmd/secret/resetsatoken/resetsatoken.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\tresetsatoken \"opendev.org/airship/airshipctl/pkg/secret/resetsatoken\""},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"// NewResetCommand creates a new command for generating secret information"},{"line_number":29,"context_line":"func NewResetCommand(rootSettings *environment.AirshipCTLSettings, factory client.Factory) *cobra.Command {"},{"line_number":30,"context_line":"\tvar namespace, secretName string"},{"line_number":31,"context_line":"\tresetCmd :\u003d \u0026cobra.Command{"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_80498161","line":28,"range":{"start_line":28,"start_character":3,"end_line":28,"end_character":18},"updated":"2020-09-04 17:57:33.000000000","message":"Like the check command, I also think this belongs under cluster.","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\tresetsatoken \"opendev.org/airship/airshipctl/pkg/secret/resetsatoken\""},{"line_number":26,"context_line":")"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"// NewResetCommand creates a new command for generating secret information"},{"line_number":29,"context_line":"func NewResetCommand(rootSettings *environment.AirshipCTLSettings, factory client.Factory) *cobra.Command {"},{"line_number":30,"context_line":"\tvar namespace, secretName string"},{"line_number":31,"context_line":"\tresetCmd :\u003d \u0026cobra.Command{"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_6c069a1e","line":28,"range":{"start_line":28,"start_character":3,"end_line":28,"end_character":18},"in_reply_to":"9f560f44_80498161","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\tresetCmd.Flags().StringVar(\u0026secretName, \"secret-name\", \"\","},{"line_number":57,"context_line":"\t\t\"name of the secret containing Service Account Token\")"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\terr :\u003d resetCmd.MarkFlagRequired(\"namespace\")"},{"line_number":60,"context_line":"\tif err !\u003d nil {"},{"line_number":61,"context_line":"\t\tlog.Fatal(err)"},{"line_number":62,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_c074199f","line":59,"range":{"start_line":59,"start_character":8,"end_line":59,"end_character":46},"updated":"2020-09-04 17:57:33.000000000","message":"nit: this flag is long. Could we also get a shorthand \"-n\"?","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":56,"context_line":"\tresetCmd.Flags().StringVar(\u0026secretName, \"secret-name\", \"\","},{"line_number":57,"context_line":"\t\t\"name of the secret containing Service Account Token\")"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"\terr :\u003d resetCmd.MarkFlagRequired(\"namespace\")"},{"line_number":60,"context_line":"\tif err !\u003d nil {"},{"line_number":61,"context_line":"\t\tlog.Fatal(err)"},{"line_number":62,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_4c091629","line":59,"range":{"start_line":59,"start_character":8,"end_line":59,"end_character":46},"in_reply_to":"9f560f44_c074199f","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"\t\tlog.Fatal(err)"},{"line_number":62,"context_line":"\t}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"\terr \u003d resetCmd.MarkFlagRequired(\"secret-name\")"},{"line_number":65,"context_line":"\tif err !\u003d nil {"},{"line_number":66,"context_line":"\t\tlog.Fatal(err)"},{"line_number":67,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_a077659f","line":64,"range":{"start_line":64,"start_character":7,"end_line":64,"end_character":47},"updated":"2020-09-04 17:57:33.000000000","message":"Same for this flag.","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":61,"context_line":"\t\tlog.Fatal(err)"},{"line_number":62,"context_line":"\t}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"\terr \u003d resetCmd.MarkFlagRequired(\"secret-name\")"},{"line_number":65,"context_line":"\tif err !\u003d nil {"},{"line_number":66,"context_line":"\t\tlog.Fatal(err)"},{"line_number":67,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_ac13925b","line":64,"range":{"start_line":64,"start_character":7,"end_line":64,"end_character":47},"in_reply_to":"9f560f44_a077659f","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"}],"cmd/secret/secret.go":[{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"58abb4a71abb97d0be2a9d4e02f0d33e244bdf2b","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"\t\"opendev.org/airship/airshipctl/cmd/secret/generate\""},{"line_number":21,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/config\""},{"line_number":22,"context_line":"\t//\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":23,"context_line":")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"// NewSecretCommand creates a new command for managing airshipctl secrets"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_74274120","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":51},"updated":"2020-09-14 15:59:09.000000000","message":"we can remove this comment now","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"}],"docs/source/cli/airshipctl_secret_checkexpiration.md":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":38,"id":"9f560f44_828c40d8","updated":"2020-09-15 19:55:08.000000000","message":"Was this file hand-written? The documentation in this directory is being generated from the CLI implementation.\n\nThe information here is really good, but it would be nice to see most of this moved into command documentation, and allow our docs generator to handle this file","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"84225250b26ac3e00405635aa03a69fe7a83397d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":38,"id":"9f560f44_491c7fc1","in_reply_to":"9f560f44_828c40d8","updated":"2020-09-23 16:09:43.000000000","message":"To follow up on this: this file is generated by the `make cli-docs` target (and in turn, the `make update-golden` target","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"}],"pkg/cluster/checkexpiration/checkexpiration.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"220978ffec1c2746117c76180bec1b5025b2c0ef","unresolved":false,"context_lines":[{"line_number":23,"context_line":"\t\"time\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\""},{"line_number":26,"context_line":"\t\"k8s.io/client-go/tools/clientcmd\""},{"line_number":27,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/config\""},{"line_number":28,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":29,"context_line":")"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-go","patch_set":33,"id":"9f560f44_c3ef951a","line":27,"range":{"start_line":26,"start_character":0,"end_line":27,"end_character":44},"updated":"2020-09-11 16:34:31.000000000","message":"Space between these 2 lines","commit_id":"abd5251ae090bad052a06f0810057d640bbcaacb"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":30,"context_line":")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"// ExpirationInfo captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":33,"context_line":"type ExpirationInfo struct {"},{"line_number":34,"context_line":"\tTLSSecret []SecretInfo     `json:\"TlsSecret,omitempty\" yaml:\"TlsSecret,omitempty\"`"},{"line_number":35,"context_line":"\tKubeconf  []KubeconfigInfo `json:\"Kubeconf,omitempty\" yaml:\"Kubeconf,omitempty\"`"},{"line_number":36,"context_line":"\tNodeCert  []NodeCertInfo   `json:\"NodeCert,omitempty\" yaml:\"NodeCert,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_cd002904","line":33,"range":{"start_line":33,"start_character":15,"end_line":33,"end_character":19},"updated":"2020-09-15 19:55:08.000000000","message":"This doesn\u0027t add anything. Could we remove the appended \"Infos\" from all of these types?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":30,"context_line":")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"// ExpirationInfo captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":33,"context_line":"type ExpirationInfo struct {"},{"line_number":34,"context_line":"\tTLSSecret []SecretInfo     `json:\"TlsSecret,omitempty\" yaml:\"TlsSecret,omitempty\"`"},{"line_number":35,"context_line":"\tKubeconf  []KubeconfigInfo `json:\"Kubeconf,omitempty\" yaml:\"Kubeconf,omitempty\"`"},{"line_number":36,"context_line":"\tNodeCert  []NodeCertInfo   `json:\"NodeCert,omitempty\" yaml:\"NodeCert,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_110052ab","line":33,"range":{"start_line":33,"start_character":15,"end_line":33,"end_character":19},"in_reply_to":"9f560f44_cd002904","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"// ExpirationInfo captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":33,"context_line":"type ExpirationInfo struct {"},{"line_number":34,"context_line":"\tTLSSecret []SecretInfo     `json:\"TlsSecret,omitempty\" yaml:\"TlsSecret,omitempty\"`"},{"line_number":35,"context_line":"\tKubeconf  []KubeconfigInfo `json:\"Kubeconf,omitempty\" yaml:\"Kubeconf,omitempty\"`"},{"line_number":36,"context_line":"\tNodeCert  []NodeCertInfo   `json:\"NodeCert,omitempty\" yaml:\"NodeCert,omitempty\"`"},{"line_number":37,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_5924df0e","line":34,"range":{"start_line":34,"start_character":35,"end_line":34,"end_character":44},"updated":"2020-09-15 18:12:50.000000000","message":"these all should not start with capital letters","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"// ExpirationInfo captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":33,"context_line":"type ExpirationInfo struct {"},{"line_number":34,"context_line":"\tTLSSecret []SecretInfo     `json:\"TlsSecret,omitempty\" yaml:\"TlsSecret,omitempty\"`"},{"line_number":35,"context_line":"\tKubeconf  []KubeconfigInfo `json:\"Kubeconf,omitempty\" yaml:\"Kubeconf,omitempty\"`"},{"line_number":36,"context_line":"\tNodeCert  []NodeCertInfo   `json:\"NodeCert,omitempty\" yaml:\"NodeCert,omitempty\"`"},{"line_number":37,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_f1fafeb7","line":34,"range":{"start_line":34,"start_character":35,"end_line":34,"end_character":44},"in_reply_to":"9f560f44_5924df0e","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":40,"context_line":"type SecretInfo struct {"},{"line_number":41,"context_line":"\tSecretName      string            `json:\"SecretName,omitempty\" yaml:\"SecretName,omitempty\"`"},{"line_number":42,"context_line":"\tSecretNamespace string            `json:\"SecretNamespace,omitempty\" yaml:\"SecretNamespace,omitempty\"`"},{"line_number":43,"context_line":"\tData            []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":44,"context_line":"}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"// CertificateInfo captures expiration information of all certificates"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_4207c81e","line":43,"range":{"start_line":43,"start_character":1,"end_line":43,"end_character":5},"updated":"2020-09-15 19:55:08.000000000","message":"This would be more meaningful if we called it \"Certificate\"","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":40,"context_line":"type SecretInfo struct {"},{"line_number":41,"context_line":"\tSecretName      string            `json:\"SecretName,omitempty\" yaml:\"SecretName,omitempty\"`"},{"line_number":42,"context_line":"\tSecretNamespace string            `json:\"SecretNamespace,omitempty\" yaml:\"SecretNamespace,omitempty\"`"},{"line_number":43,"context_line":"\tData            []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":44,"context_line":"}"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"// CertificateInfo captures expiration information of all certificates"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_512bea31","line":43,"range":{"start_line":43,"start_character":1,"end_line":43,"end_character":5},"in_reply_to":"9f560f44_4207c81e","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"// CertificateInfo captures expiration information of all certificates"},{"line_number":47,"context_line":"type CertificateInfo struct {"},{"line_number":48,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":49,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":50,"context_line":"}"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_b9637b41","line":48,"range":{"start_line":48,"start_character":1,"end_line":48,"end_character":16},"updated":"2020-09-15 18:12:50.000000000","message":"this should be Name , since it is CertificateInfo , we expect name to be of the certificate, like in ClusterInfo","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"// CertificateInfo captures expiration information of all certificates"},{"line_number":47,"context_line":"type CertificateInfo struct {"},{"line_number":48,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":49,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":50,"context_line":"}"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_312e3642","line":48,"range":{"start_line":48,"start_character":1,"end_line":48,"end_character":16},"in_reply_to":"9f560f44_b9637b41","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"// NodeCertInfo captures certificate expiry information for certificates on the node"},{"line_number":68,"context_line":"type NodeCertInfo struct {"},{"line_number":69,"context_line":"\tNodeName      string            `json:\"NodeName,omitempty\" yaml:\"NodeName,omitempty\"`"},{"line_number":70,"context_line":"\tNodeNamespace string            `json:\"NodeNamespace,omitempty\" yaml:\"NodeNamespace,omitempty\"`"},{"line_number":71,"context_line":"\tData          []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":72,"context_line":"}"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_427068db","line":70,"range":{"start_line":69,"start_character":0,"end_line":70,"end_character":96},"updated":"2020-09-15 19:55:08.000000000","message":"Echoing Kostiantyn\u0027s above sentiment, these should be \"Name\" and \"Namespace\"","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"// NodeCertInfo captures certificate expiry information for certificates on the node"},{"line_number":68,"context_line":"type NodeCertInfo struct {"},{"line_number":69,"context_line":"\tNodeName      string            `json:\"NodeName,omitempty\" yaml:\"NodeName,omitempty\"`"},{"line_number":70,"context_line":"\tNodeNamespace string            `json:\"NodeNamespace,omitempty\" yaml:\"NodeNamespace,omitempty\"`"},{"line_number":71,"context_line":"\tData          []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":72,"context_line":"}"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_9125825f","line":70,"range":{"start_line":69,"start_character":0,"end_line":70,"end_character":96},"in_reply_to":"9f560f44_427068db","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":68,"context_line":"type NodeCertInfo struct {"},{"line_number":69,"context_line":"\tNodeName      string            `json:\"NodeName,omitempty\" yaml:\"NodeName,omitempty\"`"},{"line_number":70,"context_line":"\tNodeNamespace string            `json:\"NodeNamespace,omitempty\" yaml:\"NodeNamespace,omitempty\"`"},{"line_number":71,"context_line":"\tData          []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":72,"context_line":"}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"// SecretExpirationStore manages expiration information for all secrets in the cluster"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_02483085","line":71,"range":{"start_line":71,"start_character":1,"end_line":71,"end_character":5},"updated":"2020-09-15 19:55:08.000000000","message":"ditto: call this Certificate","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":68,"context_line":"type NodeCertInfo struct {"},{"line_number":69,"context_line":"\tNodeName      string            `json:\"NodeName,omitempty\" yaml:\"NodeName,omitempty\"`"},{"line_number":70,"context_line":"\tNodeNamespace string            `json:\"NodeNamespace,omitempty\" yaml:\"NodeNamespace,omitempty\"`"},{"line_number":71,"context_line":"\tData          []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":72,"context_line":"}"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"// SecretExpirationStore manages expiration information for all secrets in the cluster"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_7128ae32","line":71,"range":{"start_line":71,"start_character":1,"end_line":71,"end_character":5},"in_reply_to":"9f560f44_02483085","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":100,"context_line":"}"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"// GetExpiringSecrets checks the expiry data of"},{"line_number":103,"context_line":"//              1. TLS Secrets"},{"line_number":104,"context_line":"//              2. Workload Cluster kubeconfig secret"},{"line_number":105,"context_line":"//              3. Workload node Certificates"},{"line_number":106,"context_line":"func (store *SecretExpirationStore) GetExpiringSecrets(expirationThreshold string) (*ExpirationInfo, error) {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_c21bd87d","line":103,"range":{"start_line":103,"start_character":3,"end_line":103,"end_character":16},"updated":"2020-09-15 19:55:08.000000000","message":"nit: this is a lot of space. I think just 1 space should suffice","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":100,"context_line":"}"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"// GetExpiringSecrets checks the expiry data of"},{"line_number":103,"context_line":"//              1. TLS Secrets"},{"line_number":104,"context_line":"//              2. Workload Cluster kubeconfig secret"},{"line_number":105,"context_line":"//              3. Workload node Certificates"},{"line_number":106,"context_line":"func (store *SecretExpirationStore) GetExpiringSecrets(expirationThreshold string) (*ExpirationInfo, error) {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_d11eda0b","line":103,"range":{"start_line":103,"start_character":3,"end_line":103,"end_character":16},"in_reply_to":"9f560f44_c21bd87d","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":103,"context_line":"//              1. TLS Secrets"},{"line_number":104,"context_line":"//              2. Workload Cluster kubeconfig secret"},{"line_number":105,"context_line":"//              3. Workload node Certificates"},{"line_number":106,"context_line":"func (store *SecretExpirationStore) GetExpiringSecrets(expirationThreshold string) (*ExpirationInfo, error) {"},{"line_number":107,"context_line":"\tvar err error"},{"line_number":108,"context_line":"\tvar et int"},{"line_number":109,"context_line":"\tif expirationThreshold \u003d\u003d \"-1\" {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_02167056","line":106,"range":{"start_line":106,"start_character":75,"end_line":106,"end_character":81},"updated":"2020-09-15 19:55:08.000000000","message":"should be an int","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":103,"context_line":"//              1. TLS Secrets"},{"line_number":104,"context_line":"//              2. Workload Cluster kubeconfig secret"},{"line_number":105,"context_line":"//              3. Workload node Certificates"},{"line_number":106,"context_line":"func (store *SecretExpirationStore) GetExpiringSecrets(expirationThreshold string) (*ExpirationInfo, error) {"},{"line_number":107,"context_line":"\tvar err error"},{"line_number":108,"context_line":"\tvar et int"},{"line_number":109,"context_line":"\tif expirationThreshold \u003d\u003d \"-1\" {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_62212cb6","line":106,"range":{"start_line":106,"start_character":84,"end_line":106,"end_character":99},"updated":"2020-09-15 19:55:08.000000000","message":"this function shouldn\u0027t return a pointer","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":103,"context_line":"//              1. TLS Secrets"},{"line_number":104,"context_line":"//              2. Workload Cluster kubeconfig secret"},{"line_number":105,"context_line":"//              3. Workload node Certificates"},{"line_number":106,"context_line":"func (store *SecretExpirationStore) GetExpiringSecrets(expirationThreshold string) (*ExpirationInfo, error) {"},{"line_number":107,"context_line":"\tvar err error"},{"line_number":108,"context_line":"\tvar et int"},{"line_number":109,"context_line":"\tif expirationThreshold \u003d\u003d \"-1\" {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_b119a624","line":106,"range":{"start_line":106,"start_character":75,"end_line":106,"end_character":81},"in_reply_to":"9f560f44_02167056","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"// getExpiringTLSCertificates - to check the expiry of TLS Secrets"},{"line_number":142,"context_line":"func (store *SecretExpirationStore) getExpiringTLSCertificates(expirationThreshold int) ([]SecretInfo, error) {"},{"line_number":143,"context_line":"\ttlsType :\u003d \"kubernetes.io/tls\""},{"line_number":144,"context_line":"\tsecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\")."},{"line_number":145,"context_line":"\t\tList(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", tlsType)})"},{"line_number":146,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_7c71d144","line":143,"range":{"start_line":143,"start_character":13,"end_line":143,"end_character":30},"updated":"2020-09-15 18:12:50.000000000","message":"use this variable instead from corev1 https://github.com/kubernetes/api/blob/master/core/v1/types.go#L5721","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"// getExpiringTLSCertificates - to check the expiry of TLS Secrets"},{"line_number":142,"context_line":"func (store *SecretExpirationStore) getExpiringTLSCertificates(expirationThreshold int) ([]SecretInfo, error) {"},{"line_number":143,"context_line":"\ttlsType :\u003d \"kubernetes.io/tls\""},{"line_number":144,"context_line":"\tsecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\")."},{"line_number":145,"context_line":"\t\tList(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", tlsType)})"},{"line_number":146,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_51d00a2c","line":143,"range":{"start_line":143,"start_character":13,"end_line":143,"end_character":30},"in_reply_to":"9f560f44_7c71d144","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"\ttlsData :\u003d make([]SecretInfo, 0)"},{"line_number":151,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":152,"context_line":"\t\tsecretData :\u003d make([]CertificateInfo, 0)"},{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_4d3539db","line":152,"range":{"start_line":152,"start_character":2,"end_line":152,"end_character":12},"updated":"2020-09-15 19:55:08.000000000","message":"Let\u0027s call this \"expiringSecrets\"","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":149,"context_line":""},{"line_number":150,"context_line":"\ttlsData :\u003d make([]SecretInfo, 0)"},{"line_number":151,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":152,"context_line":"\t\tsecretData :\u003d make([]CertificateInfo, 0)"},{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_31d3d639","line":152,"range":{"start_line":152,"start_character":2,"end_line":152,"end_character":12},"in_reply_to":"9f560f44_4d3539db","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":150,"context_line":"\ttlsData :\u003d make([]SecretInfo, 0)"},{"line_number":151,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":152,"context_line":"\t\tsecretData :\u003d make([]CertificateInfo, 0)"},{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":156,"context_line":"\t\t\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_bcdec90d","line":153,"range":{"start_line":153,"start_character":16,"end_line":153,"end_character":27},"updated":"2020-09-15 18:12:50.000000000","message":"shouldn\u0027t we check if the field actually exists in the map cert, ok :\u003d secret.Data[\"tls.crt\"] \nif ... ?\n\nalso use these constants instead https://github.com/kubernetes/api/blob/master/core/v1/types.go#L5724-L5726","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":150,"context_line":"\ttlsData :\u003d make([]SecretInfo, 0)"},{"line_number":151,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":152,"context_line":"\t\tsecretData :\u003d make([]CertificateInfo, 0)"},{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":156,"context_line":"\t\t\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_91daa248","line":153,"range":{"start_line":153,"start_character":16,"end_line":153,"end_character":27},"in_reply_to":"9f560f44_bcdec90d","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":151,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":152,"context_line":"\t\tsecretData :\u003d make([]CertificateInfo, 0)"},{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":156,"context_line":"\t\t\t\treturn nil, err"},{"line_number":157,"context_line":"\t\t\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_0d598134","line":154,"range":{"start_line":154,"start_character":3,"end_line":154,"end_character":9},"updated":"2020-09-15 19:55:08.000000000","message":"this would make more sense as \"isExpiring\"","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":151,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":152,"context_line":"\t\tsecretData :\u003d make([]CertificateInfo, 0)"},{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":156,"context_line":"\t\t\t\treturn nil, err"},{"line_number":157,"context_line":"\t\t\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_d1e37a05","line":154,"range":{"start_line":154,"start_character":3,"end_line":154,"end_character":9},"in_reply_to":"9f560f44_0d598134","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":156,"context_line":"\t\t\t\treturn nil, err"},{"line_number":157,"context_line":"\t\t\t}"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_a76a367e","line":156,"range":{"start_line":156,"start_character":4,"end_line":156,"end_character":19},"updated":"2020-09-15 18:12:50.000000000","message":"looks like one malformed secret would make the whole command not functional. Shouldn\u0027t we rather do continue, and print secret id and error, alternatively save all errors to : [SecretID]error map, and print it later?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":153,"context_line":"\t\tif secret.Data[\"tls.crt\"] !\u003d nil {"},{"line_number":154,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"tls.crt\"], expirationThreshold)"},{"line_number":155,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":156,"context_line":"\t\t\t\treturn nil, err"},{"line_number":157,"context_line":"\t\t\t}"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_71b6eefb","line":156,"range":{"start_line":156,"start_character":4,"end_line":156,"end_character":19},"in_reply_to":"9f560f44_a76a367e","updated":"2020-09-17 14:12:56.000000000","message":"Initial version done. its WIP","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":165,"context_line":"\t\t\t}"},{"line_number":166,"context_line":"\t\t}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"\t\tif secret.Data[\"ca.crt\"] !\u003d nil {"},{"line_number":169,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"ca.crt\"], expirationThreshold)"},{"line_number":170,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":171,"context_line":"\t\t\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_1ce415e0","line":168,"range":{"start_line":168,"start_character":5,"end_line":168,"end_character":26},"updated":"2020-09-15 18:12:50.000000000","message":"same here","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":165,"context_line":"\t\t\t}"},{"line_number":166,"context_line":"\t\t}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"\t\tif secret.Data[\"ca.crt\"] !\u003d nil {"},{"line_number":169,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"ca.crt\"], expirationThreshold)"},{"line_number":170,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":171,"context_line":"\t\t\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_d1cc1a8c","line":168,"range":{"start_line":168,"start_character":5,"end_line":168,"end_character":26},"in_reply_to":"9f560f44_1ce415e0","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":168,"context_line":"\t\tif secret.Data[\"ca.crt\"] !\u003d nil {"},{"line_number":169,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"ca.crt\"], expirationThreshold)"},{"line_number":170,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":171,"context_line":"\t\t\t\treturn nil, err"},{"line_number":172,"context_line":"\t\t\t}"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_c7064ace","line":171,"range":{"start_line":171,"start_character":4,"end_line":171,"end_character":19},"updated":"2020-09-15 18:12:50.000000000","message":"looks like one malformed secret would make the whole command not functional. Shouldn\u0027t we rather do continue, and print secret id and error, alternatively save all errors to : [SecretID]error map, and print it later?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":168,"context_line":"\t\tif secret.Data[\"ca.crt\"] !\u003d nil {"},{"line_number":169,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"ca.crt\"], expirationThreshold)"},{"line_number":170,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":171,"context_line":"\t\t\t\treturn nil, err"},{"line_number":172,"context_line":"\t\t\t}"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_b1c7e665","line":171,"range":{"start_line":171,"start_character":4,"end_line":171,"end_character":19},"in_reply_to":"9f560f44_c7064ace","updated":"2020-09-17 14:12:56.000000000","message":"WIP","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":165,"context_line":"\t\t\t}"},{"line_number":166,"context_line":"\t\t}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"\t\tif secret.Data[\"ca.crt\"] !\u003d nil {"},{"line_number":169,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"ca.crt\"], expirationThreshold)"},{"line_number":170,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":171,"context_line":"\t\t\t\treturn nil, err"},{"line_number":172,"context_line":"\t\t\t}"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"\t\t\tif expiry {"},{"line_number":175,"context_line":"\t\t\t\tcertificateinfo :\u003d CertificateInfo{"},{"line_number":176,"context_line":"\t\t\t\t\tCertificateName: \"ca.crt\","},{"line_number":177,"context_line":"\t\t\t\t\tExpiryDate:      notAfter,"},{"line_number":178,"context_line":"\t\t\t\t}"},{"line_number":179,"context_line":"\t\t\t\tsecretData \u003d append(secretData, certificateinfo)"},{"line_number":180,"context_line":"\t\t\t}"},{"line_number":181,"context_line":"\t\t}"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"\t\tif len(secretData) \u003e 0 {"},{"line_number":184,"context_line":"\t\t\tsecretinfo :\u003d SecretInfo{"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_cd85c95b","line":181,"range":{"start_line":168,"start_character":0,"end_line":181,"end_character":3},"updated":"2020-09-15 19:55:08.000000000","message":"This whole section is nearly identical to the section above - could we factor this out into a helper function?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":165,"context_line":"\t\t\t}"},{"line_number":166,"context_line":"\t\t}"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"\t\tif secret.Data[\"ca.crt\"] !\u003d nil {"},{"line_number":169,"context_line":"\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold(secret.Data[\"ca.crt\"], expirationThreshold)"},{"line_number":170,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":171,"context_line":"\t\t\t\treturn nil, err"},{"line_number":172,"context_line":"\t\t\t}"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"\t\t\tif expiry {"},{"line_number":175,"context_line":"\t\t\t\tcertificateinfo :\u003d CertificateInfo{"},{"line_number":176,"context_line":"\t\t\t\t\tCertificateName: \"ca.crt\","},{"line_number":177,"context_line":"\t\t\t\t\tExpiryDate:      notAfter,"},{"line_number":178,"context_line":"\t\t\t\t}"},{"line_number":179,"context_line":"\t\t\t\tsecretData \u003d append(secretData, certificateinfo)"},{"line_number":180,"context_line":"\t\t\t}"},{"line_number":181,"context_line":"\t\t}"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"\t\tif len(secretData) \u003e 0 {"},{"line_number":184,"context_line":"\t\t\tsecretinfo :\u003d SecretInfo{"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_f1c15e50","line":181,"range":{"start_line":168,"start_character":0,"end_line":181,"end_character":3},"in_reply_to":"9f560f44_cd85c95b","updated":"2020-09-17 14:12:56.000000000","message":"Created a helper function as suggested","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":193,"context_line":"}"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"// checkKubeConfigs - fetches all the -kubeconfig secrets and identifies the expiry"},{"line_number":196,"context_line":"func (store *SecretExpirationStore) checkKubeConfigs(expirationThreshold int) ([]KubeconfigInfo, error) {"},{"line_number":197,"context_line":"\tkSecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\").List(metav1.ListOptions{})"},{"line_number":198,"context_line":"\tif err !\u003d nil {"},{"line_number":199,"context_line":"\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_6dd91d83","line":196,"updated":"2020-09-15 19:55:08.000000000","message":"this function needs to be simplified. Nesting here is far too deep","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":193,"context_line":"}"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"// checkKubeConfigs - fetches all the -kubeconfig secrets and identifies the expiry"},{"line_number":196,"context_line":"func (store *SecretExpirationStore) checkKubeConfigs(expirationThreshold int) ([]KubeconfigInfo, error) {"},{"line_number":197,"context_line":"\tkSecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\").List(metav1.ListOptions{})"},{"line_number":198,"context_line":"\tif err !\u003d nil {"},{"line_number":199,"context_line":"\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_51876a13","line":196,"in_reply_to":"9f560f44_6dd91d83","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":215,"context_line":"\t\t\t\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold("},{"line_number":216,"context_line":"\t\t\t\t\t\t\tclusterData.CertificateAuthorityData, expirationThreshold)"},{"line_number":217,"context_line":"\t\t\t\t\t\tif err !\u003d nil {"},{"line_number":218,"context_line":"\t\t\t\t\t\t\treturn nil, err"},{"line_number":219,"context_line":"\t\t\t\t\t\t}"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"\t\t\t\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_e7cf0e89","line":218,"range":{"start_line":218,"start_character":7,"end_line":218,"end_character":22},"updated":"2020-09-15 18:12:50.000000000","message":"same with errors/continues","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":215,"context_line":"\t\t\t\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold("},{"line_number":216,"context_line":"\t\t\t\t\t\t\tclusterData.CertificateAuthorityData, expirationThreshold)"},{"line_number":217,"context_line":"\t\t\t\t\t\tif err !\u003d nil {"},{"line_number":218,"context_line":"\t\t\t\t\t\t\treturn nil, err"},{"line_number":219,"context_line":"\t\t\t\t\t\t}"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"\t\t\t\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_91af427c","line":218,"range":{"start_line":218,"start_character":7,"end_line":218,"end_character":22},"in_reply_to":"9f560f44_e7cf0e89","updated":"2020-09-17 14:12:56.000000000","message":"WIP","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":234,"context_line":"\t\t\t\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold("},{"line_number":235,"context_line":"\t\t\t\t\t\t\tuserData.ClientCertificateData, expirationThreshold)"},{"line_number":236,"context_line":"\t\t\t\t\t\tif err !\u003d nil {"},{"line_number":237,"context_line":"\t\t\t\t\t\t\treturn nil, err"},{"line_number":238,"context_line":"\t\t\t\t\t\t}"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"\t\t\t\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_67e3fe07","line":237,"range":{"start_line":237,"start_character":7,"end_line":237,"end_character":22},"updated":"2020-09-15 18:12:50.000000000","message":"same with errors/continues","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":234,"context_line":"\t\t\t\t\t\texpiry, notAfter, err :\u003d certExpiryWithinThreshold("},{"line_number":235,"context_line":"\t\t\t\t\t\t\tuserData.ClientCertificateData, expirationThreshold)"},{"line_number":236,"context_line":"\t\t\t\t\t\tif err !\u003d nil {"},{"line_number":237,"context_line":"\t\t\t\t\t\t\treturn nil, err"},{"line_number":238,"context_line":"\t\t\t\t\t\t}"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"\t\t\t\t\t\tif expiry {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_9132a25d","line":237,"range":{"start_line":237,"start_character":7,"end_line":237,"end_character":22},"in_reply_to":"9f560f44_67e3fe07","updated":"2020-09-17 14:12:56.000000000","message":"WIP. Now used log.Print()","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":265,"context_line":"}"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"// checkWorkloadNodes - checks the expiry of certificates in the Workload control plane nodes"},{"line_number":268,"context_line":"func (store *SecretExpirationStore) checkWorkloadNodes(expirationThreshold int) ([]NodeCertInfo, error) {"},{"line_number":269,"context_line":"\t// Node will be updated with an annotation with the expiry content (Activity of HostConfig Operator -"},{"line_number":270,"context_line":"\t// \u0027check-expiry\u0027 CR Object) every day (Cron like activity is performed by reconcile tag in the Operator)"},{"line_number":271,"context_line":"\t// Below code is implemented to just read the annotation, parse it, identify expirable content and report back"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ed5c0df2","line":268,"updated":"2020-09-15 19:55:08.000000000","message":"likewise, please simplify this function","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"c4064e92563459bcf541b6ffca4d015732e3879d","unresolved":false,"context_lines":[{"line_number":285,"context_line":"\t\t\t\tcData :\u003d strings.TrimSpace(strings.Split(v, \":\")[1]) +"},{"line_number":286,"context_line":"\t\t\t\t\t\":\" +"},{"line_number":287,"context_line":"\t\t\t\t\tstrings.TrimSpace(strings.ReplaceAll(strings.Split(v, \":\")[2], \"}\", \"\"))"},{"line_number":288,"context_line":"\t\t\t\tfdate, err :\u003d time.Parse(\"Jan 02, 2006 15:04 MST\", cData)"},{"line_number":289,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":290,"context_line":"\t\t\t\t\treturn nil, err"},{"line_number":291,"context_line":"\t\t\t\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_07ade29a","line":288,"range":{"start_line":288,"start_character":28,"end_line":288,"end_character":54},"updated":"2020-09-15 18:12:50.000000000","message":"why is this hardcoded?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":285,"context_line":"\t\t\t\tcData :\u003d strings.TrimSpace(strings.Split(v, \":\")[1]) +"},{"line_number":286,"context_line":"\t\t\t\t\t\":\" +"},{"line_number":287,"context_line":"\t\t\t\t\tstrings.TrimSpace(strings.ReplaceAll(strings.Split(v, \":\")[2], \"}\", \"\"))"},{"line_number":288,"context_line":"\t\t\t\tfdate, err :\u003d time.Parse(\"Jan 02, 2006 15:04 MST\", cData)"},{"line_number":289,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":290,"context_line":"\t\t\t\t\treturn nil, err"},{"line_number":291,"context_line":"\t\t\t\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_71354e45","line":288,"range":{"start_line":288,"start_character":28,"end_line":288,"end_character":54},"in_reply_to":"9f560f44_07ade29a","updated":"2020-09-17 14:12:56.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":326,"context_line":"}"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"// isWithinDuration checks if the certificate NotAfter is within the duration (input)"},{"line_number":329,"context_line":"func isWithinDuration(notAfter time.Time, duration int) bool {"},{"line_number":330,"context_line":"\tdiffTime :\u003d notAfter.Sub(time.Now())"},{"line_number":331,"context_line":"\tif duration \u003d\u003d -1 {"},{"line_number":332,"context_line":"\t\treturn true"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ed01adb7","line":329,"range":{"start_line":329,"start_character":51,"end_line":329,"end_character":54},"updated":"2020-09-15 19:55:08.000000000","message":"this should probably be time.Duration","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"5b1ba0a1fbd361ab0cbd2a5a25d18ee115b798e4","unresolved":false,"context_lines":[{"line_number":326,"context_line":"}"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"// isWithinDuration checks if the certificate NotAfter is within the duration (input)"},{"line_number":329,"context_line":"func isWithinDuration(notAfter time.Time, duration int) bool {"},{"line_number":330,"context_line":"\tdiffTime :\u003d notAfter.Sub(time.Now())"},{"line_number":331,"context_line":"\tif duration \u003d\u003d -1 {"},{"line_number":332,"context_line":"\t\treturn true"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_f1eb1ea1","line":329,"range":{"start_line":329,"start_character":51,"end_line":329,"end_character":54},"in_reply_to":"9f560f44_ed01adb7","updated":"2020-09-17 14:12:56.000000000","message":"This is actually the user input (threshold) and hence maintained as int. Please advice","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"// Expiration captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":44,"context_line":"type Expiration struct {"},{"line_number":45,"context_line":"\tTLSSecret []Secret     `json:\"tlsSecret,omitempty\" yaml:\"tlsSecret,omitempty\"`"},{"line_number":46,"context_line":"\tKubeconf  []Kubeconfig `json:\"kubeconf,omitempty\" yaml:\"kubeconf,omitempty\"`"},{"line_number":47,"context_line":"\tNodeCert  []NodeCert   `json:\"nodeCert,omitempty\" yaml:\"nodeCert,omitempty\"`"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_09b0c78a","line":45,"range":{"start_line":45,"start_character":1,"end_line":45,"end_character":10},"updated":"2020-09-23 16:53:07.000000000","message":"Since these members are slices, they should probably be pluralized","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"// Expiration captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":44,"context_line":"type Expiration struct {"},{"line_number":45,"context_line":"\tTLSSecret []Secret     `json:\"tlsSecret,omitempty\" yaml:\"tlsSecret,omitempty\"`"},{"line_number":46,"context_line":"\tKubeconf  []Kubeconfig `json:\"kubeconf,omitempty\" yaml:\"kubeconf,omitempty\"`"},{"line_number":47,"context_line":"\tNodeCert  []NodeCert   `json:\"nodeCert,omitempty\" yaml:\"nodeCert,omitempty\"`"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_49a63f56","line":45,"range":{"start_line":45,"start_character":25,"end_line":45,"end_character":77},"updated":"2020-09-23 16:53:07.000000000","message":"same for the json/yaml","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"// Expiration captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":44,"context_line":"type Expiration struct {"},{"line_number":45,"context_line":"\tTLSSecret []Secret     `json:\"tlsSecret,omitempty\" yaml:\"tlsSecret,omitempty\"`"},{"line_number":46,"context_line":"\tKubeconf  []Kubeconfig `json:\"kubeconf,omitempty\" yaml:\"kubeconf,omitempty\"`"},{"line_number":47,"context_line":"\tNodeCert  []NodeCert   `json:\"nodeCert,omitempty\" yaml:\"nodeCert,omitempty\"`"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_9827ec12","line":45,"range":{"start_line":45,"start_character":1,"end_line":45,"end_character":10},"in_reply_to":"9f560f44_09b0c78a","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"// Expiration captures expiration information of all secrets, certificates and kubeconfigs"},{"line_number":44,"context_line":"type Expiration struct {"},{"line_number":45,"context_line":"\tTLSSecret []Secret     `json:\"tlsSecret,omitempty\" yaml:\"tlsSecret,omitempty\"`"},{"line_number":46,"context_line":"\tKubeconf  []Kubeconfig `json:\"kubeconf,omitempty\" yaml:\"kubeconf,omitempty\"`"},{"line_number":47,"context_line":"\tNodeCert  []NodeCert   `json:\"nodeCert,omitempty\" yaml:\"nodeCert,omitempty\"`"},{"line_number":48,"context_line":"}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_7822d802","line":45,"range":{"start_line":45,"start_character":25,"end_line":45,"end_character":77},"in_reply_to":"9f560f44_49a63f56","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":89,"context_line":"}"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"// NewStore returns an instance of a SecretExpirationStore"},{"line_number":92,"context_line":"func NewStore(cfgFactory config.Factory, factory client.Factory) (*SecretExpirationStore, error) {"},{"line_number":93,"context_line":"\tairshipconfig, err :\u003d cfgFactory()"},{"line_number":94,"context_line":"\tif err !\u003d nil {"},{"line_number":95,"context_line":"\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_a96c3b07","line":92,"range":{"start_line":92,"start_character":66,"end_line":92,"end_character":89},"updated":"2020-09-23 16:53:07.000000000","message":"this doesn\u0027t need to be a pointer","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":89,"context_line":"}"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"// NewStore returns an instance of a SecretExpirationStore"},{"line_number":92,"context_line":"func NewStore(cfgFactory config.Factory, factory client.Factory) (*SecretExpirationStore, error) {"},{"line_number":93,"context_line":"\tairshipconfig, err :\u003d cfgFactory()"},{"line_number":94,"context_line":"\tif err !\u003d nil {"},{"line_number":95,"context_line":"\t\treturn nil, err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_b818f0cc","line":92,"range":{"start_line":92,"start_character":66,"end_line":92,"end_character":89},"in_reply_to":"9f560f44_a96c3b07","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":114,"context_line":"//  1. TLS Secrets"},{"line_number":115,"context_line":"//  2. Workload Cluster kubeconfig secret"},{"line_number":116,"context_line":"//  3. Workload node Certificates"},{"line_number":117,"context_line":"func (store SecretExpirationStore) GetExpiringSecrets(expirationThreshold int) (*Expiration, error) {"},{"line_number":118,"context_line":"\ttlsData :\u003d store.getExpiringTLSCertificates(expirationThreshold)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"\tkSecretData :\u003d store.checkKubeConfigs(expirationThreshold)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_894a1780","line":117,"range":{"start_line":117,"start_character":79,"end_line":117,"end_character":91},"updated":"2020-09-23 16:53:07.000000000","message":"likewise","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":114,"context_line":"//  1. TLS Secrets"},{"line_number":115,"context_line":"//  2. Workload Cluster kubeconfig secret"},{"line_number":116,"context_line":"//  3. Workload node Certificates"},{"line_number":117,"context_line":"func (store SecretExpirationStore) GetExpiringSecrets(expirationThreshold int) (*Expiration, error) {"},{"line_number":118,"context_line":"\ttlsData :\u003d store.getExpiringTLSCertificates(expirationThreshold)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"\tkSecretData :\u003d store.checkKubeConfigs(expirationThreshold)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_18791cfb","line":117,"range":{"start_line":117,"start_character":79,"end_line":117,"end_character":91},"in_reply_to":"9f560f44_894a1780","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":132,"context_line":"func (store SecretExpirationStore) getExpiringTLSCertificates(expirationThreshold int) []Secret {"},{"line_number":133,"context_line":"\tsecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\")."},{"line_number":134,"context_line":"\t\tList(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", corev1.SecretTypeTLS)})"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"\tif err !\u003d nil {"},{"line_number":137,"context_line":"\t\tlog.Print(tlsErrorPrefix, err.Error())"},{"line_number":138,"context_line":"\t\treturn nil"},{"line_number":139,"context_line":"\t}"},{"line_number":140,"context_line":"\ttlsData :\u003d make([]Secret, 0)"},{"line_number":141,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":142,"context_line":"\t\texpiringSecrets :\u003d make([]Certificate, 0)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_095e0744","line":139,"range":{"start_line":135,"start_character":0,"end_line":139,"end_character":2},"updated":"2020-09-23 16:53:07.000000000","message":"perhaps we should be returning this error","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":132,"context_line":"func (store SecretExpirationStore) getExpiringTLSCertificates(expirationThreshold int) []Secret {"},{"line_number":133,"context_line":"\tsecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\")."},{"line_number":134,"context_line":"\t\tList(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", corev1.SecretTypeTLS)})"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"\tif err !\u003d nil {"},{"line_number":137,"context_line":"\t\tlog.Print(tlsErrorPrefix, err.Error())"},{"line_number":138,"context_line":"\t\treturn nil"},{"line_number":139,"context_line":"\t}"},{"line_number":140,"context_line":"\ttlsData :\u003d make([]Secret, 0)"},{"line_number":141,"context_line":"\tfor _, secret :\u003d range secrets.Items {"},{"line_number":142,"context_line":"\t\texpiringSecrets :\u003d make([]Certificate, 0)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_587f14de","line":139,"range":{"start_line":135,"start_character":0,"end_line":139,"end_character":2},"in_reply_to":"9f560f44_095e0744","updated":"2020-09-24 11:24:39.000000000","message":"As per earlier suggestions from Kostiantyn, have worked on the changes to just log the error back as the code is expected to continue for the rest of the logic and hence not returning and processing the error","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":172,"context_line":"\treturn tlsData"},{"line_number":173,"context_line":"}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"// checkKubeConfigs - fetches all the -kubeconfig secrets and identifies the expiry"},{"line_number":176,"context_line":"func (store SecretExpirationStore) checkKubeConfigs(expirationThreshold int) []Kubeconfig {"},{"line_number":177,"context_line":"\tkSecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\").List(metav1.ListOptions{})"},{"line_number":178,"context_line":"\tif err !\u003d nil {"},{"line_number":179,"context_line":"\t\tlog.Print(kubeconfErrorPrefix, err.Error())"},{"line_number":180,"context_line":"\t\treturn nil"},{"line_number":181,"context_line":"\t}"},{"line_number":182,"context_line":"\tkSecretData :\u003d make([]Kubeconfig, 0)"},{"line_number":183,"context_line":"\tfor _, kSecret :\u003d range kSecrets.Items {"},{"line_number":184,"context_line":"\t\tif strings.HasSuffix(kSecret.Name, kubeconfigIdentifierSuffix) {"},{"line_number":185,"context_line":"\t\t\tfor ownerref :\u003d range kSecret.OwnerReferences {"},{"line_number":186,"context_line":"\t\t\t\tif kSecret.OwnerReferences[ownerref].Kind \u003d\u003d \"KubeadmControlPlane\" {"},{"line_number":187,"context_line":"\t\t\t\t\tkubecontent, err :\u003d clientcmd.Load(kSecret.Data[\"value\"])"},{"line_number":188,"context_line":"\t\t\t\t\tif err !\u003d nil {"},{"line_number":189,"context_line":"\t\t\t\t\t\tlog.Print(kubeconfErrorPrefix, \"for \", kSecret.Name, \" in \", kSecret.Namespace, \" namespace: \", err.Error())"},{"line_number":190,"context_line":"\t\t\t\t\t} else {"},{"line_number":191,"context_line":"\t\t\t\t\t\tclusterDat :\u003d make([]Cluster, 0)"},{"line_number":192,"context_line":"\t\t\t\t\t\t// Iterate through each Cluster and identify expiry"},{"line_number":193,"context_line":"\t\t\t\t\t\tfor clusterName, clusterData :\u003d range kubecontent.Clusters {"},{"line_number":194,"context_line":"\t\t\t\t\t\t\tclusterinfo :\u003d"},{"line_number":195,"context_line":"\t\t\t\t\t\t\t\tcheckKubeConfExpiration(clusterData.CertificateAuthorityData,"},{"line_number":196,"context_line":"\t\t\t\t\t\t\t\t\t\"CertificateAuthorityData\", expirationThreshold, kSecret.Name,"},{"line_number":197,"context_line":"\t\t\t\t\t\t\t\t\tkSecret.Namespace, clusterName)"},{"line_number":198,"context_line":"\t\t\t\t\t\t\tif (Cluster{}) !\u003d clusterinfo {"},{"line_number":199,"context_line":"\t\t\t\t\t\t\t\tclusterDat \u003d append(clusterDat, clusterinfo)"},{"line_number":200,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":201,"context_line":"\t\t\t\t\t\t}"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"\t\t\t\t\t\tuserDat :\u003d make([]Cluster, 0)"},{"line_number":204,"context_line":"\t\t\t\t\t\t// Iterate through each user Certificate and identify expiry"},{"line_number":205,"context_line":"\t\t\t\t\t\tfor userName, userData :\u003d range kubecontent.AuthInfos {"},{"line_number":206,"context_line":"\t\t\t\t\t\t\tuserinfo :\u003d"},{"line_number":207,"context_line":"\t\t\t\t\t\t\t\tcheckKubeConfExpiration(userData.ClientCertificateData,"},{"line_number":208,"context_line":"\t\t\t\t\t\t\t\t\t\"ClientCertificateData\", expirationThreshold, kSecret.Name,"},{"line_number":209,"context_line":"\t\t\t\t\t\t\t\t\tkSecret.Namespace, userName)"},{"line_number":210,"context_line":"\t\t\t\t\t\t\tif (Cluster{}) !\u003d userinfo {"},{"line_number":211,"context_line":"\t\t\t\t\t\t\t\tuserDat \u003d append(userDat, userinfo)"},{"line_number":212,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":213,"context_line":"\t\t\t\t\t\t}"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"\t\t\t\t\t\tif len(clusterDat) \u003e 0 || len(userDat) \u003e 0 {"},{"line_number":216,"context_line":"\t\t\t\t\t\t\tkSecretinfo :\u003d Kubeconfig{"},{"line_number":217,"context_line":"\t\t\t\t\t\t\t\tSecretName:      kSecret.Name,"},{"line_number":218,"context_line":"\t\t\t\t\t\t\t\tSecretNamespace: kSecret.Namespace,"},{"line_number":219,"context_line":"\t\t\t\t\t\t\t\tCluster:         clusterDat,"},{"line_number":220,"context_line":"\t\t\t\t\t\t\t\tUser:            userDat,"},{"line_number":221,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":222,"context_line":"\t\t\t\t\t\t\tkSecretData \u003d append(kSecretData, kSecretinfo)"},{"line_number":223,"context_line":"\t\t\t\t\t\t}"},{"line_number":224,"context_line":"\t\t\t\t\t}"},{"line_number":225,"context_line":"\t\t\t\t}"},{"line_number":226,"context_line":"\t\t\t}"},{"line_number":227,"context_line":"\t\t}"},{"line_number":228,"context_line":"\t}"},{"line_number":229,"context_line":"\treturn kSecretData"},{"line_number":230,"context_line":"}"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"// checkWorkloadNodes - checks the expiry of certificates in the Workload control plane nodes"},{"line_number":233,"context_line":"func (store SecretExpirationStore) checkWorkloadNodes(expirationThreshold int) []NodeCert {"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_c403560b","line":230,"range":{"start_line":175,"start_character":0,"end_line":230,"end_character":1},"updated":"2020-09-23 16:53:07.000000000","message":"This is far too much nesting, I predict that debugging this would be very difficult. Please simplify this function.","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"632ccd80fcd165cd743a28db67aec7ba66a7f215","unresolved":false,"context_lines":[{"line_number":172,"context_line":"\treturn tlsData"},{"line_number":173,"context_line":"}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"// checkKubeConfigs - fetches all the -kubeconfig secrets and identifies the expiry"},{"line_number":176,"context_line":"func (store SecretExpirationStore) checkKubeConfigs(expirationThreshold int) []Kubeconfig {"},{"line_number":177,"context_line":"\tkSecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\").List(metav1.ListOptions{})"},{"line_number":178,"context_line":"\tif err !\u003d nil {"},{"line_number":179,"context_line":"\t\tlog.Print(kubeconfErrorPrefix, err.Error())"},{"line_number":180,"context_line":"\t\treturn nil"},{"line_number":181,"context_line":"\t}"},{"line_number":182,"context_line":"\tkSecretData :\u003d make([]Kubeconfig, 0)"},{"line_number":183,"context_line":"\tfor _, kSecret :\u003d range kSecrets.Items {"},{"line_number":184,"context_line":"\t\tif strings.HasSuffix(kSecret.Name, kubeconfigIdentifierSuffix) {"},{"line_number":185,"context_line":"\t\t\tfor ownerref :\u003d range kSecret.OwnerReferences {"},{"line_number":186,"context_line":"\t\t\t\tif kSecret.OwnerReferences[ownerref].Kind \u003d\u003d \"KubeadmControlPlane\" {"},{"line_number":187,"context_line":"\t\t\t\t\tkubecontent, err :\u003d clientcmd.Load(kSecret.Data[\"value\"])"},{"line_number":188,"context_line":"\t\t\t\t\tif err !\u003d nil {"},{"line_number":189,"context_line":"\t\t\t\t\t\tlog.Print(kubeconfErrorPrefix, \"for \", kSecret.Name, \" in \", kSecret.Namespace, \" namespace: \", err.Error())"},{"line_number":190,"context_line":"\t\t\t\t\t} else {"},{"line_number":191,"context_line":"\t\t\t\t\t\tclusterDat :\u003d make([]Cluster, 0)"},{"line_number":192,"context_line":"\t\t\t\t\t\t// Iterate through each Cluster and identify expiry"},{"line_number":193,"context_line":"\t\t\t\t\t\tfor clusterName, clusterData :\u003d range kubecontent.Clusters {"},{"line_number":194,"context_line":"\t\t\t\t\t\t\tclusterinfo :\u003d"},{"line_number":195,"context_line":"\t\t\t\t\t\t\t\tcheckKubeConfExpiration(clusterData.CertificateAuthorityData,"},{"line_number":196,"context_line":"\t\t\t\t\t\t\t\t\t\"CertificateAuthorityData\", expirationThreshold, kSecret.Name,"},{"line_number":197,"context_line":"\t\t\t\t\t\t\t\t\tkSecret.Namespace, clusterName)"},{"line_number":198,"context_line":"\t\t\t\t\t\t\tif (Cluster{}) !\u003d clusterinfo {"},{"line_number":199,"context_line":"\t\t\t\t\t\t\t\tclusterDat \u003d append(clusterDat, clusterinfo)"},{"line_number":200,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":201,"context_line":"\t\t\t\t\t\t}"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"\t\t\t\t\t\tuserDat :\u003d make([]Cluster, 0)"},{"line_number":204,"context_line":"\t\t\t\t\t\t// Iterate through each user Certificate and identify expiry"},{"line_number":205,"context_line":"\t\t\t\t\t\tfor userName, userData :\u003d range kubecontent.AuthInfos {"},{"line_number":206,"context_line":"\t\t\t\t\t\t\tuserinfo :\u003d"},{"line_number":207,"context_line":"\t\t\t\t\t\t\t\tcheckKubeConfExpiration(userData.ClientCertificateData,"},{"line_number":208,"context_line":"\t\t\t\t\t\t\t\t\t\"ClientCertificateData\", expirationThreshold, kSecret.Name,"},{"line_number":209,"context_line":"\t\t\t\t\t\t\t\t\tkSecret.Namespace, userName)"},{"line_number":210,"context_line":"\t\t\t\t\t\t\tif (Cluster{}) !\u003d userinfo {"},{"line_number":211,"context_line":"\t\t\t\t\t\t\t\tuserDat \u003d append(userDat, userinfo)"},{"line_number":212,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":213,"context_line":"\t\t\t\t\t\t}"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"\t\t\t\t\t\tif len(clusterDat) \u003e 0 || len(userDat) \u003e 0 {"},{"line_number":216,"context_line":"\t\t\t\t\t\t\tkSecretinfo :\u003d Kubeconfig{"},{"line_number":217,"context_line":"\t\t\t\t\t\t\t\tSecretName:      kSecret.Name,"},{"line_number":218,"context_line":"\t\t\t\t\t\t\t\tSecretNamespace: kSecret.Namespace,"},{"line_number":219,"context_line":"\t\t\t\t\t\t\t\tCluster:         clusterDat,"},{"line_number":220,"context_line":"\t\t\t\t\t\t\t\tUser:            userDat,"},{"line_number":221,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":222,"context_line":"\t\t\t\t\t\t\tkSecretData \u003d append(kSecretData, kSecretinfo)"},{"line_number":223,"context_line":"\t\t\t\t\t\t}"},{"line_number":224,"context_line":"\t\t\t\t\t}"},{"line_number":225,"context_line":"\t\t\t\t}"},{"line_number":226,"context_line":"\t\t\t}"},{"line_number":227,"context_line":"\t\t}"},{"line_number":228,"context_line":"\t}"},{"line_number":229,"context_line":"\treturn kSecretData"},{"line_number":230,"context_line":"}"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"// checkWorkloadNodes - checks the expiry of certificates in the Workload control plane nodes"},{"line_number":233,"context_line":"func (store SecretExpirationStore) checkWorkloadNodes(expirationThreshold int) []NodeCert {"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_24c6764a","line":230,"range":{"start_line":175,"start_character":0,"end_line":230,"end_character":1},"in_reply_to":"9f560f44_385b4086","updated":"2020-09-24 18:02:30.000000000","message":"I spent a few minutes refactoring - here\u0027s the result: https://play.golang.org/p/VuLiQTyOPpQ\n\nThis is hopefully enough to get started.","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":172,"context_line":"\treturn tlsData"},{"line_number":173,"context_line":"}"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"// checkKubeConfigs - fetches all the -kubeconfig secrets and identifies the expiry"},{"line_number":176,"context_line":"func (store SecretExpirationStore) checkKubeConfigs(expirationThreshold int) []Kubeconfig {"},{"line_number":177,"context_line":"\tkSecrets, err :\u003d store.kclient.ClientSet().CoreV1().Secrets(\"\").List(metav1.ListOptions{})"},{"line_number":178,"context_line":"\tif err !\u003d nil {"},{"line_number":179,"context_line":"\t\tlog.Print(kubeconfErrorPrefix, err.Error())"},{"line_number":180,"context_line":"\t\treturn nil"},{"line_number":181,"context_line":"\t}"},{"line_number":182,"context_line":"\tkSecretData :\u003d make([]Kubeconfig, 0)"},{"line_number":183,"context_line":"\tfor _, kSecret :\u003d range kSecrets.Items {"},{"line_number":184,"context_line":"\t\tif strings.HasSuffix(kSecret.Name, kubeconfigIdentifierSuffix) {"},{"line_number":185,"context_line":"\t\t\tfor ownerref :\u003d range kSecret.OwnerReferences {"},{"line_number":186,"context_line":"\t\t\t\tif kSecret.OwnerReferences[ownerref].Kind \u003d\u003d \"KubeadmControlPlane\" {"},{"line_number":187,"context_line":"\t\t\t\t\tkubecontent, err :\u003d clientcmd.Load(kSecret.Data[\"value\"])"},{"line_number":188,"context_line":"\t\t\t\t\tif err !\u003d nil {"},{"line_number":189,"context_line":"\t\t\t\t\t\tlog.Print(kubeconfErrorPrefix, \"for \", kSecret.Name, \" in \", kSecret.Namespace, \" namespace: \", err.Error())"},{"line_number":190,"context_line":"\t\t\t\t\t} else {"},{"line_number":191,"context_line":"\t\t\t\t\t\tclusterDat :\u003d make([]Cluster, 0)"},{"line_number":192,"context_line":"\t\t\t\t\t\t// Iterate through each Cluster and identify expiry"},{"line_number":193,"context_line":"\t\t\t\t\t\tfor clusterName, clusterData :\u003d range kubecontent.Clusters {"},{"line_number":194,"context_line":"\t\t\t\t\t\t\tclusterinfo :\u003d"},{"line_number":195,"context_line":"\t\t\t\t\t\t\t\tcheckKubeConfExpiration(clusterData.CertificateAuthorityData,"},{"line_number":196,"context_line":"\t\t\t\t\t\t\t\t\t\"CertificateAuthorityData\", expirationThreshold, kSecret.Name,"},{"line_number":197,"context_line":"\t\t\t\t\t\t\t\t\tkSecret.Namespace, clusterName)"},{"line_number":198,"context_line":"\t\t\t\t\t\t\tif (Cluster{}) !\u003d clusterinfo {"},{"line_number":199,"context_line":"\t\t\t\t\t\t\t\tclusterDat \u003d append(clusterDat, clusterinfo)"},{"line_number":200,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":201,"context_line":"\t\t\t\t\t\t}"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"\t\t\t\t\t\tuserDat :\u003d make([]Cluster, 0)"},{"line_number":204,"context_line":"\t\t\t\t\t\t// Iterate through each user Certificate and identify expiry"},{"line_number":205,"context_line":"\t\t\t\t\t\tfor userName, userData :\u003d range kubecontent.AuthInfos {"},{"line_number":206,"context_line":"\t\t\t\t\t\t\tuserinfo :\u003d"},{"line_number":207,"context_line":"\t\t\t\t\t\t\t\tcheckKubeConfExpiration(userData.ClientCertificateData,"},{"line_number":208,"context_line":"\t\t\t\t\t\t\t\t\t\"ClientCertificateData\", expirationThreshold, kSecret.Name,"},{"line_number":209,"context_line":"\t\t\t\t\t\t\t\t\tkSecret.Namespace, userName)"},{"line_number":210,"context_line":"\t\t\t\t\t\t\tif (Cluster{}) !\u003d userinfo {"},{"line_number":211,"context_line":"\t\t\t\t\t\t\t\tuserDat \u003d append(userDat, userinfo)"},{"line_number":212,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":213,"context_line":"\t\t\t\t\t\t}"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"\t\t\t\t\t\tif len(clusterDat) \u003e 0 || len(userDat) \u003e 0 {"},{"line_number":216,"context_line":"\t\t\t\t\t\t\tkSecretinfo :\u003d Kubeconfig{"},{"line_number":217,"context_line":"\t\t\t\t\t\t\t\tSecretName:      kSecret.Name,"},{"line_number":218,"context_line":"\t\t\t\t\t\t\t\tSecretNamespace: kSecret.Namespace,"},{"line_number":219,"context_line":"\t\t\t\t\t\t\t\tCluster:         clusterDat,"},{"line_number":220,"context_line":"\t\t\t\t\t\t\t\tUser:            userDat,"},{"line_number":221,"context_line":"\t\t\t\t\t\t\t}"},{"line_number":222,"context_line":"\t\t\t\t\t\t\tkSecretData \u003d append(kSecretData, kSecretinfo)"},{"line_number":223,"context_line":"\t\t\t\t\t\t}"},{"line_number":224,"context_line":"\t\t\t\t\t}"},{"line_number":225,"context_line":"\t\t\t\t}"},{"line_number":226,"context_line":"\t\t\t}"},{"line_number":227,"context_line":"\t\t}"},{"line_number":228,"context_line":"\t}"},{"line_number":229,"context_line":"\treturn kSecretData"},{"line_number":230,"context_line":"}"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"// checkWorkloadNodes - checks the expiry of certificates in the Workload control plane nodes"},{"line_number":233,"context_line":"func (store SecretExpirationStore) checkWorkloadNodes(expirationThreshold int) []NodeCert {"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_385b4086","line":230,"range":{"start_line":175,"start_character":0,"end_line":230,"end_character":1},"in_reply_to":"9f560f44_c403560b","updated":"2020-09-24 11:24:39.000000000","message":"Simplified to some extent but couldn\u0027t think of a better simplification as there are lots of mandatory checks to be done for kubeconf.. Please suggest if you have any ideas. Thanks","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":294,"context_line":"\treturn isWithinDuration(cert.NotAfter, expirationThreshold), fmt.Sprintf(\"%v\", cert.NotAfter), nil"},{"line_number":295,"context_line":"}"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"// isWithinDuration checks if the certificate NotAfter is within the duration (input)"},{"line_number":298,"context_line":"func isWithinDuration(notAfter time.Time, duration int) bool {"},{"line_number":299,"context_line":"\tdiffTime :\u003d notAfter.Sub(time.Now())"},{"line_number":300,"context_line":"\tif duration \u003d\u003d -1 {"},{"line_number":301,"context_line":"\t\treturn true"},{"line_number":302,"context_line":"\t}"},{"line_number":303,"context_line":"\tif int(diffTime.Hours()/24) \u003c duration {"},{"line_number":304,"context_line":"\t\treturn true"},{"line_number":305,"context_line":"\t} else if int(diffTime.Hours()/24) \u003c 0 {"},{"line_number":306,"context_line":"\t\treturn true"},{"line_number":307,"context_line":"\t}"},{"line_number":308,"context_line":"\treturn false"},{"line_number":309,"context_line":"}"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"// checkTLSExpiration checks for expiry info of tls secrets and returns the Certificate struct"},{"line_number":312,"context_line":"func checkTLSExpiration(certData []byte, certType string,"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_64f36a74","line":309,"range":{"start_line":297,"start_character":0,"end_line":309,"end_character":1},"updated":"2020-09-23 16:53:07.000000000","message":"simplify:\n\n\tfunc isWithinDuration(expirationDate time.Time, duration int) bool {\n\t\tif duration \u003c 0 {\n\t\t\treturn true\n\t\t}\n\t\tdaysUntilExpiration :\u003d int(time.Until(expirationDate).Hours() / 24)\n\t\treturn 0 \u003c\u003d daysUntilExpiration \u0026\u0026 daysUntilExpiration \u003c duration\n\t}","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":294,"context_line":"\treturn isWithinDuration(cert.NotAfter, expirationThreshold), fmt.Sprintf(\"%v\", cert.NotAfter), nil"},{"line_number":295,"context_line":"}"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"// isWithinDuration checks if the certificate NotAfter is within the duration (input)"},{"line_number":298,"context_line":"func isWithinDuration(notAfter time.Time, duration int) bool {"},{"line_number":299,"context_line":"\tdiffTime :\u003d notAfter.Sub(time.Now())"},{"line_number":300,"context_line":"\tif duration \u003d\u003d -1 {"},{"line_number":301,"context_line":"\t\treturn true"},{"line_number":302,"context_line":"\t}"},{"line_number":303,"context_line":"\tif int(diffTime.Hours()/24) \u003c duration {"},{"line_number":304,"context_line":"\t\treturn true"},{"line_number":305,"context_line":"\t} else if int(diffTime.Hours()/24) \u003c 0 {"},{"line_number":306,"context_line":"\t\treturn true"},{"line_number":307,"context_line":"\t}"},{"line_number":308,"context_line":"\treturn false"},{"line_number":309,"context_line":"}"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"// checkTLSExpiration checks for expiry info of tls secrets and returns the Certificate struct"},{"line_number":312,"context_line":"func checkTLSExpiration(certData []byte, certType string,"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_98552c53","line":309,"range":{"start_line":297,"start_character":0,"end_line":309,"end_character":1},"in_reply_to":"9f560f44_64f36a74","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"632ccd80fcd165cd743a28db67aec7ba66a7f215","unresolved":false,"context_lines":[{"line_number":65,"context_line":"\tSecretName      string    `json:\"secretName,omitempty\" yaml:\"secretName,omitempty\"`"},{"line_number":66,"context_line":"\tSecretNamespace string    `json:\"secretNamespace,omitempty\" yaml:\"secretNamespace,omitempty\"`"},{"line_number":67,"context_line":"\tCluster         []Cluster `json:\"cluster,omitempty\" yaml:\"cluster,omitempty\"`"},{"line_number":68,"context_line":"\tUser            []Cluster `json:\"user,omitempty\" yaml:\"user,omitempty\"`"},{"line_number":69,"context_line":"}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"// Cluster captures cluster ca certificate expiry information and kubeconfig\u0027s user\u0027s certificate"}],"source_content_type":"text/x-go","patch_set":56,"id":"9f560f44_64bceeb4","line":68,"range":{"start_line":68,"start_character":1,"end_line":68,"end_character":5},"updated":"2020-09-24 18:02:30.000000000","message":"Why is this a []Cluster?","commit_id":"8163b3d407d3e70896fdc8585643d09a50f718ea"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d8b87c3d57e0a07b642ea55800f1dcc559ea2e86","unresolved":false,"context_lines":[{"line_number":188,"context_line":"\tfor _, kubeconfig :\u003d range kubeconfigs {"},{"line_number":189,"context_line":"\t\tkubecontent, err :\u003d clientcmd.Load(kubeconfig.Data[\"value\"])"},{"line_number":190,"context_line":"\t\tif err !\u003d nil {"},{"line_number":191,"context_line":"\t\t\tlog.Printf(\"%s for %s in namespace %s: %v\", kubeconfErrorPrefix,"},{"line_number":192,"context_line":"\t\t\t\tkubeconfig.Name, kubeconfig.Namespace, err.Error())"},{"line_number":193,"context_line":"\t\t\tcontinue"},{"line_number":194,"context_line":"\t\t}"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_fa8ec12f","line":192,"range":{"start_line":191,"start_character":0,"end_line":192,"end_character":55},"updated":"2020-09-25 14:48:43.000000000","message":"A more useful message here might be:\n\n  \"Failed to read kubeconfig from \u003csecret.name\u003e, it may be malformed\"","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"150cd61e68431144bbd286734990d404c5223d1a","unresolved":false,"context_lines":[{"line_number":188,"context_line":"\tfor _, kubeconfig :\u003d range kubeconfigs {"},{"line_number":189,"context_line":"\t\tkubecontent, err :\u003d clientcmd.Load(kubeconfig.Data[\"value\"])"},{"line_number":190,"context_line":"\t\tif err !\u003d nil {"},{"line_number":191,"context_line":"\t\t\tlog.Printf(\"%s for %s in namespace %s: %v\", kubeconfErrorPrefix,"},{"line_number":192,"context_line":"\t\t\t\tkubeconfig.Name, kubeconfig.Namespace, err.Error())"},{"line_number":193,"context_line":"\t\t\tcontinue"},{"line_number":194,"context_line":"\t\t}"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_6f4da770","line":192,"range":{"start_line":191,"start_character":0,"end_line":192,"end_character":55},"in_reply_to":"9f560f44_fa8ec12f","updated":"2020-09-29 12:18:45.000000000","message":"Done","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d8b87c3d57e0a07b642ea55800f1dcc559ea2e86","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"\tnodes, err :\u003d store.kclient.ClientSet().CoreV1().Nodes().List(metav1.ListOptions{})"},{"line_number":224,"context_line":"\tif err !\u003d nil {"},{"line_number":225,"context_line":"\t\tlog.Printf(\"%s: %v\", nodeCertErrorPrefix, err.Error())"},{"line_number":226,"context_line":"\t\treturn nil"},{"line_number":227,"context_line":"\t}"},{"line_number":228,"context_line":"\tnodeData :\u003d make([]NodeCert, 0)"}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_3a64b9b2","line":225,"range":{"start_line":225,"start_character":23,"end_line":225,"end_character":42},"updated":"2020-09-25 14:48:43.000000000","message":"I don\u0027t think these prefixes are helpful.\n\nI think a more useful log message here might say something like\n\n  \"Unable to list secrets: \u003cwhatever error from kclient\u003e\"","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"150cd61e68431144bbd286734990d404c5223d1a","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"\tnodes, err :\u003d store.kclient.ClientSet().CoreV1().Nodes().List(metav1.ListOptions{})"},{"line_number":224,"context_line":"\tif err !\u003d nil {"},{"line_number":225,"context_line":"\t\tlog.Printf(\"%s: %v\", nodeCertErrorPrefix, err.Error())"},{"line_number":226,"context_line":"\t\treturn nil"},{"line_number":227,"context_line":"\t}"},{"line_number":228,"context_line":"\tnodeData :\u003d make([]NodeCert, 0)"}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_cf52f312","line":225,"range":{"start_line":225,"start_character":23,"end_line":225,"end_character":42},"in_reply_to":"9f560f44_3a64b9b2","updated":"2020-09-29 12:18:45.000000000","message":"Thanks.. the log messages are updated now","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d8b87c3d57e0a07b642ea55800f1dcc559ea2e86","unresolved":false,"context_lines":[{"line_number":238,"context_line":"\t\t\t\t\tstrings.TrimSpace(strings.ReplaceAll(strings.Split(v, \":\")[2], \"}\", \"\"))"},{"line_number":239,"context_line":"\t\t\t\tfdate, err :\u003d time.Parse(timeFormat, cData)"},{"line_number":240,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":241,"context_line":"\t\t\t\t\tlog.Printf(\"%s for %s in %s namespace: %v\", nodeCertErrorPrefix,"},{"line_number":242,"context_line":"\t\t\t\t\t\tnode.Name, node.Namespace, err.Error())"},{"line_number":243,"context_line":"\t\t\t\t\tcontinue"},{"line_number":244,"context_line":"\t\t\t\t}"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_5a17edee","line":242,"range":{"start_line":241,"start_character":0,"end_line":242,"end_character":45},"updated":"2020-09-25 14:48:43.000000000","message":"this message should say something like:\n\n  \"Unable to parse expiration date of \u003cnode.Name\u003e\"","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"150cd61e68431144bbd286734990d404c5223d1a","unresolved":false,"context_lines":[{"line_number":238,"context_line":"\t\t\t\t\tstrings.TrimSpace(strings.ReplaceAll(strings.Split(v, \":\")[2], \"}\", \"\"))"},{"line_number":239,"context_line":"\t\t\t\tfdate, err :\u003d time.Parse(timeFormat, cData)"},{"line_number":240,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":241,"context_line":"\t\t\t\t\tlog.Printf(\"%s for %s in %s namespace: %v\", nodeCertErrorPrefix,"},{"line_number":242,"context_line":"\t\t\t\t\t\tnode.Name, node.Namespace, err.Error())"},{"line_number":243,"context_line":"\t\t\t\t\tcontinue"},{"line_number":244,"context_line":"\t\t\t\t}"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_af57bf01","line":242,"range":{"start_line":241,"start_character":0,"end_line":242,"end_character":45},"in_reply_to":"9f560f44_5a17edee","updated":"2020-09-29 12:18:45.000000000","message":"Done","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d8b87c3d57e0a07b642ea55800f1dcc559ea2e86","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"// checkKubeConfExpiration checks for expiry info of kubeconf and returns Cluster struct"},{"line_number":310,"context_line":"func checkKubeConfExpiration(clusterData []byte, contentType string,"},{"line_number":311,"context_line":"\texpirationThreshold int, clusterName string) ClusterOrUser {"},{"line_number":312,"context_line":"\tisExpiring, notAfter, err :\u003d certExpiryWithinThreshold("},{"line_number":313,"context_line":"\t\tclusterData, expirationThreshold)"},{"line_number":314,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_3abcb9b3","line":311,"range":{"start_line":311,"start_character":46,"end_line":311,"end_character":59},"updated":"2020-09-25 14:48:43.000000000","message":"This typename is very confusing - how would a user of this function know whether they were getting a Cluster or a User?","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"150cd61e68431144bbd286734990d404c5223d1a","unresolved":false,"context_lines":[{"line_number":308,"context_line":""},{"line_number":309,"context_line":"// checkKubeConfExpiration checks for expiry info of kubeconf and returns Cluster struct"},{"line_number":310,"context_line":"func checkKubeConfExpiration(clusterData []byte, contentType string,"},{"line_number":311,"context_line":"\texpirationThreshold int, clusterName string) ClusterOrUser {"},{"line_number":312,"context_line":"\tisExpiring, notAfter, err :\u003d certExpiryWithinThreshold("},{"line_number":313,"context_line":"\t\tclusterData, expirationThreshold)"},{"line_number":314,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_4f5f030f","line":311,"range":{"start_line":311,"start_character":46,"end_line":311,"end_character":59},"in_reply_to":"9f560f44_3abcb9b3","updated":"2020-09-29 12:18:45.000000000","message":"Can we keep as kubeconfigData ? This is a common struct being called for both Cluster and User data, however the output yaml and json structure accordingly displays as cluster and user. Please advice","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"d8b87c3d57e0a07b642ea55800f1dcc559ea2e86","unresolved":false,"context_lines":[{"line_number":318,"context_line":"\tif isExpiring {"},{"line_number":319,"context_line":"\t\tclusterinfo :\u003d ClusterOrUser{"},{"line_number":320,"context_line":"\t\t\tName:            clusterName,"},{"line_number":321,"context_line":"\t\t\tCertificateName: contentType,"},{"line_number":322,"context_line":"\t\t\tExpiryDate:      notAfter,"},{"line_number":323,"context_line":"\t\t}"},{"line_number":324,"context_line":"\t\treturn clusterinfo"}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_9a61853c","line":321,"range":{"start_line":321,"start_character":3,"end_line":321,"end_character":32},"updated":"2020-09-25 14:48:43.000000000","message":"The contentType doesn\u0027t seem like a reasonable value for a name here, especially since we are passing in data member names of the config object. I imagine this will look very confusing in the output","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"150cd61e68431144bbd286734990d404c5223d1a","unresolved":false,"context_lines":[{"line_number":318,"context_line":"\tif isExpiring {"},{"line_number":319,"context_line":"\t\tclusterinfo :\u003d ClusterOrUser{"},{"line_number":320,"context_line":"\t\t\tName:            clusterName,"},{"line_number":321,"context_line":"\t\t\tCertificateName: contentType,"},{"line_number":322,"context_line":"\t\t\tExpiryDate:      notAfter,"},{"line_number":323,"context_line":"\t\t}"},{"line_number":324,"context_line":"\t\treturn clusterinfo"}],"source_content_type":"text/x-go","patch_set":60,"id":"9f560f44_6f9be7c7","line":321,"range":{"start_line":321,"start_character":3,"end_line":321,"end_character":32},"in_reply_to":"9f560f44_9a61853c","updated":"2020-09-29 12:18:45.000000000","message":"Changed to certificateName","commit_id":"b6ba9a9be4ec424b47332116b60a9e62b6a88b69"}],"pkg/cluster/checkexpiration/checkexpiration_test.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\t\"strings\""},{"line_number":20,"context_line":"\t\"testing\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"\t//\t\"github.com/golangci/golangci-lint/pkg/config\""},{"line_number":23,"context_line":"\t\"github.com/golangplus/testing/assert\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"\tv1 \"k8s.io/api/core/v1\""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_02baf06c","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":50},"updated":"2020-09-15 19:55:08.000000000","message":"This comment should be removed","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":20,"context_line":"\t\"testing\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"\t//\t\"github.com/golangci/golangci-lint/pkg/config\""},{"line_number":23,"context_line":"\t\"github.com/golangplus/testing/assert\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"\tv1 \"k8s.io/api/core/v1\""},{"line_number":26,"context_line":"\t\"k8s.io/apimachinery/pkg/runtime\""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_226a94ec","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":39},"updated":"2020-09-15 19:55:08.000000000","message":"We\u0027re using \"github.com/stretchr/testify/assert\", please swap that out","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":36,"context_line":"type testCase struct {"},{"line_number":37,"context_line":"\tname                            string"},{"line_number":38,"context_line":"\texpiryThreshold                 string"},{"line_number":39,"context_line":"\tsecrets                         []*v1.Secret"},{"line_number":40,"context_line":"\tnodes                           []*v1.Node"},{"line_number":41,"context_line":"\texpectedExpiringNodeCount       int"},{"line_number":42,"context_line":"\texpectedExpiringKubeConfigCount int"},{"line_number":43,"context_line":"\texpectedExpiringTLSSecretCount  int"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_2d0c45eb","line":40,"range":{"start_line":39,"start_character":0,"end_line":40,"end_character":43},"updated":"2020-09-15 19:55:08.000000000","message":"These probably don\u0027t need to be pointers","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":45,"context_line":"}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"var ("},{"line_number":48,"context_line":"\ttestCases \u003d []*testCase{"},{"line_number":49,"context_line":"\t\t{"},{"line_number":50,"context_line":"\t\t\tname:      \"empty-expect-error\","},{"line_number":51,"context_line":"\t\t\texpectErr: true,"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ed2a4d2d","line":48,"range":{"start_line":48,"start_character":13,"end_line":48,"end_character":24},"updated":"2020-09-15 19:55:08.000000000","message":"this also doesn\u0027t need to be a pointer","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":106,"context_line":"\t\t\tcontinue"},{"line_number":107,"context_line":"\t\t}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"\t\tassert.NoError(t, err)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"\t\tif len(expirationInfo.Kubeconf) !\u003d testCase.expectedExpiringKubeConfigCount {"},{"line_number":112,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring kubeconfigs, got %d\","}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ed9d2d6d","line":109,"range":{"start_line":109,"start_character":2,"end_line":109,"end_character":8},"updated":"2020-09-15 19:55:08.000000000","message":"probably best to `require.NoError` here to stop execution from continuing","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"\t\tassert.NoError(t, err)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"\t\tif len(expirationInfo.Kubeconf) !\u003d testCase.expectedExpiringKubeConfigCount {"},{"line_number":112,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring kubeconfigs, got %d\","},{"line_number":113,"context_line":"\t\t\t\ttestCase.name, testCase.expectedExpiringKubeConfigCount, len(expirationInfo.Kubeconf))"},{"line_number":114,"context_line":"\t\t}"},{"line_number":115,"context_line":"\t\tif len(expirationInfo.TLSSecret) !\u003d testCase.expectedExpiringTLSSecretCount {"},{"line_number":116,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring tls secrets, got %d\","}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_2db3a50c","line":113,"range":{"start_line":111,"start_character":0,"end_line":113,"end_character":90},"updated":"2020-09-15 19:55:08.000000000","message":"this could be simplified as\n\nassert.Len(t, testCase.expectedExpiringKubeConfigCount, expirationInfo.Kubeconf)","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":112,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring kubeconfigs, got %d\","},{"line_number":113,"context_line":"\t\t\t\ttestCase.name, testCase.expectedExpiringKubeConfigCount, len(expirationInfo.Kubeconf))"},{"line_number":114,"context_line":"\t\t}"},{"line_number":115,"context_line":"\t\tif len(expirationInfo.TLSSecret) !\u003d testCase.expectedExpiringTLSSecretCount {"},{"line_number":116,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring tls secrets, got %d\","},{"line_number":117,"context_line":"\t\t\t\ttestCase.name, testCase.expectedExpiringTLSSecretCount, len(expirationInfo.TLSSecret))"},{"line_number":118,"context_line":"\t\t}"},{"line_number":119,"context_line":"\t\tif len(expirationInfo.NodeCert) !\u003d testCase.expectedExpiringNodeCount {"},{"line_number":120,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring node certificates, got %d\","},{"line_number":121,"context_line":"\t\t\t\ttestCase.name, testCase.expectedExpiringNodeCount, len(expirationInfo.NodeCert))"},{"line_number":122,"context_line":"\t\t}"},{"line_number":123,"context_line":"\t}"},{"line_number":124,"context_line":"}"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_4dc9b977","line":122,"range":{"start_line":115,"start_character":0,"end_line":122,"end_character":3},"updated":"2020-09-15 19:55:08.000000000","message":"ditto","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":97,"context_line":"\t\t\tra :\u003d fake.WithTypedObjects(objects...)"},{"line_number":98,"context_line":"\t\t\treturn fake.NewClient(ra), nil"},{"line_number":99,"context_line":"\t\t}"},{"line_number":100,"context_line":"\t\tassert.NotEqual(t, \"settings\", cfg, nil)"},{"line_number":101,"context_line":"\t\tstore, err :\u003d NewStore(settings, testClientFactory)"},{"line_number":102,"context_line":"\t\tassert.NoError(t, err)"},{"line_number":103,"context_line":"\t\texpirationInfo, err :\u003d store.GetExpiringSecrets(testCase.expiryThreshold)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_9172557b","line":100,"range":{"start_line":100,"start_character":2,"end_line":100,"end_character":42},"updated":"2020-09-23 16:07:27.000000000","message":"I\u0027m not sure what this is supposed to test - \"settings\" is a string and `cfg` is a config.Config. They will never be equal","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"\t\t\tra :\u003d fake.WithTypedObjects(objects...)"},{"line_number":98,"context_line":"\t\t\treturn fake.NewClient(ra), nil"},{"line_number":99,"context_line":"\t\t}"},{"line_number":100,"context_line":"\t\tassert.NotEqual(t, \"settings\", cfg, nil)"},{"line_number":101,"context_line":"\t\tstore, err :\u003d NewStore(settings, testClientFactory)"},{"line_number":102,"context_line":"\t\tassert.NoError(t, err)"},{"line_number":103,"context_line":"\t\texpirationInfo, err :\u003d store.GetExpiringSecrets(testCase.expiryThreshold)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_5831d458","line":100,"range":{"start_line":100,"start_character":2,"end_line":100,"end_character":42},"in_reply_to":"9f560f44_9172557b","updated":"2020-09-24 11:24:39.000000000","message":"Updated to check for empty","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"\t\trequire.NoError(t, err)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"\t\tif !assert.Len(t, expirationInfo.Kubeconf, testCase.expectedExpiringKubeConfigCount) {"},{"line_number":112,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring kubeconfigs, got %d\","},{"line_number":113,"context_line":"\t\t\t\ttestCase.name, testCase.expectedExpiringKubeConfigCount, len(expirationInfo.Kubeconf))"},{"line_number":114,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_e992b39e","line":111,"range":{"start_line":111,"start_character":6,"end_line":111,"end_character":86},"updated":"2020-09-23 16:07:27.000000000","message":"this is good enough here - no need for the the if statement or t.Fatals","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"\t\trequire.NoError(t, err)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"\t\tif !assert.Len(t, expirationInfo.Kubeconf, testCase.expectedExpiringKubeConfigCount) {"},{"line_number":112,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d expiring kubeconfigs, got %d\","},{"line_number":113,"context_line":"\t\t\t\ttestCase.name, testCase.expectedExpiringKubeConfigCount, len(expirationInfo.Kubeconf))"},{"line_number":114,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_3834e048","line":111,"range":{"start_line":111,"start_character":6,"end_line":111,"end_character":86},"in_reply_to":"9f560f44_e992b39e","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"pkg/cluster/checkexpiration/testdata/node.yaml":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":2,"context_line":"kind: Node"},{"line_number":3,"context_line":"metadata:"},{"line_number":4,"context_line":"  annotations:"},{"line_number":5,"context_line":"    cert-expiration: \"{ admin.conf: Sep 02, {{year}} 14:02 UTC },{ apiserver: Sep 02,"},{"line_number":6,"context_line":"      {{year}} 14:02 UTC },{ apiserver-etcd-client: Sep 02, {{year}} 14:02 UTC },{ apiserver-kubelet-client:"},{"line_number":7,"context_line":"      Sep 02, {{year}} 14:02 UTC },{ controller-manager.conf: Sep 02, {{year}} 14:02 UTC },{"},{"line_number":8,"context_line":"      etcd-healthcheck-client: Sep 02, {{year}} 14:02 UTC },{ etcd-peer: Sep 02, {{year}}"},{"line_number":9,"context_line":"      14:02 UTC },{ etcd-server: Sep 02, {{year}} 14:02 UTC },{ front-proxy-client: Sep"},{"line_number":10,"context_line":"      02, {{year}} 14:02 UTC },{ scheduler.conf: Sep 02, {{year}} 14:02 UTC },{ ca: Aug 31,"},{"line_number":11,"context_line":"      {{year}} 14:02 UTC },{ etcd-ca: Aug 31, {{year}} 14:02 UTC },{ front-proxy-ca: Aug 31,"},{"line_number":12,"context_line":"      {{year}} 14:02 UTC }\""},{"line_number":13,"context_line":"  name: test-node"}],"source_content_type":"text/x-yaml","patch_set":38,"id":"9f560f44_4d8ed932","line":12,"range":{"start_line":5,"start_character":22,"end_line":12,"end_character":26},"updated":"2020-09-15 19:55:08.000000000","message":"this doesn\u0027t look right - the year is missing from all of these","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":2,"context_line":"kind: Node"},{"line_number":3,"context_line":"metadata:"},{"line_number":4,"context_line":"  annotations:"},{"line_number":5,"context_line":"    cert-expiration: \"{ admin.conf: Aug 06, {{year}} 12:36 UTC },{ apiserver: Aug 06, {{year}} 12:36 UTC },{ apiserver-etcd-client: Aug 06, {{year}} 12:36 UTC },{ apiserver-kubelet-client: Aug 06, {{year}} 12:36 UTC },{ controller-manager.conf: Aug 06, {{year}} 12:36 UTC },{ etcd-healthcheck-client: Aug 06, {{year}} 12:36 UTC },{ etcd-peer: Aug 06, {{year}} 12:36 UTC },{ etcd-server: Aug 06, {{year}} 12:36 UTC },{ front-proxy-client: Aug 06, {{year}} 12:36 UTC },{ scheduler.conf: Aug 06, {{year}} 12:36 UTC },{ ca: Aug 04, {{year}} 12:36 UTC },{ etcd-ca: Aug 04, {{year}} 12:36 UTC },{ front-proxy-ca: Aug 04, {{year}} 12:36 UTC }\""},{"line_number":6,"context_line":"  name: test-node"}],"source_content_type":"text/x-yaml","patch_set":53,"id":"9f560f44_84bcbe6c","line":5,"range":{"start_line":5,"start_character":44,"end_line":5,"end_character":52},"updated":"2020-09-23 16:53:07.000000000","message":"I may be misunderstanding, but is this correct?","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":2,"context_line":"kind: Node"},{"line_number":3,"context_line":"metadata:"},{"line_number":4,"context_line":"  annotations:"},{"line_number":5,"context_line":"    cert-expiration: \"{ admin.conf: Aug 06, {{year}} 12:36 UTC },{ apiserver: Aug 06, {{year}} 12:36 UTC },{ apiserver-etcd-client: Aug 06, {{year}} 12:36 UTC },{ apiserver-kubelet-client: Aug 06, {{year}} 12:36 UTC },{ controller-manager.conf: Aug 06, {{year}} 12:36 UTC },{ etcd-healthcheck-client: Aug 06, {{year}} 12:36 UTC },{ etcd-peer: Aug 06, {{year}} 12:36 UTC },{ etcd-server: Aug 06, {{year}} 12:36 UTC },{ front-proxy-client: Aug 06, {{year}} 12:36 UTC },{ scheduler.conf: Aug 06, {{year}} 12:36 UTC },{ ca: Aug 04, {{year}} 12:36 UTC },{ etcd-ca: Aug 04, {{year}} 12:36 UTC },{ front-proxy-ca: Aug 04, {{year}} 12:36 UTC }\""},{"line_number":6,"context_line":"  name: test-node"}],"source_content_type":"text/x-yaml","patch_set":53,"id":"9f560f44_58cd542e","line":5,"range":{"start_line":5,"start_character":44,"end_line":5,"end_character":52},"in_reply_to":"9f560f44_84bcbe6c","updated":"2020-09-24 11:24:39.000000000","message":"The year is later replaced by the _test.go file during run time","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"pkg/cluster/resetsatoken/errors.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"// ErrNoSATokenFound is returned if there are no SA tokens found in the provided namespace"},{"line_number":23,"context_line":"type ErrNoSATokenFound struct {"},{"line_number":24,"context_line":"\tns string"},{"line_number":25,"context_line":"}"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"// ErrNotSAToken is returned if the user input is not an SA token"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_04b0ae8a","line":24,"range":{"start_line":24,"start_character":1,"end_line":24,"end_character":3},"updated":"2020-09-23 16:53:07.000000000","message":"Call this namespace","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"// ErrNoSATokenFound is returned if there are no SA tokens found in the provided namespace"},{"line_number":23,"context_line":"type ErrNoSATokenFound struct {"},{"line_number":24,"context_line":"\tns string"},{"line_number":25,"context_line":"}"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"// ErrNotSAToken is returned if the user input is not an SA token"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_d8e0449a","line":24,"range":{"start_line":24,"start_character":1,"end_line":24,"end_character":3},"in_reply_to":"9f560f44_04b0ae8a","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"pkg/cluster/resetsatoken/resetsatoken.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":23,"context_line":"\t\"k8s.io/client-go/kubernetes\""},{"line_number":24,"context_line":")"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"var serviceAccountType \u003d \"kubernetes.io/service-account-token\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"// TokenManager manages service account rotation"},{"line_number":29,"context_line":"type TokenManager struct {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_adc21533","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":62},"updated":"2020-09-15 19:55:08.000000000","message":"remove this variable. Use this inline instead: https://github.com/kubernetes/api/blob/master/core/v1/types.go#L5660","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":23,"context_line":"\t\"k8s.io/client-go/kubernetes\""},{"line_number":24,"context_line":")"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"var serviceAccountType \u003d \"kubernetes.io/service-account-token\""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"// TokenManager manages service account rotation"},{"line_number":29,"context_line":"type TokenManager struct {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_e9004a38","line":26,"range":{"start_line":26,"start_character":0,"end_line":26,"end_character":62},"in_reply_to":"9f560f44_adc21533","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"// RotateToken - rotates the token 1. Deletes the secret and 2. Deletes its pod"},{"line_number":41,"context_line":"func (manager *TokenManager) RotateToken(ns string, secretName string) error {"},{"line_number":42,"context_line":"\tif secretName \u003d\u003d \"\" {"},{"line_number":43,"context_line":"\t\tsecrets, err :\u003d manager.kclient.CoreV1()."},{"line_number":44,"context_line":"\t\t\tSecrets(ns).List(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", serviceAccountType)})"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_4d9c195b","line":41,"range":{"start_line":41,"start_character":6,"end_line":41,"end_character":27},"updated":"2020-09-15 19:55:08.000000000","message":"None of the receivers in this function should be pointers","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"// RotateToken - rotates the token 1. Deletes the secret and 2. Deletes its pod"},{"line_number":41,"context_line":"func (manager *TokenManager) RotateToken(ns string, secretName string) error {"},{"line_number":42,"context_line":"\tif secretName \u003d\u003d \"\" {"},{"line_number":43,"context_line":"\t\tsecrets, err :\u003d manager.kclient.CoreV1()."},{"line_number":44,"context_line":"\t\t\tSecrets(ns).List(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", serviceAccountType)})"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ed8b6d14","line":41,"updated":"2020-09-15 19:55:08.000000000","message":"This should probably be split into 2 functions, one with the secretName and the other without.","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"// RotateToken - rotates the token 1. Deletes the secret and 2. Deletes its pod"},{"line_number":41,"context_line":"func (manager *TokenManager) RotateToken(ns string, secretName string) error {"},{"line_number":42,"context_line":"\tif secretName \u003d\u003d \"\" {"},{"line_number":43,"context_line":"\t\tsecrets, err :\u003d manager.kclient.CoreV1()."},{"line_number":44,"context_line":"\t\t\tSecrets(ns).List(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", serviceAccountType)})"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_c9fbc645","line":41,"in_reply_to":"9f560f44_ed8b6d14","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":47,"context_line":"\t\t}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"\t\tif len(secrets.Items) \u003d\u003d 0 {"},{"line_number":50,"context_line":"\t\t\treturn fmt.Errorf(\"no service account tokens found in namespace %s\", ns)"},{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\tfor _, secret :\u003d range secrets.Items {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ada9757d","line":50,"range":{"start_line":50,"start_character":10,"end_line":50,"end_character":75},"updated":"2020-09-15 19:55:08.000000000","message":"Swap this out for a strongly-typed error","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"\t\t}"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"\t\tif len(secrets.Items) \u003d\u003d 0 {"},{"line_number":50,"context_line":"\t\t\treturn fmt.Errorf(\"no service account tokens found in namespace %s\", ns)"},{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\tfor _, secret :\u003d range secrets.Items {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_09f65e5e","line":50,"range":{"start_line":50,"start_character":10,"end_line":50,"end_character":75},"in_reply_to":"9f560f44_ada9757d","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\tfor _, secret :\u003d range secrets.Items {"},{"line_number":54,"context_line":"\t\t\tfmt.Fprint(os.Stdout, \"Rotating token - \"+secret.Name+\"\\n\")"},{"line_number":55,"context_line":"\t\t\terr \u003d manager.deleteSecret(secret.Name, ns)"},{"line_number":56,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":57,"context_line":"\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_2daf257e","line":54,"range":{"start_line":54,"start_character":3,"end_line":54,"end_character":62},"updated":"2020-09-15 19:55:08.000000000","message":"Switch to fmt.Fprintf","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"\t\t}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"\t\tfor _, secret :\u003d range secrets.Items {"},{"line_number":54,"context_line":"\t\t\tfmt.Fprint(os.Stdout, \"Rotating token - \"+secret.Name+\"\\n\")"},{"line_number":55,"context_line":"\t\t\terr \u003d manager.deleteSecret(secret.Name, ns)"},{"line_number":56,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":57,"context_line":"\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_299082ed","line":54,"range":{"start_line":54,"start_character":3,"end_line":54,"end_character":62},"in_reply_to":"9f560f44_2daf257e","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":69,"context_line":"\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\tif string(secret.Type) \u003d\u003d serviceAccountType {"},{"line_number":72,"context_line":"\t\t\tfmt.Fprint(os.Stdout, \"Rotating token - \"+secretName+\"\\n\")"},{"line_number":73,"context_line":"\t\t\terr :\u003d manager.deleteSecret(secretName, ns)"},{"line_number":74,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":75,"context_line":"\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_0db4e1d0","line":72,"range":{"start_line":72,"start_character":7,"end_line":72,"end_character":13},"updated":"2020-09-15 19:55:08.000000000","message":"ditto","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"\t\t}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"\t\tif string(secret.Type) \u003d\u003d serviceAccountType {"},{"line_number":72,"context_line":"\t\t\tfmt.Fprint(os.Stdout, \"Rotating token - \"+secretName+\"\\n\")"},{"line_number":73,"context_line":"\t\t\terr :\u003d manager.deleteSecret(secretName, ns)"},{"line_number":74,"context_line":"\t\t\tif err !\u003d nil {"},{"line_number":75,"context_line":"\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_098bfebf","line":72,"range":{"start_line":72,"start_character":7,"end_line":72,"end_character":13},"in_reply_to":"9f560f44_0db4e1d0","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":80,"context_line":"\t\t\t\treturn err"},{"line_number":81,"context_line":"\t\t\t}"},{"line_number":82,"context_line":"\t\t} else {"},{"line_number":83,"context_line":"\t\t\treturn fmt.Errorf(secretName + \" is not a Service Account Token\")"},{"line_number":84,"context_line":"\t\t}"},{"line_number":85,"context_line":"\t}"},{"line_number":86,"context_line":"\treturn nil"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_edd9ad28","line":83,"range":{"start_line":83,"start_character":10,"end_line":83,"end_character":68},"updated":"2020-09-15 19:55:08.000000000","message":"ditto: strongly type this error","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"\t\t\t\treturn err"},{"line_number":81,"context_line":"\t\t\t}"},{"line_number":82,"context_line":"\t\t} else {"},{"line_number":83,"context_line":"\t\t\treturn fmt.Errorf(secretName + \" is not a Service Account Token\")"},{"line_number":84,"context_line":"\t\t}"},{"line_number":85,"context_line":"\t}"},{"line_number":86,"context_line":"\treturn nil"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_69bb9a74","line":83,"range":{"start_line":83,"start_character":10,"end_line":83,"end_character":68},"in_reply_to":"9f560f44_edd9ad28","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":89,"context_line":"// deleteSecret- deletes the secret"},{"line_number":90,"context_line":"func (manager *TokenManager) deleteSecret(secretName string, ns string) error {"},{"line_number":91,"context_line":"\tdeleteOptions :\u003d \u0026metav1.DeleteOptions{}"},{"line_number":92,"context_line":"\tvar zero int64 \u003d 0"},{"line_number":93,"context_line":"\tdeleteOptions.GracePeriodSeconds \u003d \u0026zero"},{"line_number":94,"context_line":"\terr :\u003d manager.kclient.CoreV1().Secrets(ns).Delete(secretName, deleteOptions)"},{"line_number":95,"context_line":"\tif err !\u003d nil {"},{"line_number":96,"context_line":"\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_6dcd9d5d","line":93,"range":{"start_line":92,"start_character":0,"end_line":93,"end_character":41},"updated":"2020-09-15 19:55:08.000000000","message":"is it necessary to force the deletion here?","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"// deleteSecret- deletes the secret"},{"line_number":90,"context_line":"func (manager *TokenManager) deleteSecret(secretName string, ns string) error {"},{"line_number":91,"context_line":"\tdeleteOptions :\u003d \u0026metav1.DeleteOptions{}"},{"line_number":92,"context_line":"\tvar zero int64 \u003d 0"},{"line_number":93,"context_line":"\tdeleteOptions.GracePeriodSeconds \u003d \u0026zero"},{"line_number":94,"context_line":"\terr :\u003d manager.kclient.CoreV1().Secrets(ns).Delete(secretName, deleteOptions)"},{"line_number":95,"context_line":"\tif err !\u003d nil {"},{"line_number":96,"context_line":"\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_49be9664","line":93,"range":{"start_line":92,"start_character":0,"end_line":93,"end_character":41},"in_reply_to":"9f560f44_6dcd9d5d","updated":"2020-09-18 08:21:29.000000000","message":"Thanks for the feedback. Its not necessary. Updated the code","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":102,"context_line":"func (manager *TokenManager) deletePod(secretName string, ns string) error {"},{"line_number":103,"context_line":"\tpods, err :\u003d manager.kclient.CoreV1().Pods(ns).List(metav1.ListOptions{})"},{"line_number":104,"context_line":"\tdeleteOptions :\u003d \u0026metav1.DeleteOptions{}"},{"line_number":105,"context_line":"\tvar zero int64 \u003d 0"},{"line_number":106,"context_line":"\tdeleteOptions.GracePeriodSeconds \u003d \u0026zero"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_add7b5ee","line":106,"range":{"start_line":105,"start_character":0,"end_line":106,"end_character":41},"updated":"2020-09-15 19:55:08.000000000","message":"same as above","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"func (manager *TokenManager) deletePod(secretName string, ns string) error {"},{"line_number":103,"context_line":"\tpods, err :\u003d manager.kclient.CoreV1().Pods(ns).List(metav1.ListOptions{})"},{"line_number":104,"context_line":"\tdeleteOptions :\u003d \u0026metav1.DeleteOptions{}"},{"line_number":105,"context_line":"\tvar zero int64 \u003d 0"},{"line_number":106,"context_line":"\tdeleteOptions.GracePeriodSeconds \u003d \u0026zero"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_a9b5b280","line":106,"range":{"start_line":105,"start_character":0,"end_line":106,"end_character":41},"in_reply_to":"9f560f44_add7b5ee","updated":"2020-09-18 08:21:29.000000000","message":"Thanks for the feedback. Its not necessary. Updated the code","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":106,"context_line":"\tdeleteOptions.GracePeriodSeconds \u003d \u0026zero"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"},{"line_number":110,"context_line":"\t\t\tif pod.Spec.Volumes[volume].Name \u003d\u003d secretName {"},{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_4df379a0","line":109,"range":{"start_line":109,"start_character":6,"end_line":109,"end_character":12},"updated":"2020-09-15 19:55:08.000000000","message":"use _, volume","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"\tdeleteOptions.GracePeriodSeconds \u003d \u0026zero"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"},{"line_number":110,"context_line":"\t\t\tif pod.Spec.Volumes[volume].Name \u003d\u003d secretName {"},{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_e9ae8a2d","line":109,"range":{"start_line":109,"start_character":6,"end_line":109,"end_character":12},"in_reply_to":"9f560f44_4df379a0","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"},{"line_number":110,"context_line":"\t\t\tif pod.Spec.Volumes[volume].Name \u003d\u003d secretName {"},{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"},{"line_number":113,"context_line":"\t\t\t\tif err1 !\u003d nil {"},{"line_number":114,"context_line":"\t\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_0d022170","line":111,"range":{"start_line":111,"start_character":8,"end_line":111,"end_character":14},"updated":"2020-09-15 19:55:08.000000000","message":"ditto: Fprintf","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"},{"line_number":110,"context_line":"\t\t\tif pod.Spec.Volumes[volume].Name \u003d\u003d secretName {"},{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"},{"line_number":113,"context_line":"\t\t\t\tif err1 !\u003d nil {"},{"line_number":114,"context_line":"\t\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_89b8ae75","line":111,"range":{"start_line":111,"start_character":8,"end_line":111,"end_character":14},"in_reply_to":"9f560f44_0d022170","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"},{"line_number":113,"context_line":"\t\t\t\tif err1 !\u003d nil {"},{"line_number":114,"context_line":"\t\t\t\t\treturn err"},{"line_number":115,"context_line":"\t\t\t\t}"},{"line_number":116,"context_line":"\t\t\t}"},{"line_number":117,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ed108dae","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":15},"updated":"2020-09-15 19:55:08.000000000","message":"err is always nil here","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"},{"line_number":113,"context_line":"\t\t\t\tif err1 !\u003d nil {"},{"line_number":114,"context_line":"\t\t\t\t\treturn err"},{"line_number":115,"context_line":"\t\t\t\t}"},{"line_number":116,"context_line":"\t\t\t}"},{"line_number":117,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_c9a90626","line":114,"range":{"start_line":114,"start_character":12,"end_line":114,"end_character":15},"in_reply_to":"9f560f44_ed108dae","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"},{"line_number":110,"context_line":"\t\t\tif pod.Spec.Volumes[volume].Name \u003d\u003d secretName {"},{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"},{"line_number":113,"context_line":"\t\t\t\tif err1 !\u003d nil {"},{"line_number":114,"context_line":"\t\t\t\t\treturn err"},{"line_number":115,"context_line":"\t\t\t\t}"},{"line_number":116,"context_line":"\t\t\t}"},{"line_number":117,"context_line":"\t\t}"},{"line_number":118,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_ad45f5b6","line":115,"range":{"start_line":110,"start_character":0,"end_line":115,"end_character":5},"updated":"2020-09-15 19:55:08.000000000","message":"this inner loop needs to \"break\" somewhere after the pod has been deleted","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"b5d941925d69ef19919a0884e8c93708d25f5f4f","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":109,"context_line":"\t\tfor volume :\u003d range pod.Spec.Volumes {"},{"line_number":110,"context_line":"\t\t\tif pod.Spec.Volumes[volume].Name \u003d\u003d secretName {"},{"line_number":111,"context_line":"\t\t\t\tfmt.Fprint(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":112,"context_line":"\t\t\t\terr1 :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, deleteOptions)"},{"line_number":113,"context_line":"\t\t\t\tif err1 !\u003d nil {"},{"line_number":114,"context_line":"\t\t\t\t\treturn err"},{"line_number":115,"context_line":"\t\t\t\t}"},{"line_number":116,"context_line":"\t\t\t}"},{"line_number":117,"context_line":"\t\t}"},{"line_number":118,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_29a9a223","line":115,"range":{"start_line":110,"start_character":0,"end_line":115,"end_character":5},"in_reply_to":"9f560f44_ad45f5b6","updated":"2020-09-18 08:21:29.000000000","message":"Done","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":71,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":72,"context_line":"\t\tfor _, volume :\u003d range pod.Spec.Volumes {"},{"line_number":73,"context_line":"\t\t\tif volume.Name \u003d\u003d secretName {"},{"line_number":74,"context_line":"\t\t\t\tfmt.Fprintf(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":75,"context_line":"\t\t\t\terr :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, \u0026metav1.DeleteOptions{})"},{"line_number":76,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":77,"context_line":"\t\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_e7caf317","line":74,"range":{"start_line":74,"start_character":16,"end_line":74,"end_character":25},"updated":"2020-09-22 21:27:51.000000000","message":"are these log messages? or useful output, that can be parsed for something in theory? Either way, please propagate this from cmd level. If it is meant to be parsed, use cmd.OutOrStdout, if not, write to log.","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":71,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":72,"context_line":"\t\tfor _, volume :\u003d range pod.Spec.Volumes {"},{"line_number":73,"context_line":"\t\t\tif volume.Name \u003d\u003d secretName {"},{"line_number":74,"context_line":"\t\t\t\tfmt.Fprintf(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":75,"context_line":"\t\t\t\terr :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, \u0026metav1.DeleteOptions{})"},{"line_number":76,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":77,"context_line":"\t\t\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_d8d684f2","line":74,"range":{"start_line":74,"start_character":16,"end_line":74,"end_character":25},"in_reply_to":"9f560f44_e7caf317","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":71,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":72,"context_line":"\t\tfor _, volume :\u003d range pod.Spec.Volumes {"},{"line_number":73,"context_line":"\t\t\tif volume.Name \u003d\u003d secretName {"},{"line_number":74,"context_line":"\t\t\t\tfmt.Fprintf(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":75,"context_line":"\t\t\t\terr :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, \u0026metav1.DeleteOptions{})"},{"line_number":76,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":77,"context_line":"\t\t\t\t\treturn err"},{"line_number":78,"context_line":"\t\t\t\t}"},{"line_number":79,"context_line":"\t\t\t\tbreak"},{"line_number":80,"context_line":"\t\t\t}"},{"line_number":81,"context_line":"\t\t}"},{"line_number":82,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_447bc6bd","line":79,"range":{"start_line":74,"start_character":59,"end_line":79,"end_character":9},"updated":"2020-09-23 16:53:07.000000000","message":"simplify:\n\n  return manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, \u0026metav1.DeleteOptions{})","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":71,"context_line":"\tfor _, pod :\u003d range pods.Items {"},{"line_number":72,"context_line":"\t\tfor _, volume :\u003d range pod.Spec.Volumes {"},{"line_number":73,"context_line":"\t\t\tif volume.Name \u003d\u003d secretName {"},{"line_number":74,"context_line":"\t\t\t\tfmt.Fprintf(os.Stdout, \"Deleting pod - \"+pod.Name+\"\\n\")"},{"line_number":75,"context_line":"\t\t\t\terr :\u003d manager.kclient.CoreV1().Pods(ns).Delete(pod.Name, \u0026metav1.DeleteOptions{})"},{"line_number":76,"context_line":"\t\t\t\tif err !\u003d nil {"},{"line_number":77,"context_line":"\t\t\t\t\treturn err"},{"line_number":78,"context_line":"\t\t\t\t}"},{"line_number":79,"context_line":"\t\t\t\tbreak"},{"line_number":80,"context_line":"\t\t\t}"},{"line_number":81,"context_line":"\t\t}"},{"line_number":82,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_b8d110fb","line":79,"range":{"start_line":74,"start_character":59,"end_line":79,"end_character":9},"in_reply_to":"9f560f44_447bc6bd","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"519b512c284535cc2d7ac077a3d8329d2d4a6e26","unresolved":false,"context_lines":[{"line_number":87,"context_line":"// rotateAllTokens rotates all the tokens in the given ns"},{"line_number":88,"context_line":"func (manager TokenManager) rotateAllTokens(ns string) error {"},{"line_number":89,"context_line":"\tsecrets, err :\u003d manager.kclient.CoreV1()."},{"line_number":90,"context_line":"\t\tSecrets(ns).List(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", corev1.SecretTypeServiceAccountToken)})"},{"line_number":91,"context_line":"\tif err !\u003d nil {"},{"line_number":92,"context_line":"\t\treturn err"},{"line_number":93,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_e45ada4d","line":90,"range":{"start_line":90,"start_character":38,"end_line":90,"end_character":114},"updated":"2020-09-23 16:53:07.000000000","message":"Let\u0027s extract this to a local variable","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":87,"context_line":"// rotateAllTokens rotates all the tokens in the given ns"},{"line_number":88,"context_line":"func (manager TokenManager) rotateAllTokens(ns string) error {"},{"line_number":89,"context_line":"\tsecrets, err :\u003d manager.kclient.CoreV1()."},{"line_number":90,"context_line":"\t\tSecrets(ns).List(metav1.ListOptions{FieldSelector: fmt.Sprintf(\"type\u003d%s\", corev1.SecretTypeServiceAccountToken)})"},{"line_number":91,"context_line":"\tif err !\u003d nil {"},{"line_number":92,"context_line":"\t\treturn err"},{"line_number":93,"context_line":"\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_18063c87","line":90,"range":{"start_line":90,"start_character":38,"end_line":90,"end_character":114},"in_reply_to":"9f560f44_e45ada4d","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":112,"context_line":"\t\treturn err"},{"line_number":113,"context_line":"\t}"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"\tif string(secret.Type) \u003d\u003d fmt.Sprintf(\"%s\", corev1.SecretTypeServiceAccountToken) {"},{"line_number":116,"context_line":"\t\terr :\u003d manager.rotate(secretName, ns)"},{"line_number":117,"context_line":"\t\tif err !\u003d nil {"},{"line_number":118,"context_line":"\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_49e11f2b","line":115,"range":{"start_line":115,"start_character":1,"end_line":115,"end_character":82},"updated":"2020-09-23 16:07:27.000000000","message":"if secret.Type \u003d\u003d corev1.SecretTypeServiceAccountToken","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":112,"context_line":"\t\treturn err"},{"line_number":113,"context_line":"\t}"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"\tif string(secret.Type) \u003d\u003d fmt.Sprintf(\"%s\", corev1.SecretTypeServiceAccountToken) {"},{"line_number":116,"context_line":"\t\terr :\u003d manager.rotate(secretName, ns)"},{"line_number":117,"context_line":"\t\tif err !\u003d nil {"},{"line_number":118,"context_line":"\t\t\treturn err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_f808a891","line":115,"range":{"start_line":115,"start_character":1,"end_line":115,"end_character":82},"in_reply_to":"9f560f44_49e11f2b","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"// rotate performs delete action for secrets and its pods"},{"line_number":127,"context_line":"func (manager TokenManager) rotate(secretName string, secretNamespace string) error {"},{"line_number":128,"context_line":"\tfmt.Fprintf(os.Stdout, \"Rotating token - \"+secretName+\"\\n\")"},{"line_number":129,"context_line":"\terr :\u003d manager.deleteSecret(secretName, secretNamespace)"},{"line_number":130,"context_line":"\tif err !\u003d nil {"},{"line_number":131,"context_line":"\t\treturn err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_47cc7f33","line":128,"range":{"start_line":128,"start_character":13,"end_line":128,"end_character":22},"updated":"2020-09-22 21:27:51.000000000","message":"same here","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"// rotate performs delete action for secrets and its pods"},{"line_number":127,"context_line":"func (manager TokenManager) rotate(secretName string, secretNamespace string) error {"},{"line_number":128,"context_line":"\tfmt.Fprintf(os.Stdout, \"Rotating token - \"+secretName+\"\\n\")"},{"line_number":129,"context_line":"\terr :\u003d manager.deleteSecret(secretName, secretNamespace)"},{"line_number":130,"context_line":"\tif err !\u003d nil {"},{"line_number":131,"context_line":"\t\treturn err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_38ffc066","line":128,"range":{"start_line":128,"start_character":13,"end_line":128,"end_character":22},"in_reply_to":"9f560f44_47cc7f33","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"pkg/cluster/resetsatoken/resetsatoken_test.go":[{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"a914ed9b18ea908baaccc1c19f5e0f81b0b71e89","unresolved":false,"context_lines":[{"line_number":19,"context_line":"\t\"io/ioutil\""},{"line_number":20,"context_line":"\t\"testing\""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"\t//\t\"github.com/golangci/golangci-lint/pkg/config\""},{"line_number":23,"context_line":"\t\"github.com/golangplus/testing/assert\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"\tv1 \"k8s.io/api/core/v1\""}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_0d1061a8","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":50},"updated":"2020-09-15 19:55:08.000000000","message":"delete this","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":98,"context_line":"\t\t}"},{"line_number":99,"context_line":"\t\tra :\u003d fake.WithTypedObjects(objects...)"},{"line_number":100,"context_line":"\t\tkclient :\u003d fake.NewClient(ra)"},{"line_number":101,"context_line":"\t\tassert.NotEqual(t, \"settings\", cfg, nil)"},{"line_number":102,"context_line":"\t\tassert.NotEqual(t, \"client\", kclient, nil)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"\t\tclientset :\u003d kclient.ClientSet()"},{"line_number":105,"context_line":"\t\tmanager, err :\u003d NewTokenManager(clientset)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_a9cb9ba1","line":102,"range":{"start_line":101,"start_character":0,"end_line":102,"end_character":44},"updated":"2020-09-23 16:07:27.000000000","message":"These assertions also don\u0027t make sense","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":98,"context_line":"\t\t}"},{"line_number":99,"context_line":"\t\tra :\u003d fake.WithTypedObjects(objects...)"},{"line_number":100,"context_line":"\t\tkclient :\u003d fake.NewClient(ra)"},{"line_number":101,"context_line":"\t\tassert.NotEqual(t, \"settings\", cfg, nil)"},{"line_number":102,"context_line":"\t\tassert.NotEqual(t, \"client\", kclient, nil)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"\t\tclientset :\u003d kclient.ClientSet()"},{"line_number":105,"context_line":"\t\tmanager, err :\u003d NewTokenManager(clientset)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_b83f5020","line":102,"range":{"start_line":101,"start_character":0,"end_line":102,"end_character":44},"in_reply_to":"9f560f44_a9cb9ba1","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":28869,"name":"Ian Howell","email":"ian.howell0@gmail.com","username":"ian"},"change_message_id":"f3e040e9a082f4b2e30885963f3f25f08f951183","unresolved":false,"context_lines":[{"line_number":114,"context_line":"\t\tactions :\u003d clientset.(*kfake.Clientset).Actions()"},{"line_number":115,"context_line":"\t\tpodDeleteActions :\u003d filterActions(actions, \"pods\", \"delete\")"},{"line_number":116,"context_line":"\t\tsecretDeleteActions :\u003d filterActions(actions, \"secrets\", \"delete\")"},{"line_number":117,"context_line":"\t\tif len(podDeleteActions) !\u003d testCase.numPodDeletes {"},{"line_number":118,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d pod deletes but got %d\","},{"line_number":119,"context_line":"\t\t\t\ttestCase.name, testCase.numPodDeletes, len(podDeleteActions))"},{"line_number":120,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_09c44791","line":117,"range":{"start_line":117,"start_character":2,"end_line":117,"end_character":52},"updated":"2020-09-23 16:07:27.000000000","message":"ditto: unnecessary ifs and t.Fatals","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":114,"context_line":"\t\tactions :\u003d clientset.(*kfake.Clientset).Actions()"},{"line_number":115,"context_line":"\t\tpodDeleteActions :\u003d filterActions(actions, \"pods\", \"delete\")"},{"line_number":116,"context_line":"\t\tsecretDeleteActions :\u003d filterActions(actions, \"secrets\", \"delete\")"},{"line_number":117,"context_line":"\t\tif len(podDeleteActions) !\u003d testCase.numPodDeletes {"},{"line_number":118,"context_line":"\t\t\tt.Fatalf(\"%s: expected %d pod deletes but got %d\","},{"line_number":119,"context_line":"\t\t\t\ttestCase.name, testCase.numPodDeletes, len(podDeleteActions))"},{"line_number":120,"context_line":"\t\t}"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_d844c4ba","line":117,"range":{"start_line":117,"start_character":2,"end_line":117,"end_character":52},"in_reply_to":"9f560f44_09c44791","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"pkg/secret/checkexpiration/checkexpiration.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":31,"context_line":")"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"// ExpirationInfo captures expiation information of all secrets, certificates and kubeconfigs"},{"line_number":34,"context_line":"type ExpirationInfo struct {"},{"line_number":35,"context_line":"\tTLSSecret []SecretInfo     `json:\"TlsSecret,omitempty\" yaml:\"TlsSecret,omitempty\"`"},{"line_number":36,"context_line":"\tKubeconf  []KubeconfigInfo `json:\"Kubeconf,omitempty\" yaml:\"Kubeconf,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_80906197","line":33,"range":{"start_line":33,"start_character":27,"end_line":33,"end_character":36},"updated":"2020-09-04 17:57:33.000000000","message":"expiration","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":30,"context_line":"\t\"opendev.org/airship/airshipctl/pkg/k8s/client\""},{"line_number":31,"context_line":")"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"// ExpirationInfo captures expiation information of all secrets, certificates and kubeconfigs"},{"line_number":34,"context_line":"type ExpirationInfo struct {"},{"line_number":35,"context_line":"\tTLSSecret []SecretInfo     `json:\"TlsSecret,omitempty\" yaml:\"TlsSecret,omitempty\"`"},{"line_number":36,"context_line":"\tKubeconf  []KubeconfigInfo `json:\"Kubeconf,omitempty\" yaml:\"Kubeconf,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_8c0e8e2f","line":33,"range":{"start_line":33,"start_character":27,"end_line":33,"end_character":36},"in_reply_to":"9f560f44_80906197","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"\tNodeCert  []NodeCertInfo   `json:\"NodeCert,omitempty\" yaml:\"NodeCert,omitempty\"`"},{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"// SecretInfo captures expiation information of all secrets"},{"line_number":41,"context_line":"type SecretInfo struct {"},{"line_number":42,"context_line":"\tSecretName      string            `json:\"SecretName,omitempty\" yaml:\"SecretName,omitempty\"`"},{"line_number":43,"context_line":"\tSecretNamespace string            `json:\"SecretNamespace,omitempty\" yaml:\"SecretNamespace,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_a0eac50a","line":40,"range":{"start_line":40,"start_character":23,"end_line":40,"end_character":32},"updated":"2020-09-04 17:57:33.000000000","message":"expiration","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":37,"context_line":"\tNodeCert  []NodeCertInfo   `json:\"NodeCert,omitempty\" yaml:\"NodeCert,omitempty\"`"},{"line_number":38,"context_line":"}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"// SecretInfo captures expiation information of all secrets"},{"line_number":41,"context_line":"type SecretInfo struct {"},{"line_number":42,"context_line":"\tSecretName      string            `json:\"SecretName,omitempty\" yaml:\"SecretName,omitempty\"`"},{"line_number":43,"context_line":"\tSecretNamespace string            `json:\"SecretNamespace,omitempty\" yaml:\"SecretNamespace,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_ec190a7a","line":40,"range":{"start_line":40,"start_character":23,"end_line":40,"end_character":32},"in_reply_to":"9f560f44_a0eac50a","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":44,"context_line":"\tData            []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":45,"context_line":"}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"// CertificateInfo captures expiation information of all certificates"},{"line_number":48,"context_line":"type CertificateInfo struct {"},{"line_number":49,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":50,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_c0e7f945","line":47,"range":{"start_line":47,"start_character":28,"end_line":47,"end_character":37},"updated":"2020-09-04 17:57:33.000000000","message":"expiration","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":44,"context_line":"\tData            []CertificateInfo `json:\"Data,omitempty\" yaml:\"Data,omitempty\"`"},{"line_number":45,"context_line":"}"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"// CertificateInfo captures expiation information of all certificates"},{"line_number":48,"context_line":"type CertificateInfo struct {"},{"line_number":49,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":50,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_cc140644","line":47,"range":{"start_line":47,"start_character":28,"end_line":47,"end_character":37},"in_reply_to":"9f560f44_c0e7f945","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":51,"context_line":"}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"// KubeconfigInfo captures expiation information of all kubeconfigs"},{"line_number":54,"context_line":"type KubeconfigInfo struct {"},{"line_number":55,"context_line":"\tSecretName      string        `json:\"SecretName,omitempty\" yaml:\"SecretName,omitempty\"`"},{"line_number":56,"context_line":"\tSecretNamespace string        `json:\"SecretNamespace,omitempty\" yaml:\"SecretNamespace,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_e0f4bdf3","line":53,"range":{"start_line":53,"start_character":27,"end_line":53,"end_character":36},"updated":"2020-09-04 17:57:33.000000000","message":"expiration","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":50,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":51,"context_line":"}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"// KubeconfigInfo captures expiation information of all kubeconfigs"},{"line_number":54,"context_line":"type KubeconfigInfo struct {"},{"line_number":55,"context_line":"\tSecretName      string        `json:\"SecretName,omitempty\" yaml:\"SecretName,omitempty\"`"},{"line_number":56,"context_line":"\tSecretNamespace string        `json:\"SecretNamespace,omitempty\" yaml:\"SecretNamespace,omitempty\"`"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_2c294289","line":53,"range":{"start_line":53,"start_character":27,"end_line":53,"end_character":36},"in_reply_to":"9f560f44_e0f4bdf3","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"\tUser            []UserInfo    `json:\"User,omitempty\" yaml:\"User,omitempty\"`"},{"line_number":59,"context_line":"}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"// ClusterInfo captures cluster ca certificate expiry information"},{"line_number":62,"context_line":"type ClusterInfo struct {"},{"line_number":63,"context_line":"\tName            string `json:\"Name,omitempty\" yaml:\"Name,omitempty\"`"},{"line_number":64,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":65,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":66,"context_line":"}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"// UserInfo captures kubeconfig\u0027s user\u0027s certificate expiry information"},{"line_number":69,"context_line":"type UserInfo struct {"},{"line_number":70,"context_line":"\tName            string `json:\"Name,omitempty\" yaml:\"Name,omitempty\"`"},{"line_number":71,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":72,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":73,"context_line":"}"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"// NodeCertInfo captures certificate expiry information for certificates on the node"},{"line_number":76,"context_line":"type NodeCertInfo struct {"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_80e5013b","line":73,"range":{"start_line":61,"start_character":0,"end_line":73,"end_character":1},"updated":"2020-09-04 17:57:33.000000000","message":"Outside of name, these structures are identical. Can they not be genericized?","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":58,"context_line":"\tUser            []UserInfo    `json:\"User,omitempty\" yaml:\"User,omitempty\"`"},{"line_number":59,"context_line":"}"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"// ClusterInfo captures cluster ca certificate expiry information"},{"line_number":62,"context_line":"type ClusterInfo struct {"},{"line_number":63,"context_line":"\tName            string `json:\"Name,omitempty\" yaml:\"Name,omitempty\"`"},{"line_number":64,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":65,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":66,"context_line":"}"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"// UserInfo captures kubeconfig\u0027s user\u0027s certificate expiry information"},{"line_number":69,"context_line":"type UserInfo struct {"},{"line_number":70,"context_line":"\tName            string `json:\"Name,omitempty\" yaml:\"Name,omitempty\"`"},{"line_number":71,"context_line":"\tCertificateName string `json:\"CertificateName,omitempty\" yaml:\"CertificateName,omitempty\"`"},{"line_number":72,"context_line":"\tExpiryDate      string `json:\"ExpiryDate,omitempty\" yaml:\"ExpiryDate,omitempty\"`"},{"line_number":73,"context_line":"}"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"// NodeCertInfo captures certificate expiry information for certificates on the node"},{"line_number":76,"context_line":"type NodeCertInfo struct {"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_0c2c3e97","line":73,"range":{"start_line":61,"start_character":0,"end_line":73,"end_character":1},"in_reply_to":"9f560f44_80e5013b","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"}],"pkg/secret/resetsatoken/doc.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"9f560f44_e05b1df3","updated":"2020-09-04 17:57:33.000000000","message":"Same for this file.","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":16,"id":"9f560f44_2c4e626e","in_reply_to":"9f560f44_e05b1df3","updated":"2020-09-10 10:06:56.000000000","message":"Done","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"}],"pkg/util/json/writer.go":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"c4566cc0c3c8d134c20da8c6eb9d1aa3e4c153c5","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"// WriteOut dumps any yaml compatible document to writer, adding yaml separator `---`"},{"line_number":25,"context_line":"// at the beginning of the document, and `...` at the end"},{"line_number":26,"context_line":"func WriteOut(dst io.Writer, src interface{}) error {"},{"line_number":27,"context_line":"\tbuffer, err :\u003d json.MarshalIndent(src, \"\", \"    \")"},{"line_number":28,"context_line":"\tif err !\u003d nil {"},{"line_number":29,"context_line":"\t\treturn fmt.Errorf(\"Unable to parse to JSON  %s\", err.Error())"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_a02f653c","line":26,"range":{"start_line":26,"start_character":4,"end_line":26,"end_character":53},"updated":"2020-09-04 17:57:33.000000000","message":"Please use the existing method [0].\n\n[0] https://github.com/airshipit/airshipctl/blob/master/pkg/util/yaml/writer.go#L32","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"c695f22142605c70436a36357191b2c3765d27fb","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"// WriteOut dumps any yaml compatible document to writer, adding yaml separator `---`"},{"line_number":25,"context_line":"// at the beginning of the document, and `...` at the end"},{"line_number":26,"context_line":"func WriteOut(dst io.Writer, src interface{}) error {"},{"line_number":27,"context_line":"\tbuffer, err :\u003d json.MarshalIndent(src, \"\", \"    \")"},{"line_number":28,"context_line":"\tif err !\u003d nil {"},{"line_number":29,"context_line":"\t\treturn fmt.Errorf(\"Unable to parse to JSON  %s\", err.Error())"}],"source_content_type":"text/x-go","patch_set":16,"id":"9f560f44_6c6dfaca","line":26,"range":{"start_line":26,"start_character":4,"end_line":26,"end_character":53},"in_reply_to":"9f560f44_a02f653c","updated":"2020-09-10 10:06:56.000000000","message":"Thanks for the comments. Was planning to keep JSON and YAML output writers separate and hence included two modules","commit_id":"5b616210a5f1c199904c1b0581dab2062a4ec6fc"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\t\"encoding/json\""},{"line_number":22,"context_line":")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"// WriteOut dumps any yaml compatible document to writer, adding yaml separator `---`"},{"line_number":25,"context_line":"// at the beginning of the document, and `...` at the end"},{"line_number":26,"context_line":"func WriteOut(dst io.Writer, src interface{}) error {"},{"line_number":27,"context_line":"\tbuffer, err :\u003d json.MarshalIndent(src, \"\", \"    \")"},{"line_number":28,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":38,"id":"9f560f44_2243b46e","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":57},"updated":"2020-09-22 21:27:51.000000000","message":"i think u need to update this comment","commit_id":"f65dad3a1f78b3217603f850c33b5a1b80244c03"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\t\"encoding/json\""},{"line_number":22,"context_line":")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"// WriteOut dumps any yaml compatible document to writer, adding yaml separator `---`"},{"line_number":25,"context_line":"// at the beginning of the document, and `...` at the end"},{"line_number":26,"context_line":"func WriteOut(dst io.Writer, src interface{}) error {"},{"line_number":27,"context_line":"\tbuffer, err :\u003d json.MarshalIndent(src, \"\", \"    \")"},{"line_number":28,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_c77b6fbc","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":57},"updated":"2020-09-22 21:27:51.000000000","message":"This comment is not valid for json","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\t\"encoding/json\""},{"line_number":22,"context_line":")"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"// WriteOut dumps any yaml compatible document to writer, adding yaml separator `---`"},{"line_number":25,"context_line":"// at the beginning of the document, and `...` at the end"},{"line_number":26,"context_line":"func WriteOut(dst io.Writer, src interface{}) error {"},{"line_number":27,"context_line":"\tbuffer, err :\u003d json.MarshalIndent(src, \"\", \"    \")"},{"line_number":28,"context_line":"\tif err !\u003d nil {"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_b8eab09c","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":57},"in_reply_to":"9f560f44_c77b6fbc","updated":"2020-09-24 11:24:39.000000000","message":"Removed this Json package and gave a local reference for checkexpiration","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"// WriteOut dumps any yaml compatible document to writer, adding yaml separator `---`"},{"line_number":25,"context_line":"// at the beginning of the document, and `...` at the end"},{"line_number":26,"context_line":"func WriteOut(dst io.Writer, src interface{}) error {"},{"line_number":27,"context_line":"\tbuffer, err :\u003d json.MarshalIndent(src, \"\", \"    \")"},{"line_number":28,"context_line":"\tif err !\u003d nil {"},{"line_number":29,"context_line":"\t\treturn fmt.Errorf(\"Unable to parse to JSON  %s\", err.Error())"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_439912ce","line":26,"range":{"start_line":26,"start_character":5,"end_line":26,"end_character":13},"updated":"2020-09-22 21:27:51.000000000","message":"If multiple documets are sequentially written to the same writer using this method, how would output look like? What i mean, would they at least be written on new line each? This is a question, I don\u0027t don\u0027t quite understand this from the code and tests, and trying to understand the reasoning of creating this as new package, if it\u0027s simple separator for one function, rather make separator constant, and use unmarshal inplace not in separate package.","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":26,"context_line":"func WriteOut(dst io.Writer, src interface{}) error {"},{"line_number":27,"context_line":"\tbuffer, err :\u003d json.MarshalIndent(src, \"\", \"    \")"},{"line_number":28,"context_line":"\tif err !\u003d nil {"},{"line_number":29,"context_line":"\t\treturn fmt.Errorf(\"Unable to parse to JSON  %s\", err.Error())"},{"line_number":30,"context_line":"\t}"},{"line_number":31,"context_line":"\t_, err \u003d dst.Write(buffer)"},{"line_number":32,"context_line":"\treturn err"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_83784a7e","line":29,"range":{"start_line":29,"start_character":9,"end_line":29,"end_character":63},"updated":"2020-09-22 21:27:51.000000000","message":"should be error object in errors.go","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}],"pkg/util/json/writer_test.go":[{"author":{"_account_id":31968,"name":"Bijaya Sharma","email":"vetbijaya@gmail.com","username":"bijayasharma"},"change_message_id":"76dd8f0453affb5aafd766fd0f94fe21ad391e26","unresolved":false,"context_lines":[{"line_number":21,"context_line":"\t\"time\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"\t\"github.com/stretchr/testify/assert\""},{"line_number":24,"context_line":"\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\""},{"line_number":25,"context_line":")"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"func TestWriteOut(t *testing.T) {"}],"source_content_type":"text/x-go","patch_set":45,"id":"9f560f44_385d5c79","line":24,"range":{"start_line":24,"start_character":1,"end_line":24,"end_character":7},"updated":"2020-09-18 21:14:24.000000000","message":"I think we don\u0027t need alias here. It is better to delete this.","commit_id":"f6dcd9e43d207f909b4f71081a2e1bbfaa393628"},{"author":{"_account_id":31968,"name":"Bijaya Sharma","email":"vetbijaya@gmail.com","username":"bijayasharma"},"change_message_id":"76dd8f0453affb5aafd766fd0f94fe21ad391e26","unresolved":false,"context_lines":[{"line_number":20,"context_line":"\t\"testing\""},{"line_number":21,"context_line":"\t\"time\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"\t\"github.com/stretchr/testify/assert\""},{"line_number":24,"context_line":"\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\""},{"line_number":25,"context_line":")"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"func TestWriteOut(t *testing.T) {"}],"source_content_type":"text/x-go","patch_set":45,"id":"9f560f44_58cf7028","line":24,"range":{"start_line":23,"start_character":1,"end_line":24,"end_character":46},"updated":"2020-09-18 21:14:24.000000000","message":"Please add a space between these two lines.","commit_id":"f6dcd9e43d207f909b4f71081a2e1bbfaa393628"},{"author":{"_account_id":21991,"name":"Kostyantyn Kalynovskyi","email":"kkalinovskiy@gmail.com","username":"kkalynovskyi"},"change_message_id":"064e8d5ce72355a4c4d615027a5932d22fb8a417","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"\t// Check if you can marshal the results of writeout back to the Object"},{"line_number":55,"context_line":"\terr \u003d json.Unmarshal(b.Bytes(), \u0026rob)"},{"line_number":56,"context_line":"\tif err !\u003d nil {"},{"line_number":57,"context_line":"\t\tt.Fatalf(\"Result of write out can not be transformed back into original object: %v\", err)"},{"line_number":58,"context_line":"\t}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"\t// Compare original object with reverse marshaled"},{"line_number":61,"context_line":"\tassert.Equal(t, ob, \u0026rob)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_63089626","line":58,"range":{"start_line":56,"start_character":0,"end_line":58,"end_character":2},"updated":"2020-09-22 21:27:51.000000000","message":"do require.NoError(t, err) instead here","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"},{"author":{"_account_id":32141,"name":"Guhan Eswaran","email":"guhan.e20@gmail.com","username":"guhaneswaran20"},"change_message_id":"2405a36a7ef1df55e05e4c7c11ab510aec2f04bd","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"\t// Check if you can marshal the results of writeout back to the Object"},{"line_number":55,"context_line":"\terr \u003d json.Unmarshal(b.Bytes(), \u0026rob)"},{"line_number":56,"context_line":"\tif err !\u003d nil {"},{"line_number":57,"context_line":"\t\tt.Fatalf(\"Result of write out can not be transformed back into original object: %v\", err)"},{"line_number":58,"context_line":"\t}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"\t// Compare original object with reverse marshaled"},{"line_number":61,"context_line":"\tassert.Equal(t, ob, \u0026rob)"}],"source_content_type":"text/x-go","patch_set":53,"id":"9f560f44_182bdcea","line":58,"range":{"start_line":56,"start_character":0,"end_line":58,"end_character":2},"in_reply_to":"9f560f44_63089626","updated":"2020-09-24 11:24:39.000000000","message":"Done","commit_id":"236113eef47bb059bf809a5cd8a7c3a968f07154"}]}
