{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments/222677661","pull_request_review_id":161621761,"id":222677661,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjY3NzY2MQ==","diff_hunk":"@@ -227,13 +229,18 @@ func Generate(cs *api.OpenShiftManagedCluster, pluginConfig api.PluginConfig) (e\n \t\tif cert.signingKey == nil && cert.signingCert == nil {\n \t\t\tcert.signingKey, cert.signingCert = c.Certificates.Ca.Key, c.Certificates.Ca.Cert\n \t\t}\n-\t\tif *cert.key != nil && *cert.cert != nil &&\n-\t\t\t((*cert.cert).CheckSignatureFrom(cert.signingCert) == nil || cert.selfSign) {\n-\t\t\tcontinue\n-\t\t}\n-\t\tif *cert.key, *cert.cert, err = tls.NewCert(cert.cn, cert.organization, cert.dnsNames, cert.ipAddresses, cert.extKeyUsage, cert.signingKey, cert.signingCert, cert.selfSign); err != nil {\n+\t\tvar k *rsa.PrivateKey\n+\t\tvar c *x509.Certificate\n+\t\tif k, c, err = tls.NewCert(cert.cn, cert.organization, cert.dnsNames, cert.ipAddresses, cert.extKeyUsage, cert.signingKey, cert.signingCert, false); err != nil {\n \t\t\treturn\n \t\t}\n+\t\t// compare certificate and replace if update is needed\n+\t\t// if at any point we start using self-sign certificates again\n+\t\t// (see console certificate comment), logic inside certEqual needs\n+\t\t// to be updated for this.\n+\t\tif !certEqual(c, *cert.cert) {","path":"pkg/config/generate.go","position":68,"original_position":68,"commit_id":"373b78783512c59c1e4fb4c22a404b00cfab7f61","original_commit_id":"373b78783512c59c1e4fb4c22a404b00cfab7f61","user":{"login":"mjudeikis","id":3225744,"node_id":"MDQ6VXNlcjMyMjU3NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3225744?v=4","gravatar_id":"","url":"https://api.github.com/users/mjudeikis","html_url":"https://github.com/mjudeikis","followers_url":"https://api.github.com/users/mjudeikis/followers","following_url":"https://api.github.com/users/mjudeikis/following{/other_user}","gists_url":"https://api.github.com/users/mjudeikis/gists{/gist_id}","starred_url":"https://api.github.com/users/mjudeikis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjudeikis/subscriptions","organizations_url":"https://api.github.com/users/mjudeikis/orgs","repos_url":"https://api.github.com/users/mjudeikis/repos","events_url":"https://api.github.com/users/mjudeikis/events{/privacy}","received_events_url":"https://api.github.com/users/mjudeikis/received_events","type":"User","site_admin":false},"body":"the challenge is that if lets say I change API FQDN. I have `config` object with Old values. And I have 18 certificates, without any distinguished mapping which certificate is using FQDN in any field. \r\nSo when logic comes to `Router` certificate - It will not match any of the values, so logic would say that it needs to be regenerated. When in reality - it does not.\r\n\r\nIf we want to compare certificates with values without generation - certificates should have list of attributes assigned to them to know which certs should contain one or another attribute. \r\n\r\nI might be getting this from the wrong angle, but each time I dont generate certificate I get \"mapping problem\" to check right values with right certificates. ","created_at":"2018-10-04T13:53:17Z","updated_at":"2018-10-04T13:53:17Z","html_url":"https://github.com/openshift/openshift-azure/pull/519#discussion_r222677661","pull_request_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/519","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments/222677661"},"html":{"href":"https://github.com/openshift/openshift-azure/pull/519#discussion_r222677661"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/519"}},"in_reply_to_id":222128394},"pull_request":{"url":"https://api.github.com/repos/openshift/openshift-azure/pulls/519","id":218088523,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MDg4NTIz","html_url":"https://github.com/openshift/openshift-azure/pull/519","diff_url":"https://github.com/openshift/openshift-azure/pull/519.diff","patch_url":"https://github.com/openshift/openshift-azure/pull/519.patch","issue_url":"https://api.github.com/repos/openshift/openshift-azure/issues/519","number":519,"state":"open","locked":false,"title":"regen certs on update","user":{"login":"mjudeikis","id":3225744,"node_id":"MDQ6VXNlcjMyMjU3NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3225744?v=4","gravatar_id":"","url":"https://api.github.com/users/mjudeikis","html_url":"https://github.com/mjudeikis","followers_url":"https://api.github.com/users/mjudeikis/followers","following_url":"https://api.github.com/users/mjudeikis/following{/other_user}","gists_url":"https://api.github.com/users/mjudeikis/gists{/gist_id}","starred_url":"https://api.github.com/users/mjudeikis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjudeikis/subscriptions","organizations_url":"https://api.github.com/users/mjudeikis/orgs","repos_url":"https://api.github.com/users/mjudeikis/repos","events_url":"https://api.github.com/users/mjudeikis/events{/privacy}","received_events_url":"https://api.github.com/users/mjudeikis/received_events","type":"User","site_admin":false},"body":"Regenerates certificate if dependency property changed. ","created_at":"2018-09-25T19:12:38Z","updated_at":"2018-10-04T13:53:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c9f1420485447afc06a8604ffba2f002bc664174","assignee":null,"assignees":[],"requested_reviewers":[{"login":"thekad","id":46422,"node_id":"MDQ6VXNlcjQ2NDIy","avatar_url":"https://avatars1.githubusercontent.com/u/46422?v=4","gravatar_id":"","url":"https://api.github.com/users/thekad","html_url":"https://github.com/thekad","followers_url":"https://api.github.com/users/thekad/followers","following_url":"https://api.github.com/users/thekad/following{/other_user}","gists_url":"https://api.github.com/users/thekad/gists{/gist_id}","starred_url":"https://api.github.com/users/thekad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thekad/subscriptions","organizations_url":"https://api.github.com/users/thekad/orgs","repos_url":"https://api.github.com/users/thekad/repos","events_url":"https://api.github.com/users/thekad/events{/privacy}","received_events_url":"https://api.github.com/users/thekad/received_events","type":"User","site_admin":false},{"login":"charlesakalugwu","id":5978370,"node_id":"MDQ6VXNlcjU5NzgzNzA=","avatar_url":"https://avatars2.githubusercontent.com/u/5978370?v=4","gravatar_id":"","url":"https://api.github.com/users/charlesakalugwu","html_url":"https://github.com/charlesakalugwu","followers_url":"https://api.github.com/users/charlesakalugwu/followers","following_url":"https://api.github.com/users/charlesakalugwu/following{/other_user}","gists_url":"https://api.github.com/users/charlesakalugwu/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesakalugwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesakalugwu/subscriptions","organizations_url":"https://api.github.com/users/charlesakalugwu/orgs","repos_url":"https://api.github.com/users/charlesakalugwu/repos","events_url":"https://api.github.com/users/charlesakalugwu/events{/privacy}","received_events_url":"https://api.github.com/users/charlesakalugwu/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1006544929,"node_id":"MDU6TGFiZWwxMDA2NTQ0OTI5","url":"https://api.github.com/repos/openshift/openshift-azure/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":1006517260,"node_id":"MDU6TGFiZWwxMDA2NTE3MjYw","url":"https://api.github.com/repos/openshift/openshift-azure/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/519/commits","review_comments_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/519/comments","review_comment_url":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/openshift-azure/issues/519/comments","statuses_url":"https://api.github.com/repos/openshift/openshift-azure/statuses/373b78783512c59c1e4fb4c22a404b00cfab7f61","head":{"label":"mjudeikis:generate.on.update","ref":"generate.on.update","sha":"373b78783512c59c1e4fb4c22a404b00cfab7f61","user":{"login":"mjudeikis","id":3225744,"node_id":"MDQ6VXNlcjMyMjU3NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3225744?v=4","gravatar_id":"","url":"https://api.github.com/users/mjudeikis","html_url":"https://github.com/mjudeikis","followers_url":"https://api.github.com/users/mjudeikis/followers","following_url":"https://api.github.com/users/mjudeikis/following{/other_user}","gists_url":"https://api.github.com/users/mjudeikis/gists{/gist_id}","starred_url":"https://api.github.com/users/mjudeikis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjudeikis/subscriptions","organizations_url":"https://api.github.com/users/mjudeikis/orgs","repos_url":"https://api.github.com/users/mjudeikis/repos","events_url":"https://api.github.com/users/mjudeikis/events{/privacy}","received_events_url":"https://api.github.com/users/mjudeikis/received_events","type":"User","site_admin":false},"repo":{"id":139452008,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk0NTIwMDg=","name":"openshift-azure","full_name":"mjudeikis/openshift-azure","private":false,"owner":{"login":"mjudeikis","id":3225744,"node_id":"MDQ6VXNlcjMyMjU3NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/3225744?v=4","gravatar_id":"","url":"https://api.github.com/users/mjudeikis","html_url":"https://github.com/mjudeikis","followers_url":"https://api.github.com/users/mjudeikis/followers","following_url":"https://api.github.com/users/mjudeikis/following{/other_user}","gists_url":"https://api.github.com/users/mjudeikis/gists{/gist_id}","starred_url":"https://api.github.com/users/mjudeikis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjudeikis/subscriptions","organizations_url":"https://api.github.com/users/mjudeikis/orgs","repos_url":"https://api.github.com/users/mjudeikis/repos","events_url":"https://api.github.com/users/mjudeikis/events{/privacy}","received_events_url":"https://api.github.com/users/mjudeikis/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mjudeikis/openshift-azure","description":null,"fork":true,"url":"https://api.github.com/repos/mjudeikis/openshift-azure","forks_url":"https://api.github.com/repos/mjudeikis/openshift-azure/forks","keys_url":"https://api.github.com/repos/mjudeikis/openshift-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mjudeikis/openshift-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mjudeikis/openshift-azure/teams","hooks_url":"https://api.github.com/repos/mjudeikis/openshift-azure/hooks","issue_events_url":"https://api.github.com/repos/mjudeikis/openshift-azure/issues/events{/number}","events_url":"https://api.github.com/repos/mjudeikis/openshift-azure/events","assignees_url":"https://api.github.com/repos/mjudeikis/openshift-azure/assignees{/user}","branches_url":"https://api.github.com/repos/mjudeikis/openshift-azure/branches{/branch}","tags_url":"https://api.github.com/repos/mjudeikis/openshift-azure/tags","blobs_url":"https://api.github.com/repos/mjudeikis/openshift-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mjudeikis/openshift-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mjudeikis/openshift-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/mjudeikis/openshift-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mjudeikis/openshift-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/mjudeikis/openshift-azure/languages","stargazers_url":"https://api.github.com/repos/mjudeikis/openshift-azure/stargazers","contributors_url":"https://api.github.com/repos/mjudeikis/openshift-azure/contributors","subscribers_url":"https://api.github.com/repos/mjudeikis/openshift-azure/subscribers","subscription_url":"https://api.github.com/repos/mjudeikis/openshift-azure/subscription","commits_url":"https://api.github.com/repos/mjudeikis/openshift-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/mjudeikis/openshift-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/mjudeikis/openshift-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/mjudeikis/openshift-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/mjudeikis/openshift-azure/contents/{+path}","compare_url":"https://api.github.com/repos/mjudeikis/openshift-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mjudeikis/openshift-azure/merges","archive_url":"https://api.github.com/repos/mjudeikis/openshift-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mjudeikis/openshift-azure/downloads","issues_url":"https://api.github.com/repos/mjudeikis/openshift-azure/issues{/number}","pulls_url":"https://api.github.com/repos/mjudeikis/openshift-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/mjudeikis/openshift-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/mjudeikis/openshift-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mjudeikis/openshift-azure/labels{/name}","releases_url":"https://api.github.com/repos/mjudeikis/openshift-azure/releases{/id}","deployments_url":"https://api.github.com/repos/mjudeikis/openshift-azure/deployments","created_at":"2018-07-02T14:06:38Z","updated_at":"2018-10-03T07:56:13Z","pushed_at":"2018-10-03T07:58:37Z","git_url":"git://github.com/mjudeikis/openshift-azure.git","ssh_url":"git@github.com:mjudeikis/openshift-azure.git","clone_url":"https://github.com/mjudeikis/openshift-azure.git","svn_url":"https://github.com/mjudeikis/openshift-azure","homepage":null,"size":28083,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"e08b88ab63fc2b3671323bcdeb2064072267d2cf","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":137828518,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc4Mjg1MTg=","name":"openshift-azure","full_name":"openshift/openshift-azure","private":false,"owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openshift/openshift-azure","description":null,"fork":false,"url":"https://api.github.com/repos/openshift/openshift-azure","forks_url":"https://api.github.com/repos/openshift/openshift-azure/forks","keys_url":"https://api.github.com/repos/openshift/openshift-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/openshift-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/openshift-azure/teams","hooks_url":"https://api.github.com/repos/openshift/openshift-azure/hooks","issue_events_url":"https://api.github.com/repos/openshift/openshift-azure/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/openshift-azure/events","assignees_url":"https://api.github.com/repos/openshift/openshift-azure/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/openshift-azure/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/openshift-azure/tags","blobs_url":"https://api.github.com/repos/openshift/openshift-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/openshift-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/openshift-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/openshift-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/openshift-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/openshift-azure/languages","stargazers_url":"https://api.github.com/repos/openshift/openshift-azure/stargazers","contributors_url":"https://api.github.com/repos/openshift/openshift-azure/contributors","subscribers_url":"https://api.github.com/repos/openshift/openshift-azure/subscribers","subscription_url":"https://api.github.com/repos/openshift/openshift-azure/subscription","commits_url":"https://api.github.com/repos/openshift/openshift-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/openshift-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/openshift-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/openshift-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/openshift-azure/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/openshift-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/openshift-azure/merges","archive_url":"https://api.github.com/repos/openshift/openshift-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/openshift-azure/downloads","issues_url":"https://api.github.com/repos/openshift/openshift-azure/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/openshift-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/openshift-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/openshift-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/openshift-azure/labels{/name}","releases_url":"https://api.github.com/repos/openshift/openshift-azure/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/openshift-azure/deployments","created_at":"2018-06-19T02:11:07Z","updated_at":"2018-10-03T15:47:20Z","pushed_at":"2018-10-03T16:11:43Z","git_url":"git://github.com/openshift/openshift-azure.git","ssh_url":"git@github.com:openshift/openshift-azure.git","clone_url":"https://github.com/openshift/openshift-azure.git","svn_url":"https://github.com/openshift/openshift-azure","homepage":null,"size":28380,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":62,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":14,"open_issues":62,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/519"},"html":{"href":"https://github.com/openshift/openshift-azure/pull/519"},"issue":{"href":"https://api.github.com/repos/openshift/openshift-azure/issues/519"},"comments":{"href":"https://api.github.com/repos/openshift/openshift-azure/issues/519/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/519/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/openshift-azure/pulls/519/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/openshift-azure/statuses/373b78783512c59c1e4fb4c22a404b00cfab7f61"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mjudeikis"}}