From a0d5339e3e0429f184e1e4ec80d5b88e1940c35a Mon Sep 17 00:00:00 2001 From: qmhu Date: Wed, 12 Jan 2022 12:00:56 +0800 Subject: [PATCH 1/6] Update issue templates --- .github/ISSUE_TEMPLATE/feature_request.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..f5a3f5686 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,10 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +## Describe the feature From 3148bc2f4cb289d4f8ee9c4b46428877cf7af290 Mon Sep 17 00:00:00 2001 From: qmhu Date: Wed, 12 Jan 2022 12:17:21 +0800 Subject: [PATCH 2/6] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 31 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..5c197634c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: kind/bug +assignees: '' + +--- + +**What version of Crane?** + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment (please complete the following information):** + - K8S Version: [e.g. 1.19] + - Crane Version: [e.g. 0.1.0] + - Browser [e.g. chrome, safari] diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index f5a3f5686..8d1ded424 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: '' +labels: kind/feature assignees: '' --- From f743068c0ace1f5638c9cb5bd1b35ce6cc40d8e4 Mon Sep 17 00:00:00 2001 From: Jesse Meng Date: Wed, 12 Jan 2022 18:09:15 +0800 Subject: [PATCH 3/6] update webhook certs expiration to 10 years --- deploy/craned/deployment.yaml | 4 +-- deploy/craned/webhooks.yaml | 4 +-- deploy/keys/ca.crt | 28 +++++++++---------- deploy/keys/ca.key | 52 +++++++++++++++++------------------ deploy/keys/tls.crt | 28 +++++++++---------- deploy/keys/tls.key | 50 ++++++++++++++++----------------- deploy/scripts/gencerts.sh | 2 +- 7 files changed, 84 insertions(+), 84 deletions(-) diff --git a/deploy/craned/deployment.yaml b/deploy/craned/deployment.yaml index af6fc96dc..8eebdec05 100644 --- a/deploy/craned/deployment.yaml +++ b/deploy/craned/deployment.yaml @@ -60,8 +60,8 @@ spec: --- apiVersion: v1 data: - tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURWakNDQWo2Z0F3SUJBZ0lKQU9vSDdESmN5UkMxTUEwR0NTcUdTSWIzRFFFQkJRVUFNQkF4RGpBTUJnTlYKQkFNTUJXTnlZVzVsTUI0WERUSXhNVEl3T0RFd01qZzFPVm9YRFRJeU1ERXdOekV3TWpnMU9Wb3dLekVwTUNjRwpBMVVFQXd3Z2QyVmlhRzl2YXkxelpYSjJhV05sTG1OeVlXNWxMWE41YzNSbGJTNXpkbU13Z2dFaU1BMEdDU3FHClNJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUURGNXhHdGhlcGJON0FoNHpvWDNqR3ZRQ3RSWm1RV0RPdXIKUFZpY3NYOENwbEtwaFdSK2NwdmljcEs1UDljWDludnkyQlBzbGVQeHNLa2txU2J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ucVRyajVIUlJRK2VtblVyego2SXQwbVVrM0llc3ZrNmM4MDBaMkQ5eDlDaXdzVEJLV0N1cDR4c1VScHE0YWVQOFBwNk0rU0ROdk5OdlZwVlIrCkt0cThCb0pPQTg0R0V2dzBhU1M2VUhSRGUzWDB6N2s0d2p3REhIRUNnWUVBc3FiVms5MVRBNVdSVDJzVmVKWmQKYWhSa1RFcDRqd1daQi96Y1d5eVl0NGM5U2JTS0l1NjhyUXNNRloyN204ZEMyY2FaTGlpSzR2N0Yza25xalNvcwoxQjZRMWY1L0FOL28zTFhiOEptMGVxOFlGZEJDL1pZQXZDMTgwUWxhV2IzZVczb09xNTlSWDYxUXF3TW5PTzhsCkE3MFdWTWpEaWJPTlFtdEh5eWZSeTlFQ2dZQk9uL25jekJwT2lPd0ZxbVBHMENOMmlwdVZZeFRGRERoNkFjUGIKMG9FSXlRR3dDOVRqZXVSV24vWHo5NVBWckxuUUh5SlI5elJiN3dPREU5NTNNSkJzNjhjZHZIbHgzQ2xka041NQowd0RMNjlOakNoTWVVZlFkMTh0MGF0QXhNdUVmR0Z3L2ppbjJRYVJpT05nSTlqUEV2bytUZ2ZyZkEyemJvWnRrClNHcE04UUtCZ1FDaEhVUUlnN1F0M2JyakNOTnIydVIzNWZPUEx1aElBbytSNEJhSUNQUUZSVDl0OHRMTFZoeXIKNUxtUDRtMmtnWGV6bEFRWG02VHRkZXF0ay9IbVV6UFd5L0g0OUpTUXFhcUxHYzU0Q2Zsc09ydlFibjlTdG1URAp3bzU2Z3lFUmxRMjk0VWRLUnBJakFKdGRRbURwcmpycDJqeHdJWnlOdW4rZndGa0NSTjNSdVE9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= kind: Secret metadata: name: webhook-server-tls diff --git a/deploy/craned/webhooks.yaml b/deploy/craned/webhooks.yaml index a5644896b..2db393215 100644 --- a/deploy/craned/webhooks.yaml +++ b/deploy/craned/webhooks.yaml @@ -8,7 +8,7 @@ webhooks: - admissionReviewVersions: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mx1SEpGQmdnWkhHY3lqT3lGNGx3UW9jTnI2RmdDanNJdzdLRVAyWU1qVUNXUDBMQTUxUXJJZVlPZTZwd2hVZkYKdElvOGhrTkdLM09ZSmx2aklaNEc4R3JzVy85bVFtUVRibzR6Tk0xVjA0UkNOU1Uzei80TXdXUkJFd05RVGdkago3KzR5cXlreVdCVGVRYUh0bGIxamY5NW1kVTZIU3RtbWtZVmpJQ21PdjJkdTRxL2lDamRtVHBXNG5xaHVmUUlnCkhVVDJyN0dXbnRPSEdsVkd2MnkwUEhRN3FqcmdzNGhUVnkyd3RNZHArUkx4aHhyZmdtNmgzSkVFdkVLYjI2RU0KQmJaN3FCNTBqZTI4OVp3dFFCQSs0SHYyaEZsZnNPTGNidWllalpKYWN2YXgxUGptMFZBcm1ZeVdpOGEyQ3lVYgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== service: name: webhook-service namespace: crane-system @@ -36,7 +36,7 @@ webhooks: - admissionReviewVersions: - v1 clientConfig: - caBundle: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNuRENDQVlRQ0NRRDdJeXZTaDZPRUZEQU5CZ2txaGtpRzl3MEJBUXNGQURBUU1RNHdEQVlEVlFRRERBVmoKY21GdVpUQWVGdzB5TVRFeU1EZ3hNREk0TlRsYUZ3MHlNakF4TURjeE1ESTROVGxhTUJBeERqQU1CZ05WQkFNTQpCV055WVc1bE1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBNGw0QzEwYjI2a29tCkx0OEg2cWtWYzdBVzRHSmgzWjc3Vno2VU5DVUp4ZlpiR2VHS211dXhkVEdlQXNUbFoySnVOOWR3VkFnajFLUE8KVDFSUFNFd2doQk0yaXNYV1p4Yi84WG9yK0NXbTUvMnNvR1V4SnRsRjFnVjFjTG1QSlVxMGd0VmhQRzdaZVZtVgp2d2c0T3hUdlVEbGY1blFQZjZucW5NeVB2U1diRGZLTjhrQTRscUhZal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CmtITk5RNkdvRU1LZlJPemlWU1g4VnVlT2hBekk1TDFUK3FnNUwwZ1MzZFJiQW44dEx4MnVPdE5FN25xTzhIbHQKVFdCTDBxRFJlR2xMWlBOREF5UWR0UDNXeEpFSmZvUVhSVTNmTC83U3kvK1pybGFYZHg0bzFabkJ4bDZVSlRyUQo2ZFVReHhzYitGTytjRElpRU5Idk4xTTBwRjgvV0V2Mzk2U0J2REFYU3J0UTdtRUpMRFlueXE1NGNPeURHY3lnCjJDUDQwQVp5QjF4VGs4bXJuQmw0cDBYdklmMS84Tmg0bW1Ba3JCdXJiQk5MRDJkdzJWSTAwdkVtVGhJWkdJdXoKWlk5Tzl3a0J4TlJKQ0JmMWdBTzdCZTJpbUFhd3FrcWVoeDVMMWxmZVl1RUdBMVozQ2djY2dWakJaWHhzbjArTgpCblNoWnc0b2F3SURBUUFCTUEwR0NTcUdTSWIzRFFFQkN3VUFBNElCQVFBUWlPdWRKVVpyM0tRV0RzZndKYVhECmx1SEpGQmdnWkhHY3lqT3lGNGx3UW9jTnI2RmdDanNJdzdLRVAyWU1qVUNXUDBMQTUxUXJJZVlPZTZwd2hVZkYKdElvOGhrTkdLM09ZSmx2aklaNEc4R3JzVy85bVFtUVRibzR6Tk0xVjA0UkNOU1Uzei80TXdXUkJFd05RVGdkago3KzR5cXlreVdCVGVRYUh0bGIxamY5NW1kVTZIU3RtbWtZVmpJQ21PdjJkdTRxL2lDamRtVHBXNG5xaHVmUUlnCkhVVDJyN0dXbnRPSEdsVkd2MnkwUEhRN3FqcmdzNGhUVnkyd3RNZHArUkx4aHhyZmdtNmgzSkVFdkVLYjI2RU0KQmJaN3FCNTBqZTI4OVp3dFFCQSs0SHYyaEZsZnNPTGNidWllalpKYWN2YXgxUGptMFZBcm1ZeVdpOGEyQ3lVYgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== service: name: webhook-service namespace: crane-system diff --git a/deploy/keys/ca.crt b/deploy/keys/ca.crt index 5ff15de71..4cf2613f4 100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w0yMjAxMTIwOTU3NDJaFw0yMjAyMTEwOTU3NDJaMBAxDjAMBgNVBAMM +BWNyYW5lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtK23s+x4x2o7 +kHNNQ6GoEMKfROziVSX8VueOhAzI5L1T+qg5L0gS3dRbAn8tLx2uOtNE7nqO8Hlt +TWBL0qDReGlLZPNDAyQdtP3WxJEJfoQXRU3fL/7Sy/+ZrlaXdx4o1ZnBxl6UJTrQ +6dUQxxsb+FO+cDIiENHvN1M0pF8/WEv396SBvDAXSrtQ7mEJLDYnyq54cOyDGcyg +2CP40AZyB1xTk8mrnBl4p0XvIf1/8Nh4mmAkrBurbBNLD2dw2VI00vEmThIZGIuz +ZY9O9wkBxNRJCBf1gAO7Be2imAawqkqehx5L1lfeYuEGA1Z3CgccgVjBZXxsn0+N +BnShZw4oawIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAQiOudJUZr3KQWDsfwJaXD +luHJFBggZHGcyjOyF4lwQocNr6FgCjsIw7KEP2YMjUCWP0LA51QrIeYOe6pwhUfF +tIo8hkNGK3OYJlvjIZ4G8GrsW/9mQmQTbo4zNM1V04RCNSU3z/4MwWRBEwNQTgdj +7+4yqykyWBTeQaHtlb1jf95mdU6HStmmkYVjICmOv2du4q/iCjdmTpW4nqhufQIg +HUT2r7GWntOHGlVGv2y0PHQ7qjrgs4hTVy2wtMdp+RLxhxrfgm6h3JEEvEKb26EM +BbZ7qB50je289ZwtQBA+4Hv2hFlfsOLcbuiejZJacvax1Pjm0VArmYyWi8a2CyUb -----END CERTIFICATE----- diff --git a/deploy/keys/ca.key b/deploy/keys/ca.key index fdb50d628..fb066ca11 100644 --- a/deploy/keys/ca.key +++ b/deploy/keys/ca.key @@ -1,28 +1,28 @@ -----BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDiXgLXRvbqSiYu -3wfqqRVzsBbgYmHdnvtXPpQ0J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cmULZExaGkvon -----END PRIVATE KEY----- diff --git a/deploy/keys/tls.crt b/deploy/keys/tls.crt index 0e06ff5fe..e23ee4a1b 100644 --- a/deploy/keys/tls.crt +++ b/deploy/keys/tls.crt @@ -1,20 +1,20 @@ -----BEGIN CERTIFICATE----- -MIIDVjCCAj6gAwIBAgIJAOoH7DJcyRC1MA0GCSqGSIb3DQEBBQUAMBAxDjAMBgNV -BAMMBWNyYW5lMB4XDTIxMTIwODEwMjg1OVoXDTIyMDEwNzEwMjg1OVowKzEpMCcG +MIIDVjCCAj6gAwIBAgIJAOoH7DJcyRC6MA0GCSqGSIb3DQEBBQUAMBAxDjAMBgNV +BAMMBWNyYW5lMB4XDTIyMDExMjA5NTc0MloXDTMyMDExMDA5NTc0MlowKzEpMCcG A1UEAwwgd2ViaG9vay1zZXJ2aWNlLmNyYW5lLXN5c3RlbS5zdmMwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDF5xGthepbN7Ah4zoX3jGvQCtRZmQWDOur -PVicsX8CplKphWR+cpvicpK5P9cX9nvy2BPslePxsKkkqSbw+NF4AI01E06dujdQ -KTWGlFB4cVi4dA22UW8VqqC8P0WCbXLE2zjeeCsWCZS7gmiGk1Delp4kXM+I45vb -06lUIR2/DjC8vZ01DAiSFD1/2PPInxoS0vx2u8AGm2O8+z4+N8Ga1jZZ+tkMk/fr -zY3PF++85d5DIfKxo07sQTXr5FJQiR72aB99Zv+VTRP9TSfMvcPUQKdcov1xtyKm -zoHPTecTya7YOYml5QjJU3HqSa3FC6j2NH++sYYtH+MFH+LwNin5AgMBAAGjgZcw +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/yRTiOonzy1tOhKnVOzs7cNinoYpx+ZrC +Zoxztk/b4HD4EJGhJUOe1Hlhhwp3DrLWpnjMdm+f2pHe2DCT9Gsx0TQxfVT/1GVP +osoaxg8CRdp28G6SmCJSYvVecM8dT7Q7Dg8dr0jedM4fMlyh67V09KGXf6JJdtU5 +PKw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schnh6lQv1zUAdTp45G2Wknt3mwB+JzY4Kv +LH0fF44Lh59TgDJsaif6rUMn0VZa5AlgrmFaFlmIwVx/opHJvn+6IRjK -----END CERTIFICATE----- diff --git a/deploy/keys/tls.key b/deploy/keys/tls.key index 5ff84f6f8..6d6aa473c 100644 --- a/deploy/keys/tls.key +++ b/deploy/keys/tls.key @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEogIBAAKCAQEAxecRrYXqWzewIeM6F94xr0ArUWZkFgzrqz1YnLF/AqZSqYVk -fnKb4nKSuT/XF/Z78tgT7JXj8bCpJKkm8PjReACNNRNOnbo3UCk1hpRQeHFYuHQN -tlFvFaqgvD9Fgm1yxNs43ngrFgmUu4JohpNQ3paeJFzPiOOb29OpVCEdvw4wvL2d -NQwIkhQ9f9jzyJ8aEtL8drvABptjvPs+PjfBmtY2WfrZDJP3682NzxfvvOXeQyHy -saNO7EE16+RSUIke9mgffWb/lU0T/U0nzL3D1ECnXKL9cbcips6Bz03nE8mu2DmJ -peUIyVNx6kmtxQuo9jR/vrGGLR/jBR/i8DYp+QIDAQABAoIBAFH6oiwLaUVYEDI5 -ensgo9xA7LDPhW5M8+L/ipF+RWrHkz59718iAskPRRBQDb3zcOzr7XT3snEQCUES -gPsZV0wqjlQKJ2rXFMq0B2Q0VBFQgrwF9xgrK6UCBYt1eknJJN2/IhOmG9MJLP9v -yfTVWY6bPe86Mw41mv6480/SWAwoDYp/Bq8LZivchYrejPTXy2xVjVlflZbacRUx -C8u6Z9AiL9i9WYi6FRigirrDwNumL8NslNu8AFnC64KXHOoZUDmzfvHaACOP2NZC -3OgxsnbvKuz52zTJ5sNWWQlXZZBdPm+uB6gjsOdnymwGddewp77mi9Fv9yRPbjPM -+4ik1gECgYEA9PM9JHLKHxjiI+IjWLkdt+HLi/0vcpTIQpNXPh+ubOaVRCN1FTbQ -PA3uxnvWab5BeqgH8g1Wr2KByAy4fZxPjh4pnhdXJDa52eqztNfI49pswio5CyXw -W8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 +0wDL69NjChMeUfQd18t0atAxMuEfGFw/jin2QaRiONgI9jPEvo+TgfrfA2zboZtk +SGpM8QKBgQChHUQIg7Qt3brjCNNr2uR35fOPLuhIAo+R4BaICPQFRT9t8tLLVhyr +5LmP4m2kgXezlAQXm6Ttdeqtk/HmUzPWy/H49JSQqaqLGc54CflsOrvQbn9StmTD +wo56gyERlQ294UdKRpIjAJtdQmDprjrp2jxwIZyNun+fwFkCRN3RuQ== -----END RSA PRIVATE KEY----- diff --git a/deploy/scripts/gencerts.sh b/deploy/scripts/gencerts.sh index b84e123e2..4ad9c497b 100755 --- a/deploy/scripts/gencerts.sh +++ b/deploy/scripts/gencerts.sh @@ -11,4 +11,4 @@ openssl genrsa -out ${keydir}/tls.key 2048 # Generate a Certificate Signing Request (CSR) for the private key, and sign it with the private key of the CA. echo Signing the CSR, and generating cert into ${keydir} openssl req -new -key ${keydir}/tls.key -subj "/CN=webhook-service.crane-system.svc" -config ${workdir}/scripts/webhook.csr \ - | openssl x509 -req -CA ${keydir}/ca.crt -CAkey ${keydir}/ca.key -CAcreateserial -out ${keydir}/tls.crt -extensions v3_req -extfile ${workdir}/scripts/webhook.csr \ No newline at end of file + | openssl x509 -req -days 3650 -CA ${keydir}/ca.crt -CAkey ${keydir}/ca.key -CAcreateserial -out ${keydir}/tls.crt -extensions v3_req -extfile ${workdir}/scripts/webhook.csr \ No newline at end of file From a470d350925c99d16a301c11d7ff5230402026cf Mon Sep 17 00:00:00 2001 From: yuyufei Date: Thu, 13 Jan 2022 13:37:20 +0800 Subject: [PATCH 4/6] Bugfix: If 2 analytics CR with type "HPA" and "Resource" respectively target to the same workload, only one recommendation CR gets generated. --- pkg/controller/analytics/analytics_controller.go | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkg/controller/analytics/analytics_controller.go b/pkg/controller/analytics/analytics_controller.go index c79547d83..26adfcc12 100644 --- a/pkg/controller/analytics/analytics_controller.go +++ b/pkg/controller/analytics/analytics_controller.go @@ -140,7 +140,7 @@ func (c *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu } for i := range us { - k := objRefKey(rs.Kind, rs.APIVersion, us[i].GetNamespace(), us[i].GetName()) + k := objRefKey(rs.Kind, rs.APIVersion, us[i].GetNamespace(), us[i].GetName(), string(a.Spec.Type)) if _, exists := identities[k]; !exists { identities[k] = ObjectIdentity{ Namespace: us[i].GetNamespace(), @@ -165,7 +165,7 @@ func (c *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu rm := map[string]*analysisv1alph1.Recommendation{} for _, r := range rs { - k := objRefKey(r.Spec.TargetRef.Kind, r.Spec.TargetRef.APIVersion, r.Spec.TargetRef.Namespace, r.Spec.TargetRef.Name) + k := objRefKey(r.Spec.TargetRef.Kind, r.Spec.TargetRef.APIVersion, r.Spec.TargetRef.Namespace, r.Spec.TargetRef.Name, string(r.Spec.Type)) rm[k] = r.DeepCopy() } @@ -174,9 +174,6 @@ func (c *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu for k, r := range rm { klog.V(6).InfoS("recommendations", "key", k, "namespace", r.Namespace, "name", r.Name) } - } - - if klog.V(6).Enabled() { // Print identities for k, id := range identities { klog.V(6).InfoS("identities", "key", k, "apiVersion", id.APIVersion, "kind", id.Kind, "namespace", id.Namespace, "name", id.Name) @@ -196,7 +193,7 @@ func (c *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu }) found := false for _, or := range r.OwnerReferences { - if or.Name == a.Name && or.Kind == a.Kind && a.APIVersion == a.APIVersion { + if or.Name == a.Name && or.Kind == a.Kind && or.APIVersion == a.APIVersion { found = true break } @@ -289,8 +286,8 @@ func (ac *Controller) createRecommendation(ctx context.Context, a *analysisv1alp return nil } -func objRefKey(kind, apiVersion, namespace, name string) string { - return fmt.Sprintf("%s#%s#%s#%s", kind, apiVersion, namespace, name) +func objRefKey(kind, apiVersion, namespace, name, recommendType string) string { + return fmt.Sprintf("%s#%s#%s#%s#%s", kind, apiVersion, namespace, name, recommendType) } func match(labelSelector metav1.LabelSelector, matchLabels map[string]string) bool { From 548d73a6928d045b9254c6777a992293fa778adc Mon Sep 17 00:00:00 2001 From: qmhu Date: Wed, 12 Jan 2022 15:24:53 +0800 Subject: [PATCH 5/6] All-in-One deployment --- README.md | 293 +++++++++++++++++++-- deploy/craned/deployment.yaml | 5 + examples/analytics/analytics-hpa.yaml | 31 +++ examples/analytics/analytics-resource.yaml | 33 +++ examples/autoscaling/php-apache.yaml | 38 +++ 5 files changed, 381 insertions(+), 19 deletions(-) create mode 100644 examples/analytics/analytics-hpa.yaml create mode 100644 examples/analytics/analytics-resource.yaml create mode 100644 examples/autoscaling/php-apache.yaml diff --git a/README.md b/README.md index ca0d4fa80..93ad71249 100644 --- a/README.md +++ b/README.md @@ -76,49 +76,304 @@ Crane is composed of the following components: ## Getting Started -### Prerequisites +### Installation + +**Prerequisites** - Kubernetes 1.18+ - Helm 3.1.0 -### Installation - -#### Installing prometheus components with helm chart +**All-In-One Installation** > Note: -> If you already deployed prometheus, prometheus-node-exporter, then you can skip this step. +> If you already deployed prometheus, grafana, or you want to customize it then you can refer to [Customize Installation](#customize-installation). + +**Helm Installation** + +Please refer to Helm's [documentation](https://helm.sh/docs/intro/install/) for installation. -Export the following env if you want to use default settings, or specify customized value if you want to customize the installation. +**Installing prometheus and grafana with helm chart** + +Crane use prometheus to be the default metric provider. Using following command to install prometheus components: prometheus-server, node-exporter, kube-state-metrics. ```console -export NAMESPACE=monitoring -export RELEASE_NAME=myprometheus +helm repo add prometheus-community https://prometheus-community.github.io/helm-charts +helm install prometheus -n crane-system --set pushgateway.enabled=false --set alertmanager.enabled=false --set server.persistentVolume.enabled=false -f https://raw.githubusercontent.com/gocrane/helm-charts/main/integration/prometheus/override_values.yaml --create-namespace prometheus-community/prometheus ``` -Crane use prometheus to be the default metric provider. Using following command to install prometheus components. +Fadvisor use grafana to present cost estimates. Using following command to install a grafana. ```console -helm repo add prometheus-community https://prometheus-community.github.io/helm-charts -helm repo update +helm repo add grafana https://grafana.github.io/helm-charts +helm install grafana -f https://raw.githubusercontent.com/gocrane/helm-charts/main/integration/grafana/override_values.yaml -n crane-system --create-namespace grafana/grafana +``` + +**Deploying Crane and Fadvisor** -helm install $RELEASE_NAME -n $NAMESPACE --set kubeStateMetrics.enabled=false --set pushgateway.enabled=false --set alertmanager.enabled=false --set server.persistentVolume.enabled=false --create-namespace prometheus-community/prometheus +Deploy `Crane` by apply YAML declaration. + +```console +git checkout v0.1.0 +kubectl apply -f deploy/manifests +kubectl apply -f deploy/craned +kubectl apply -f deploy/metric-adapter ``` -#### Configure Prometheus Address +Deploy `Fadvisor` by helm chart. + +```console +helm repo add crane https://gocrane.github.io/helm-charts +helm install cost-exporter -n crane-system --create-namespace crane/cost-exporter +``` + +### Customize Installation + +**Configure Prometheus Address** The following command will configure prometheus http address for crane. Specify `CUSTOMIZE_PROMETHEUS` if you have existing prometheus server. ```console export CUSTOMIZE_PROMETHEUS= -if [ ! $CUSTOMIZE_PROMETHEUS ]; then sed -i '' "s/PROMETHEUS_ADDRESS/http:\/\/${RELEASE_NAME}-server.${NAMESPACE}.svc.cluster.local/" deploy/craned/deployment.yaml ; else sed -i '' "s/PROMETHEUS_ADDRESS/${CUSTOMIZE_PROMETHEUS}/" deploy/craned/deployment.yaml ; fi +if [ $CUSTOMIZE_PROMETHEUS ]; then sed -i '' "s/http:\/\/prometheus-server.crane-system.svc.cluster.local:8080/${CUSTOMIZE_PROMETHEUS}/" deploy/craned/deployment.yaml ; fi ``` -#### Deploying Crane +### Uninstallation -You can deploy `Crane` by apply YAML declaration. +Uninstall helm charts will remove all the Kubernetes components associated with the chart and deletes the release. ```console -kubectl apply -f deploy/manifests -kubectl apply -f deploy/craned -kubectl apply -f deploy/metric-adapter +helm uninstall crane +helm uninstall mygrafana +helm uninstall fadvisor ``` + +Delete `crane-system` will remove all resources in crane. + +```console +kubectl delete ns crane-system +``` + +### Get your Kubernetes Cost Report + +Get the Grafana URL to visit by running these commands in the same shell: + +```console +export POD_NAME=$(kubectl get pods --namespace crane-system -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}") +kubectl --namespace crane-system port-forward $POD_NAME 3000 +``` + +visit [Cost Report](http://127.0.0.1:3000/dashboards) here with account(admin:admin). + +### Analytics and Recommend Pod Resources + +Create an **Resource** `Analytics` to give recommendation for deployment: `craned` and `metric-adapter` as a sample. + +```console +kubectl apply -f https://raw.githubusercontent.com/gocrane/crane/main/examples/analytics/analytics-resource.yaml +kubectl get analytics -n crane-system +``` + +The output is: + +```console +NAME AGE +craned-resource 15m +metric-adapter-resource 15m +``` + +You can get created recommendation from analytics status: + +```console +kubectl get analytics craned-resource -n crane-system -o yaml +``` + +The output is similar to: + +```console +apiVersion: analysis.crane.io/v1alpha1 +kind: Analytics +metadata: + name: craned-resource + namespace: crane-system +spec: + completionStrategy: + completionStrategyType: Periodical + periodSeconds: 86400 + resourceSelectors: + - apiVersion: apps/v1 + kind: Deployment + labelSelector: {} + name: craned + type: Resource +status: + lastSuccessfulTime: "2022-01-12T08:40:59Z" + recommendations: + - name: craned-resource-resource-j7shb + namespace: crane-system + uid: 8ce2eedc-7969-4b80-8aee-fd4a98d6a8b6 +``` + +The recommendation name presents on `status.recommendations[0].name`. Then you can get recommendation detail by running: + +```console +kubectl get recommend -n crane-system craned-resource-resource-j7shb -o yaml +``` + +The output is similar to: + +```console +apiVersion: analysis.crane.io/v1alpha1 +kind: Recommendation +metadata: + name: craned-resource-resource-j7shb + namespace: crane-system + ownerReferences: + - apiVersion: analysis.crane.io/v1alpha1 + blockOwnerDeletion: false + controller: false + kind: Analytics + name: craned-resource + uid: a9e6dc0d-ab26-4f2a-84bd-4fe9e0f3e105 +spec: + completionStrategy: + completionStrategyType: Periodical + periodSeconds: 86400 + targetRef: + apiVersion: apps/v1 + kind: Deployment + name: craned + namespace: crane-system + type: Resource +status: + conditions: + - lastTransitionTime: "2022-01-12T08:40:59Z" + message: Recommendation is ready + reason: RecommendationReady + status: "True" + type: Ready + lastSuccessfulTime: "2022-01-12T08:40:59Z" + lastUpdateTime: "2022-01-12T08:40:59Z" + resourceRequest: + containers: + - containerName: craned + target: + cpu: 114m + memory: 120586239m +``` + +The `status.resourceRequest` is recommended by crane's recommendation engine. + +Something you should know about Resource recommendation: +* Resource Recommendation use historic prometheus metrics to calculate and propose. +* We use **Percentile** algorithm to process metrics that also used by VPA. +* If the workload is running for a long term like several weeks, the result will be more accurate. + +### Analytics and Recommend Pod Resources + +Create an **HPA** `Analytics` to give recommendation for deployment: `craned` and `metric-adapter` as an sample. + +```console +kubectl apply -f https://raw.githubusercontent.com/gocrane/crane/main/examples/analytics/analytics-hpa.yaml +kubectl get analytics -n crane-system +``` + +The output is: + +```console +NAME AGE +craned-hpa 5m52s +craned-resource 18h +metric-adapter-hpa 5m52s +metric-adapter-resource 18h + +``` + +You can get created recommendation from analytics status: + +```console +kubectl get analytics craned-hpa -n crane-system -o yaml +``` + +The output is similar to: + +```console +apiVersion: analysis.crane.io/v1alpha1 +kind: Analytics +metadata: + name: craned-hpa + namespace: crane-system +spec: + completionStrategy: + completionStrategyType: Periodical + periodSeconds: 86400 + resourceSelectors: + - apiVersion: apps/v1 + kind: Deployment + labelSelector: {} + name: craned + type: HPA +status: + lastSuccessfulTime: "2022-01-13T07:26:18Z" + recommendations: + - apiVersion: analysis.crane.io/v1alpha1 + kind: Recommendation + name: craned-hpa-hpa-2f22w + namespace: crane-system + uid: 397733ee-986a-4630-af75-736d2b58bfac +``` + +The recommendation name presents on `status.recommendations[0].name`. Then you can get recommendation detail by running: + +```console +kubectl get recommend -n crane-system craned-resource-resource-j7shb -o yaml +``` + +The output is similar to: + +```console +apiVersion: analysis.crane.io/v1alpha1 +kind: Recommendation +metadata: + name: craned-hpa-hpa-2f22w + namespace: crane-system + ownerReferences: + - apiVersion: analysis.crane.io/v1alpha1 + blockOwnerDeletion: false + controller: false + kind: Analytics + name: craned-hpa + uid: b216d9c3-c52e-4c9c-b9e9-9d5b45165b1d +spec: + completionStrategy: + completionStrategyType: Periodical + periodSeconds: 86400 + targetRef: + apiVersion: apps/v1 + kind: Deployment + name: craned + namespace: crane-system + type: HPA +status: + conditions: + - lastTransitionTime: "2022-01-13T07:51:18Z" + message: 'Failed to offer recommend, Recommendation crane-system/craned-hpa-hpa-2f22w + error EHPAAdvisor prediction metrics data is unexpected, List length is 0 ' + reason: FailedOfferRecommend + status: "False" + type: Ready + lastUpdateTime: "2022-01-13T07:51:18Z" +``` + +The `status.resourceRequest` is recommended by crane's recommendation engine. The fail reason is demo workload don't have enough run time. + +Something you should know about HPA recommendation: +* HPA Recommendation use historic prometheus metrics to calculate, forecast and propose. +* We use **DSP** algorithm to process metrics. +* We recommend using Effective HorizontalPodAutoscaler to execute autoscaling, you can see [this document](./docs/tutorials/using-time-series-prediction.md) to learn more. +* The Workload need match following conditions: + * Existing at least one ready pod + * Ready pod ratio should larger that 50% + * Must provide cpu request for pod spec + * The workload should be running for at least **a week** to get enough metrics to forecast + * The workload's cpu load should be predictable, **too low** or **too unstable** workload often is unpredictable + \ No newline at end of file diff --git a/deploy/craned/deployment.yaml b/deploy/craned/deployment.yaml index 8eebdec05..f40701e59 100644 --- a/deploy/craned/deployment.yaml +++ b/deploy/craned/deployment.yaml @@ -83,3 +83,8 @@ data: - targets: [] properties: cpu-request-percentile: "0.98" + ehpa.deployment-min-replicas: "1" + ehpa.statefulset-min-replicas: "1" + ehpa.workload-min-replicas: "1" + ehpa.pod-min-ready-seconds: "30" + ehpa.pod-available-ratio: "0.5" diff --git a/examples/analytics/analytics-hpa.yaml b/examples/analytics/analytics-hpa.yaml new file mode 100644 index 000000000..a72319d96 --- /dev/null +++ b/examples/analytics/analytics-hpa.yaml @@ -0,0 +1,31 @@ +apiVersion: analysis.crane.io/v1alpha1 +kind: Analytics +metadata: + name: craned-hpa + namespace: crane-system +spec: + type: HPA # This can only be "Resource" or "HPA". + completionStrategy: + completionStrategyType: Periodical # This can only be "Once" or "Periodical". + periodSeconds: 600 # analytics selected resources every 10 minutes + resourceSelectors: # defines all the resources to be select with + - kind: Deployment + apiVersion: apps/v1 + name: craned + +--- + +apiVersion: analysis.crane.io/v1alpha1 +kind: Analytics +metadata: + name: metric-adapter-hpa + namespace: crane-system +spec: + type: HPA # This can only be "Resource" or "HPA". + completionStrategy: + completionStrategyType: Periodical # This can only be "Once" or "Periodical". + periodSeconds: 3600 # analytics selected resources every 1 hour + resourceSelectors: # defines all the resources to be select with + - kind: Deployment + apiVersion: apps/v1 + name: metric-adapter diff --git a/examples/analytics/analytics-resource.yaml b/examples/analytics/analytics-resource.yaml new file mode 100644 index 000000000..98da731ec --- /dev/null +++ b/examples/analytics/analytics-resource.yaml @@ -0,0 +1,33 @@ +apiVersion: analysis.crane.io/v1alpha1 +kind: Analytics +metadata: + name: craned-resource + namespace: crane-system +spec: + type: Resource # This can only be "Resource" or "HPA". + completionStrategy: + completionStrategyType: Periodical # This can only be "Once" or "Periodical". + periodSeconds: 86400 # analytics selected resources every 1 day + resourceSelectors: # defines all the resources to be select with + - kind: Deployment + apiVersion: apps/v1 + name: craned + +--- + +apiVersion: analysis.crane.io/v1alpha1 +kind: Analytics +metadata: + name: metric-adapter-resource + namespace: crane-system +spec: + type: Resource # This can only be "Resource" or "HPA". + completionStrategy: + completionStrategyType: Periodical # This can only be "Once" or "Periodical". + periodSeconds: 3600 # analytics selected resources every 1 hour + resourceSelectors: # defines all the resources to be select with + - kind: Deployment + apiVersion: apps/v1 + name: metric-adapter + + diff --git a/examples/autoscaling/php-apache.yaml b/examples/autoscaling/php-apache.yaml new file mode 100644 index 000000000..451d824a4 --- /dev/null +++ b/examples/autoscaling/php-apache.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: php-apache +spec: + selector: + matchLabels: + run: php-apache + replicas: 1 + template: + metadata: + labels: + run: php-apache + spec: + containers: + - name: php-apache + image: gocrane/hpa-sample:v1.0.0 + ports: + - containerPort: 80 + resources: + limits: + cpu: 500m + requests: + cpu: 200m + +--- + +apiVersion: v1 +kind: Service +metadata: + name: php-apache + labels: + run: php-apache +spec: + ports: + - port: 80 + selector: + run: php-apache \ No newline at end of file From f403065e9635f03d910e5fa80238cda864cd4f25 Mon Sep 17 00:00:00 2001 From: qmhu Date: Thu, 13 Jan 2022 20:29:34 +0800 Subject: [PATCH 6/6] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 93ad71249..84470b39c 100644 --- a/README.md +++ b/README.md @@ -268,7 +268,7 @@ Something you should know about Resource recommendation: * We use **Percentile** algorithm to process metrics that also used by VPA. * If the workload is running for a long term like several weeks, the result will be more accurate. -### Analytics and Recommend Pod Resources +### Analytics and Recommend HPA Create an **HPA** `Analytics` to give recommendation for deployment: `craned` and `metric-adapter` as an sample. @@ -376,4 +376,4 @@ Something you should know about HPA recommendation: * Must provide cpu request for pod spec * The workload should be running for at least **a week** to get enough metrics to forecast * The workload's cpu load should be predictable, **too low** or **too unstable** workload often is unpredictable - \ No newline at end of file +