Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to upstream/cluster-autoscaler-release-1.14 #107

Merged
merged 478 commits into from
Jun 21, 2019
Merged
Changes from 1 commit
Commits
Show all changes
478 commits
Select commit Hold shift + click to select a range
b0e0de0
VPA - e2e tests for v1beta2 API
schylek Feb 16, 2019
376e5ed
Merge pull request #1699 from schylek/nb
k8s-ci-robot Feb 18, 2019
c3c5714
Merge pull request #1651 from carlosedp/fix-1645
k8s-ci-robot Feb 18, 2019
8d885bb
VPA - fix names of files with junit test results
schylek Feb 18, 2019
eff42b6
Merge pull request #1700 from schylek/nb
k8s-ci-robot Feb 18, 2019
78f2e17
Vertical Pod Autoscaler version 0.4.0
bskiba Feb 18, 2019
7f77136
Merge pull request #1701 from bskiba/vpa-0.4
k8s-ci-robot Feb 18, 2019
46c673e
VPA - disable errexit in run e2e scripts
schylek Feb 18, 2019
d538ac0
Merge pull request #1702 from schylek/nb
k8s-ci-robot Feb 19, 2019
33aaae5
Fix error message for long-waiting operations
feiskyer Feb 19, 2019
668fa32
Update VPA to beta in main README
bskiba Feb 20, 2019
aa4791c
Merge pull request #1704 from kubernetes/bskiba-patch-1
k8s-ci-robot Feb 20, 2019
9146456
Add version field to spec
tomislater Feb 20, 2019
827a1a2
VPA - check ConfigDeprecated condition for v1beta1 e2e tests
schylek Feb 20, 2019
8a7d9e4
Merge pull request #1706 from tomislater/fix-version-in-crd
k8s-ci-robot Feb 20, 2019
afca409
Merge pull request #1705 from schylek/nb
k8s-ci-robot Feb 20, 2019
b1d33ad
Update kubernetes version to v1.15.0-alpha.0
feiskyer Feb 21, 2019
fa077b2
no_vendor
feiskyer Feb 21, 2019
4f76009
Update flag package to k8s.io/component-base/cli/flag
feiskyer Feb 21, 2019
128729b
Move schedulercache to package nodeinfo
feiskyer Feb 21, 2019
2546d0d
Move leaderelection options to new packages
feiskyer Feb 21, 2019
b3cd551
Update overrides for go-autorest
feiskyer Feb 21, 2019
276c283
Update vendors
feiskyer Feb 21, 2019
d7b3216
Merge pull request #1703 from feiskyer/fix-error-message
k8s-ci-robot Feb 21, 2019
0968736
Merge pull request #1708 from feiskyer/update-ca-godeps
k8s-ci-robot Feb 21, 2019
cc4575b
Add the ability to better pass additional arguments to containers
Rajat-0 Feb 5, 2019
50b0a10
Rename vpa-target-reader ClusterRoleBinding name
forkbomber Feb 22, 2019
8584239
Merge pull request #1664 from Rajat-0/entrypt
k8s-ci-robot Feb 22, 2019
6720c08
VPA switches to 0.4.0
bskiba Feb 22, 2019
cfb76b7
Merge pull request #1712 from bskiba/doc-04
k8s-ci-robot Feb 22, 2019
18b33e8
Merge pull request #1692 from forkbomber/clean-up-client-cert-lookup-…
k8s-ci-robot Feb 22, 2019
c401b81
Add SECURITY_CONTACTS
justaugustus Feb 24, 2019
d3b89ac
Merge pull request #1718 from justaugustus/sec
k8s-ci-robot Feb 24, 2019
64ba101
Merge pull request #1713 from forkbomber/rename-vpa-target-reader-clu…
k8s-ci-robot Feb 25, 2019
f304722
Use separate client for events
aleksandra-malinowska Feb 25, 2019
5267e62
Add labels support for Alibaba Cloud Provider
ringtail Feb 25, 2019
9fb641d
add unittests
ringtail Feb 25, 2019
bbd8e13
Merge pull request #1723 from ringtail/master
k8s-ci-robot Feb 25, 2019
a824e87
Only soft taint nodes if there's no scale down to do
aleksandra-malinowska Feb 25, 2019
f3cce8d
Godeps update to pull in klog
bskiba Feb 25, 2019
13560ef
fix tests and typo
safanaj Feb 25, 2019
2e50eb1
Merge pull request #1613 from trilogy-group/master
k8s-ci-robot Feb 26, 2019
efbec48
Control deprecation of v1beta1 api
bskiba Feb 25, 2019
e300f7f
VPA - add label api to vpa_objects_count metric
schylek Feb 26, 2019
7558fe5
Merge pull request #1727 from schylek/a
k8s-ci-robot Feb 26, 2019
4d05ebb
Merge pull request #1722 from bskiba/beta1
k8s-ci-robot Feb 26, 2019
5d0803a
Merge pull request #1725 from bskiba/klog-vendor
k8s-ci-robot Feb 26, 2019
1018549
Merge pull request #1721 from aleksandra-malinowska/soft-taint-best-e…
k8s-ci-robot Feb 26, 2019
8944afd
Merge pull request #1720 from aleksandra-malinowska/events-client
k8s-ci-robot Feb 26, 2019
dcada94
VPA - Expose TargetRef in VPA model struct.
schylek Feb 27, 2019
dbb2eff
Allow vpa-admission-controler to installl on specific path
Rajat-0 Jan 30, 2019
649431d
Merge pull request #1733 from schylek/a
k8s-ci-robot Feb 27, 2019
e535792
Merge pull request #1625 from Rajat-0/admission
k8s-ci-robot Feb 27, 2019
e0110b8
Use k8s.io/klog instead of glog
Rajat-0 Feb 13, 2019
bb2bc8c
Merge pull request #1680 from Rajat-0/vpa_klog
k8s-ci-robot Feb 27, 2019
4519d59
Fix nil reference in admission controller registration.
bskiba Feb 27, 2019
2679d69
Missing ginkgo import
bskiba Feb 27, 2019
567eac3
Merge pull request #1736 from bskiba/fix-registration
k8s-ci-robot Feb 27, 2019
f1787f9
Merge pull request #1737 from bskiba/ginkgo
k8s-ci-robot Feb 27, 2019
a9758b2
Add GetInstanceID interface for cloudprovider
feiskyer Feb 27, 2019
2758133
Implement GetInstanceID for Azure and make instanceID to lower cases
feiskyer Feb 27, 2019
2e2aab6
Implement GetInstanceID for other cloud providers
feiskyer Feb 27, 2019
f4ef957
Use cloudProvider.GetInstanceID() to get unregistered nodes
feiskyer Feb 27, 2019
65860a1
Correctly set condition when recommendation is not present
bskiba Feb 28, 2019
2810425
Add missing daemonsets to AWS example cluster role
stefansedich Feb 28, 2019
43bc70f
Regenerate the ec2 instance types using latest metadata
stefansedich Mar 1, 2019
969ea09
Add Index for VPA Docs
Rajat-0 Mar 1, 2019
e2cc686
Merge pull request #1740 from stefansedich/update-aws-instance-types
k8s-ci-robot Mar 1, 2019
9de6a34
Merge pull request #1742 from Rajat-0/doc_rearg
k8s-ci-robot Mar 1, 2019
aa299d0
Merge pull request #1739 from stefansedich/add-missing-aws-daemonsets
k8s-ci-robot Mar 1, 2019
39c1beb
Merge pull request #1743 from bskiba/cond
k8s-ci-robot Mar 1, 2019
2a0535b
Added migTargetSizeCache in GceCache to cache TargetSize calls for
vivekbagade Feb 27, 2019
0cd0c90
Merge pull request #1738 from feiskyer/get-instance-id
k8s-ci-robot Mar 1, 2019
f897f89
Merge pull request #1735 from vivekbagade/feature/cacheTargetSize
k8s-ci-robot Mar 1, 2019
82162e5
Improve AWS gotchas section and make cloud providers READMEs more dis…
cablespaghetti Mar 4, 2019
e37deb0
Reformat multi-az gotcha and add link to main FAQ
cablespaghetti Mar 4, 2019
1a2010f
Make link to FAQ relative
cablespaghetti Mar 4, 2019
f61c8d0
Update multi-az gotcha to represent recommended practice
cablespaghetti Mar 5, 2019
5d2d3f2
Fix bad english
cablespaghetti Mar 5, 2019
ed0dd0c
Merge pull request #1746 from cablespaghetti/master
k8s-ci-robot Mar 5, 2019
8e41e04
Update debian-base image to 0.4.1
losipiuk Mar 6, 2019
526396f
Merge pull request #1761 from losipiuk/lo/master-debian-base-0.4.1
k8s-ci-robot Mar 6, 2019
6aa0e59
Use docker in gofmt verification
jkaniuk Mar 7, 2019
6092b0a
Merge pull request #1763 from jkaniuk/gofmt
k8s-ci-robot Mar 7, 2019
c9832b8
Allow custom AWS region overrides #1707
ampsingram Mar 5, 2019
9248ced
Update godeps based on k8s.io/kubernetes:release-1.14
losipiuk Mar 7, 2019
ea0d61f
Migrate to using api-specific REST clients
losipiuk Mar 7, 2019
7855ae5
Merge pull request #1767 from losipiuk/lo/update-godeps-master-1.14
k8s-ci-robot Mar 7, 2019
91b7bc0
Fixing minor error handling bug in static autoscaler
Mar 7, 2019
2b6087e
Revert "Add GetInstanceID interface for cloudprovider"
feiskyer Mar 4, 2019
b721438
Revert "Use cloudProvider.GetInstanceID() to get unregistered nodes"
feiskyer Mar 4, 2019
ceee6a4
Revert "Implement GetInstanceID for other cloud providers"
feiskyer Mar 4, 2019
75ea002
Convert resource group name in Azure providerID to lower case
feiskyer Mar 4, 2019
2694b01
Merge pull request #1768 from uruddarraju/errbug
k8s-ci-robot Mar 8, 2019
44a6b4d
Cluster Autoscaler 1.14.0-beta.1
losipiuk Mar 8, 2019
6a6245b
Merge pull request #1770 from losipiuk/lo/ca-1.14.0-beta.1
k8s-ci-robot Mar 8, 2019
5ae76ea
UPSTREAM: <carry>: fix max cluster size calculation on scale up
frobware Mar 7, 2019
387818a
Merge pull request #1771 from frobware/fix-scale-up-calculation
k8s-ci-robot Mar 8, 2019
15ab39e
Merge pull request #1769 from feiskyer/cleanup-get-instance-id
k8s-ci-robot Mar 8, 2019
e121945
Update embargo doc link in SECURITY_OWNERS and changes PST to PSC
joelsmith Mar 8, 2019
5ce93eb
Merge pull request #1773 from joelsmith/secdoc
k8s-ci-robot Mar 8, 2019
588937c
Fix AKS scaling issues for bulk deletion
feiskyer Mar 11, 2019
9ca1c7d
Add more docs for AKS scaling
feiskyer Mar 11, 2019
62a28f3
Soft taint when there are no candidates
aleksandra-malinowska Mar 11, 2019
bcf2453
Merge pull request #1780 from aleksandra-malinowska/soft-taint-fix
k8s-ci-robot Mar 11, 2019
9652ffb
Merge pull request #1777 from feiskyer/aks-scale-size
k8s-ci-robot Mar 11, 2019
2474dc2
Call CloudProvider.Refresh before getNodeInfosForGroups
losipiuk Mar 12, 2019
951239d
Merge pull request #1782 from losipiuk/lo/fix-refresh
k8s-ci-robot Mar 12, 2019
b42b46b
Delete support for v1beta1 API w/o deleting the API itself.
kgolab Mar 12, 2019
9733fe0
Merge pull request #1783 from kgolab/kg-vpa-remove-v1beta1
k8s-ci-robot Mar 12, 2019
6ec53d4
Forbid creating VPA objects without targetRef.
kgolab Mar 12, 2019
0e8e303
Merge pull request #1785 from kgolab/kg-vpa-invalidate-v1beta1
k8s-ci-robot Mar 12, 2019
e79fbee
Merge pull request #1745 from jottofar/issue1707
k8s-ci-robot Mar 12, 2019
2646eb2
Notes about multiple AWS AZ and PV
ismailyenigul Mar 13, 2019
9b63c72
don't log before parsing flags in nanny
BenTheElder Mar 14, 2019
6172550
Merge pull request #1792 from BenTheElder/no-glog-errors
k8s-ci-robot Mar 14, 2019
26f45ff
Extend vendor with scheduler files needed for extended initialization…
losipiuk Mar 14, 2019
5db2e68
Merge pull request #1791 from ismailyenigul/master
k8s-ci-robot Mar 14, 2019
5059184
Update scheduler initialization in predicates.go
losipiuk Mar 14, 2019
9558c44
Merge pull request #1794 from losipiuk/lo/fix-predicate-checker-init
k8s-ci-robot Mar 14, 2019
6752fba
Cluster Autoscaler 1.14.0-beta.2
losipiuk Mar 14, 2019
924337e
Cluster Autoscaler 1.14.0
losipiuk Mar 19, 2019
b43d414
Merge pull request #1804 from losipiuk/lo/ca-1.14.0
k8s-ci-robot Mar 19, 2019
195543a
Use debian-base-amd64:v1.0.0
losipiuk Mar 25, 2019
a8cea4a
Merge pull request #1832 from losipiuk/lo/cluster-autoscaler-release-…
k8s-ci-robot Mar 26, 2019
7699e9e
Enable race detection in unit tests
jkaniuk Apr 12, 2019
902c7d2
Merge pull request #1888 from jkaniuk/race-test-1.14
k8s-ci-robot Apr 12, 2019
7c84ed1
Use debian-base-amd64:v1.0.0
losipiuk Mar 25, 2019
039cef8
Merge pull request #1930 from losipiuk/lo/debian-1.0.0-1.14
k8s-ci-robot Apr 19, 2019
6f50476
Update aws RefreshInterval to 1 minute
Jeffwan Mar 29, 2019
9c6811e
Merge pull request #1931 from Jeffwan/cherry-pick-interval-1.14
k8s-ci-robot Apr 19, 2019
c3eb6eb
Cluster Autoscaler 1.14.1
losipiuk Apr 24, 2019
a30406d
Merge pull request #1951 from losipiuk/lo/cluster-autoscaler-1.14.1
k8s-ci-robot Apr 24, 2019
e243b34
Add cache to getInstanceTypeByLCName for avoid aws rate limit
yagonobre Apr 20, 2019
2e709db
Merge pull request #1956 from yagonobre/cherry-pick-adb1e7c-1.14
k8s-ci-robot Apr 24, 2019
b560b71
Cluster Autoscaler 1.14.2
losipiuk Apr 24, 2019
a00d213
Merge pull request #1960 from losipiuk/lo/ca-1.14.2
k8s-ci-robot Apr 25, 2019
bd04d47
Added handler for ASG MixedInstancesPolicy
drewhemm Apr 12, 2019
e3faa83
Added documentation about AWS ASG MixedInstancesPolicy
drewhemm May 3, 2019
6d8b262
Merge pull request #2013 from danigrmartinez/cluster-autoscaler-relea…
k8s-ci-robot May 15, 2019
1868b83
Look up Azure instance types case-insensitively
mboersma May 15, 2019
bda7c22
Merge pull request #2039 from mboersma/fix-azure-case-sensitive-insta…
k8s-ci-robot May 17, 2019
ec72bd1
Cluster Autoscaler 1.14.2
aleksandra-malinowska Jun 3, 2019
d09c20d
Merge pull request #2090 from aleksandra-malinowska/cluster-autoscale…
k8s-ci-robot Jun 3, 2019
8a99988
merge upstream/cluster-autoscaler-release-1.14
frobware Jun 20, 2019
302c7ab
UPSTREAM: <carry>: openshift: Add spec file for cluster-autoscaler.
Apr 18, 2018
abd5959
UPSTREAM: <carry>: openshift: Add dockerfile for cluster autoscaler.
Apr 18, 2018
6475556
UPSTREAM: <carry>: openshift: Add openshift/release Makefile and hack…
ingvagabund Apr 20, 2018
cc88572
UPSTREAM: <carry>: openshift: Fix the spec and hack scripts so the pa…
ingvagabund Apr 24, 2018
3d619d0
UPSTREAM: <carry>: openshift: Bump embedded tools
smarterclayton Jun 7, 2018
532d2e8
UPSTREAM: <carry>: openshift: Fix spec file to be consistent
smarterclayton Jun 9, 2018
a4903d7
UPSTREAM: <carry>: openshift: cluster-autoscaler.spec: bump golang_ve…
frobware Oct 25, 2018
83db04b
UPSTREAM: <carry>: openshift: cluster-autoscaler.spec: set golang_ver…
frobware Oct 26, 2018
ca73a66
UPSTREAM: <carry>: openshift: initial cluster-api provider implementa…
frobware Oct 25, 2018
be3b8e8
UPSTREAM: <carry>: openshift: Add a RHEL7 dockerfile and standarize f…
smarterclayton Nov 11, 2018
a0b8270
UPSTREAM: <carry>: openshift: cluster-api switch to annotations
frobware Nov 16, 2018
92ac3ce
UPSTREAM: <carry>: openshift: Switch to informers for observing machi…
frobware Oct 30, 2018
1b8f4aa
UPSTREAM: <carry>: openshift: Move min/max constants to clusterapi_ut…
frobware Nov 27, 2018
c91d57a
UPSTREAM: <carry>: openshift: Additional logging in provider.NodeGrou…
frobware Nov 27, 2018
2f79642
UPSTREAM: <carry>: openshift: Rename clusterController to machineCont…
frobware Nov 27, 2018
d56b05e
UPSTREAM: <carry>: openshift: Use NamespaceAll in lieu of ""
frobware Nov 27, 2018
21c6b0f
UPSTREAM: <carry>: openshift: Rename field provider.clusterapi to clu…
frobware Nov 27, 2018
26dcf09
UPSTREAM: <carry>: openshift: Use 'machine' for machine parameter names
frobware Nov 27, 2018
27b6ee7
UPSTREAM: <carry>: openshift: Decouple nodegroup via dependency injec…
frobware Nov 27, 2018
13be136
UPSTREAM: <carry>: openshift: Use node.Spec.ProviderID instead of nod…
frobware Nov 30, 2018
6260a46
UPSTREAM: <carry>: openshift: utils: add unit tests for clusterapi_ut…
frobware Dec 8, 2018
342b52a
UPSTREAM: <carry>: openshift: Remove obsolete usage of "machine" anno…
frobware Jan 7, 2019
f7c9db1
UPSTREAM: <carry>: openshift: Add unit test for findMachine()
frobware Jan 10, 2019
51f4814
UPSTREAM: <carry>: openshift: Add unit test for findNodeByNodeName()
frobware Jan 10, 2019
19c6a64
UPSTREAM: <carry>: openshift: Add unit test for findMachineOwner()
frobware Jan 10, 2019
e8bb3a9
UPSTREAM: <carry>: openshift: Add unit test for findMachineByNodeProv…
frobware Jan 10, 2019
2baa1b0
UPSTREAM: <carry>: openshift: Add unit test for MachinesInMachineSet()
frobware Jan 10, 2019
bf71a0d
UPSTREAM: <carry>: openshift: Remove machineController.MachineSets() …
frobware Jan 10, 2019
d71287b
UPSTREAM: <carry>: openshift: assign ownership to cloud team
paulfantom Jan 24, 2019
c8752bd
UPSTREAM: <carry>: openshift: cloudprovider: pivot to machine.openshi…
frobware Jan 29, 2019
cf756c0
UPSTREAM: <carry>: openshift: Add MachineDeployment informers to cont…
frobware Feb 9, 2019
22cc1b4
UPSTREAM: <carry>: openshift: Revert to whitebox testing
frobware Feb 9, 2019
468764c
UPSTREAM: <carry>: openshift: Add interface ScalableResource
frobware Feb 9, 2019
e7f2226
UPSTREAM: <carry>: openshift: MachineSet implementation of ScalableRe…
frobware Feb 9, 2019
a3c4909
UPSTREAM: <carry>: openshift: MachineDeployment implementation of Sca…
frobware Feb 9, 2019
0ebf27b
UPSTREAM: <carry>: openshift: add unit test for utils
frobware Feb 9, 2019
1c30063
UPSTREAM: <carry>: openshift: add unit test for controller
frobware Feb 9, 2019
7516910
UPSTREAM: <carry>: openshift: add unit test for provider
frobware Feb 9, 2019
5490896
UPSTREAM: <carry>: openshift: add unit test for nodegroup
frobware Feb 9, 2019
13ef18d
UPSTREAM: <carry>: openshift: openshiftmachineapi: add feature gate f…
frobware Feb 11, 2019
9a17ba0
UPSTREAM: <carry>: openshift: address review comments
frobware Feb 13, 2019
22c8f93
UPSTREAM: <carry>: openshift: log nodegroup discovery at level 4
frobware Feb 14, 2019
b2811c1
UPSTREAM: <carry>: openshift: validate node membership in DeleteNodes()
frobware Feb 12, 2019
53626b2
UPSTREAM: <carry>: openshift: create utility functions
frobware Feb 22, 2019
6c294f2
UPSTREAM: <carry>: openshift: return no nodegroup when scaling bounds…
frobware Feb 22, 2019
346070a
UPSTREAM: <carry>: openshift: Remove old test functions
frobware Feb 22, 2019
e7184e4
UPSTREAM: <carry>: openshift: openshiftmachineapi: remove unused fields
frobware Feb 23, 2019
59c5273
UPSTREAM: <carry>: openshift: remove TODO
frobware Mar 13, 2019
216538a
UPSTREAM: <carry>: openshift: Rework TestNodeGroupNewNodeGroup
frobware Mar 14, 2019
0368ecb
UPSTREAM: <carry>: openshift: Rework TestNodeGroupResize
frobware Mar 15, 2019
368ba1b
UPSTREAM: <carry>: openshift: Rework TestNodeGroupDeleteNodes
frobware Mar 16, 2019
e7499ba
UPSTREAM: <carry>: openshift: Rework TestControllerNodeGroups
frobware Mar 17, 2019
548aef2
UPSTREAM: <carry>: openshift: Rework TestControllerFindMachineByID
frobware Mar 17, 2019
025c4e6
UPSTREAM: <carry>: openshift: Rework utils test funcs
frobware Mar 17, 2019
14f6d94
UPSTREAM: <carry>: openshift: Rework TestControllerNodeGroupForNodeLo…
frobware Mar 17, 2019
f4bdec1
UPSTREAM: <carry>: openshift: remove t.Helper() in test helpers
frobware Mar 20, 2019
8e96d1a
UPSTREAM: <carry>: openshift: remove unused makeMachineOwner()
frobware Mar 20, 2019
acaebb9
UPSTREAM: <carry>: openshift: force test namespace ToLower()
frobware Mar 20, 2019
2a43ac6
UPSTREAM: <carry>: openshift: add spec to clusterTestConfig
frobware Mar 20, 2019
a11169d
UPSTREAM: <carry>: openshift: simplify TestProviderConstructorProperties
frobware Mar 20, 2019
817bd97
UPSTREAM: <carry>: openshift: remove parallel tests
frobware Mar 20, 2019
be823b0
UPSTREAM: <carry>: openshift: move all test utility functions
frobware Mar 20, 2019
587a0a5
UPSTREAM: <carry>: openshift: check for explicit errors in resize tests
frobware Mar 20, 2019
820cea0
UPSTREAM: <carry>: openshift: create git history verification script
paulfantom Mar 21, 2019
2f11664
UPSTREAM: <carry>: openshift: add unit test TestNodeGroupIncreaseSize
frobware Mar 26, 2019
afa3ff2
UPSTREAM: <carry>: openshift: add unit test TestNodeGroupDecreaseTarg…
frobware Mar 26, 2019
4ecc1d2
UPSTREAM: <carry>: openshift: cloudprovider updates for 1.13
frobware Mar 27, 2019
6a251a3
UPSTREAM: <carry>: openshift: cloudprovider builder updates for 1.13
frobware Mar 27, 2019
35b37a0
UPSTREAM: <carry>: openshift: expose KubeConfigPath in CA options
frobware Mar 27, 2019
5a0d211
UPSTREAM: <carry>: openshift: Add fmt, lint, vet scripts/Makefile
michaelgugino Mar 22, 2019
efcb4e0
UPSTREAM: <carry>: openshift: fix lint issue machineapi_provider
michaelgugino Mar 27, 2019
56ab199
UPSTREAM: <carry>: openshift: simplify TestControllerFindMachineOwner
frobware Mar 29, 2019
a4563cb
UPSTREAM: <carry>: openshift: simplify TestControllerFindMachineByNod…
frobware Mar 29, 2019
219d528
UPSTREAM: <carry>: openshift: simplify TestControllerFindNodeByNodeName
frobware Mar 29, 2019
f4ad36c
UPSTREAM: <carry>: openshift: simplify TestControllerMachinesInMachin…
frobware Mar 29, 2019
ff81185
UPSTREAM: <carry>: openshift: remove TestControllerNodeGroupsSizes
frobware Mar 29, 2019
d7b9618
UPSTREAM: <carry>: openshift: simplify TestControllerNodeGroupForNode…
frobware Mar 29, 2019
d816c80
UPSTREAM: <carry>: openshift: simplify controller node lookup tests
frobware Mar 29, 2019
a0ffce8
UPSTREAM: <carry>: openshift: expose nodegroup type for testing
frobware Apr 3, 2019
bc4db84
UPSTREAM: <carry>: openshift: add new test helper
frobware Apr 3, 2019
bdc7ed9
UPSTREAM: <carry>: openshift: rework provider test setup
frobware Apr 3, 2019
2b97154
UPSTREAM: <carry>: openshift: rework nodegroup test setup
frobware Apr 3, 2019
ce3e9a7
UPSTREAM: <carry>: openshift: rework controller test setup
frobware Apr 3, 2019
dfb77c5
UPSTREAM: <carry>: openshift: move machineAnnotationKey constant
frobware Apr 3, 2019
909396c
UPSTREAM: <carry>: openshift: add debugFormat const
frobware Apr 3, 2019
a83320a
UPSTREAM: <carry>: openshift: shorten test helper names
frobware Apr 3, 2019
68c4c33
UPSTREAM: <carry>: openshift: disable MachineDeployment in normal ope…
frobware Apr 17, 2019
a63568c
UPSTREAM: <carry>: openshift: record max-nodes-total event
frobware May 1, 2019
3412cfc
UPSTREAM: <carry>: openshift: simplify config creation
frobware May 28, 2019
e030dd3
UPSTREAM: <carry>: openshift: add index to machine informer
frobware May 30, 2019
bf7bf23
UPSTREAM: <carry>: openshift: add findMachineByNodeProviderID
frobware May 30, 2019
4ec5b68
UPSTREAM: <carry>: openshift: Prioritize machine search using provide…
frobware May 31, 2019
f25a6aa
UPSTREAM: <carry>: openshift: add test to search using annotation
frobware May 31, 2019
1dade0d
UPSTREAM: <carry>: openshift: prioritize providerID in calls to Nodes()
frobware May 31, 2019
beeedef
UPSTREAM: <carry>: openshift: Add OpenShift VPA image builds
joelsmith May 17, 2019
eb75e6d
UPSTREAM: <carry>: openshift: Add joelsmith and sjenning to VPA OWNER…
joelsmith Jun 3, 2019
0947e64
UPSTREAM: <carry>: openshift: move maxnodes total event
frobware Jun 5, 2019
f5d5d66
UPSTREAM: <carry>: openshift: Revert "Merge pull request #90 from fro…
frobware Jun 5, 2019
f3aa284
UPSTREAM: <carry>: openshift: move MaxNodesTotalReached event again
frobware Jun 14, 2019
7e8be64
UPSTREAM: <carry>: openshift: add test/openshift/hack scripts
frobware Jun 17, 2019
baa22d6
UPSTREAM: <carry>: openshift: update criteria for returning a nodegroup
frobware Jun 17, 2019
86002a4
UPSTREAM: <carry>: openshift: simplify test setup for nodes/replicas
frobware Jun 18, 2019
b81de65
UPSTREAM: <carry>: openshift: fix build post 1.14 rebase
frobware Jun 19, 2019
c688fa6
UPSTREAM: <carry>: openshift: add test/openshift/Makefile
frobware Jun 20, 2019
6efd972
UPSTREAM: <carry>: openshift: Bump deps for cloudprovider/openshiftma…
frobware Jun 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implement GetInstanceID for Azure and make instanceID to lower cases
feiskyer committed Feb 27, 2019
commit 2758133f89122d316b26852a6370dcf9f05690c5
11 changes: 6 additions & 5 deletions cluster-autoscaler/cloudprovider/azure/azure_agent_pool.go
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ import (
"fmt"
"math/rand"
"sort"
"strings"
"sync"
"time"

@@ -132,7 +133,7 @@ func (as *AgentPool) GetVMIndexes() ([]int, map[int]string, error) {
}

indexes = append(indexes, index)
indexToVM[index] = "azure://" + *instance.ID
indexToVM[index] = "azure://" + strings.ToLower(*instance.ID)
}

sortedIndexes := sort.IntSlice(indexes)
@@ -242,7 +243,7 @@ func (as *AgentPool) GetVirtualMachines() (instances []compute.VirtualMachine, e

tags := instance.Tags
vmPoolName := tags["poolName"]
if vmPoolName == nil || *vmPoolName != as.Id() {
if vmPoolName == nil || !strings.EqualFold(*vmPoolName, as.Id()) {
continue
}

@@ -292,7 +293,7 @@ func (as *AgentPool) Belongs(node *apiv1.Node) (bool, error) {
if targetAsg == nil {
return false, fmt.Errorf("%s doesn't belong to a known agent pool", node.Name)
}
if targetAsg.Id() != as.Id() {
if !strings.EqualFold(targetAsg.Id(), as.Id()) {
return false, nil
}
return true, nil
@@ -315,7 +316,7 @@ func (as *AgentPool) DeleteInstances(instances []*azureRef) error {
return err
}

if asg != commonAsg {
if !strings.EqualFold(asg.Id(), commonAsg.Id()) {
return fmt.Errorf("cannot delete instance (%s) which don't belong to the same node pool (%q)", instance.GetKey(), commonAsg)
}
}
@@ -398,7 +399,7 @@ func (as *AgentPool) Nodes() ([]cloudprovider.Instance, error) {
}

// To keep consistent with providerID from kubernetes cloud provider, do not convert ID to lower case.
name := "azure://" + *instance.ID
name := "azure://" + strings.ToLower(*instance.ID)
nodes = append(nodes, cloudprovider.Instance{Id: name})
}

41 changes: 29 additions & 12 deletions cluster-autoscaler/cloudprovider/azure/azure_cache.go
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ import (
"fmt"
"reflect"
"regexp"
"strings"
"sync"
"time"

@@ -63,7 +64,7 @@ func (m *asgCache) Register(asg cloudprovider.NodeGroup) bool {
defer m.mutex.Unlock()

for i := range m.registeredAsgs {
if existing := m.registeredAsgs[i]; existing.Id() == asg.Id() {
if existing := m.registeredAsgs[i]; strings.EqualFold(existing.Id(), asg.Id()) {
if reflect.DeepEqual(existing, asg) {
return false
}
@@ -94,7 +95,7 @@ func (m *asgCache) Unregister(asg cloudprovider.NodeGroup) bool {
updated := make([]cloudprovider.NodeGroup, 0, len(m.registeredAsgs))
changed := false
for _, existing := range m.registeredAsgs {
if existing.Id() == asg.Id() {
if strings.EqualFold(existing.Id(), asg.Id()) {
klog.V(1).Infof("Unregistered ASG %s", asg.Id())
changed = true
continue
@@ -117,42 +118,46 @@ func (m *asgCache) FindForInstance(instance *azureRef, vmType string) (cloudprov
m.mutex.Lock()
defer m.mutex.Unlock()

if m.notInRegisteredAsg[*instance] {
inst := azureRef{Name: strings.ToLower(instance.Name)}
if m.notInRegisteredAsg[inst] {
// We already know we don't own this instance. Return early and avoid
// additional calls.
return nil, nil
}

if vmType == vmTypeVMSS {
// Omit virtual machines not managed by vmss.
if ok := virtualMachineRE.Match([]byte(instance.Name)); ok {
if ok := virtualMachineRE.Match([]byte(inst.Name)); ok {
klog.V(3).Infof("Instance %q is not managed by vmss, omit it in autoscaler", instance.Name)
m.notInRegisteredAsg[*instance] = true
m.notInRegisteredAsg[inst] = true
return nil, nil
}
}

if vmType == vmTypeStandard {
// Omit virtual machines with providerID not in Azure resource ID format.
if ok := virtualMachineRE.Match([]byte(instance.Name)); !ok {
if ok := virtualMachineRE.Match([]byte(inst.Name)); !ok {
klog.V(3).Infof("Instance %q is not in Azure resource ID format, omit it in autoscaler", instance.Name)
m.notInRegisteredAsg[*instance] = true
m.notInRegisteredAsg[inst] = true
return nil, nil
}
}

if asg, found := m.instanceToAsg[*instance]; found {
// Look up caches for the instance.
if asg := m.getInstanceFromCache(inst.Name); asg != nil {
return asg, nil
}

// Not found, regenerate the cache and try again.
if err := m.regenerate(); err != nil {
return nil, fmt.Errorf("error while looking for ASG for instance %+v, error: %v", *instance, err)
return nil, fmt.Errorf("error while looking for ASG for instance %q, error: %v", instance.Name, err)
}
if config, found := m.instanceToAsg[*instance]; found {
return config, nil
if asg := m.getInstanceFromCache(inst.Name); asg != nil {
return asg, nil
}

m.notInRegisteredAsg[*instance] = true
// Add the instance to notInRegisteredAsg since it's unknown from Azure.
m.notInRegisteredAsg[inst] = true
return nil, nil
}

@@ -179,3 +184,15 @@ func (m *asgCache) regenerate() error {
m.instanceToAsg = newCache
return nil
}

// Get node group from cache. nil would be return if not found.
// Should be call with lock protected.
func (m *asgCache) getInstanceFromCache(providerID string) cloudprovider.NodeGroup {
for instanceID, asg := range m.instanceToAsg {
if strings.EqualFold(instanceID.GetKey(), providerID) {
return asg
}
}

return nil
}
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@ package azure
import (
"io"
"os"
"strings"

"k8s.io/klog"

@@ -110,6 +111,11 @@ func (azure *AzureCloudProvider) Refresh() error {
return azure.azureManager.Refresh()
}

// GetInstanceID gets the instance ID for the specified node.
func (azure *AzureCloudProvider) GetInstanceID(node *apiv1.Node) string {
return strings.ToLower(node.Spec.ProviderID)
}

// azureRef contains a reference to some entity in Azure world.
type azureRef struct {
Name string
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ func (agentPool *ContainerServiceAgentPool) GetAKSAgentPool(agentProfiles *[]con
for _, value := range *agentProfiles {
profileName := *value.Name
klog.V(5).Infof("AKS AgentPool profile name: %s", profileName)
if profileName == (agentPool.azureRef.Name) {
if strings.EqualFold(profileName, agentPool.azureRef.Name) {
return &value
}
}
@@ -92,7 +92,7 @@ func (agentPool *ContainerServiceAgentPool) GetACSAgentPool(agentProfiles *[]con
for _, value := range *agentProfiles {
profileName := *value.Name
klog.V(5).Infof("ACS AgentPool profile name: %s", profileName)
if profileName == (agentPool.azureRef.Name) {
if strings.EqualFold(profileName, agentPool.azureRef.Name) {
return &value
}
}
@@ -105,7 +105,7 @@ func (agentPool *ContainerServiceAgentPool) GetACSAgentPool(agentProfiles *[]con
profileName := *value.Name
poolName := agentPool.azureRef.Name + "pool0"
klog.V(5).Infof("Workaround match check - ACS AgentPool Profile: %s <=> Poolname: %s", profileName, poolName)
if profileName == poolName {
if strings.EqualFold(profileName, poolName) {
return &value
}
}
@@ -270,7 +270,7 @@ func (agentPool *ContainerServiceAgentPool) SetNodeCount(count int) (err error)
func (agentPool *ContainerServiceAgentPool) GetProviderID(name string) string {
//TODO: come with a generic way to make it work with provider id formats
// in different version of k8s.
return "azure://" + name
return "azure://" + strings.ToLower(name)
}

//GetName extracts the name of the node (a format which underlying cloud service understands)
@@ -285,7 +285,7 @@ func (agentPool *ContainerServiceAgentPool) GetName(providerID string) (string,
return "", err
}
for _, vm := range vms {
if strings.Compare(*vm.ID, providerID) == 0 {
if strings.EqualFold(*vm.ID, providerID) {
return *vm.Name, nil
}
}
@@ -398,7 +398,7 @@ func (agentPool *ContainerServiceAgentPool) IsContainerServiceNode(tags map[stri
poolName := tags["poolName"]
if poolName != nil {
klog.V(5).Infof("Matching agentPool name: %s with tag name: %s", agentPool.azureRef.Name, *poolName)
if *poolName == agentPool.azureRef.Name {
if strings.EqualFold(*poolName, agentPool.azureRef.Name) {
return true
}
}
2 changes: 1 addition & 1 deletion cluster-autoscaler/cloudprovider/azure/azure_fakes.go
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ import (
)

const (
fakeVirtualMachineScaleSetVMID = "/subscriptions/test-subscription-id/resourceGroups/test-asg/providers/Microsoft.Compute/virtualMachineScaleSets/agents/virtualMachines/0"
fakeVirtualMachineScaleSetVMID = "/subscriptions/test-subscription-id/resourcegroups/test-asg/providers/microsoft.compute/virtualmachinescalesets/agents/virtualmachines/0"
)

// VirtualMachineScaleSetsClientMock mocks for VirtualMachineScaleSetsClient.
52 changes: 9 additions & 43 deletions cluster-autoscaler/cloudprovider/azure/azure_scale_set.go
Original file line number Diff line number Diff line change
@@ -48,8 +48,6 @@ type ScaleSet struct {
mutex sync.Mutex
lastRefresh time.Time
curSize int64
// virtualMachines holds a list of vmss instances (instanceID -> resourceID).
virtualMachines map[string]string
}

// NewScaleSet creates a new NewScaleSet.
@@ -58,11 +56,10 @@ func NewScaleSet(spec *dynamic.NodeGroupSpec, az *AzureManager) (*ScaleSet, erro
azureRef: azureRef{
Name: spec.Name,
},
minSize: spec.MinSize,
maxSize: spec.MaxSize,
manager: az,
curSize: -1,
virtualMachines: make(map[string]string),
minSize: spec.MinSize,
maxSize: spec.MaxSize,
manager: az,
curSize: -1,
}

return scaleSet, nil
@@ -196,55 +193,24 @@ func (scaleSet *ScaleSet) IncreaseSize(delta int) error {
// GetScaleSetVms returns list of nodes for the given scale set.
// Note that the list results is not used directly because their resource ID format
// is not consistent with Get results.
// TODO(feiskyer): use list results directly after the issue fixed in Azure VMSS API.
func (scaleSet *ScaleSet) GetScaleSetVms() ([]string, error) {
ctx, cancel := getContextWithCancel()
defer cancel()

resourceGroup := scaleSet.manager.config.ResourceGroup
result, err := scaleSet.manager.azClient.virtualMachineScaleSetVMsClient.List(ctx, resourceGroup, scaleSet.Name, "", "", "")
vmList, err := scaleSet.manager.azClient.virtualMachineScaleSetVMsClient.List(ctx, resourceGroup, scaleSet.Name, "", "", "")
if err != nil {
klog.Errorf("VirtualMachineScaleSetVMsClient.List failed for %s: %v", scaleSet.Name, err)
return nil, err
}

instanceIDs := make([]string, 0)
for _, vm := range result {
instanceIDs = append(instanceIDs, *vm.InstanceID)
}

allVMs := make([]string, 0)
for _, instanceID := range instanceIDs {
// Get from cache first.
if v, ok := scaleSet.virtualMachines[instanceID]; ok {
allVMs = append(allVMs, v)
continue
}

// Not in cache, get from Azure API.
getCtx, getCancel := getContextWithCancel()
defer getCancel()
vm, err := scaleSet.manager.azClient.virtualMachineScaleSetVMsClient.Get(getCtx, resourceGroup, scaleSet.Name, instanceID)
if err != nil {
exists, realErr := checkResourceExistsFromError(err)
if realErr != nil {
klog.Errorf("Failed to get VirtualMachineScaleSetVM by (%s,%s), error: %v", scaleSet.Name, instanceID, err)
return nil, realErr
}

if !exists {
klog.Warningf("Couldn't find VirtualMachineScaleSetVM by (%s,%s), assuming it has been removed", scaleSet.Name, instanceID)
continue
}
}

for _, vm := range vmList {
// The resource ID is empty string, which indicates the instance may be in deleting state.
if len(*vm.ID) == 0 {
continue
}

// Save into cache.
scaleSet.virtualMachines[instanceID] = *vm.ID
allVMs = append(allVMs, *vm.ID)
}

@@ -294,7 +260,7 @@ func (scaleSet *ScaleSet) Belongs(node *apiv1.Node) (bool, error) {
if targetAsg == nil {
return false, fmt.Errorf("%s doesn't belong to a known scale set", node.Name)
}
if targetAsg.Id() != scaleSet.Id() {
if !strings.EqualFold(targetAsg.Id(), scaleSet.Id()) {
return false, nil
}
return true, nil
@@ -320,7 +286,7 @@ func (scaleSet *ScaleSet) DeleteInstances(instances []*azureRef) error {
return err
}

if asg != commonAsg {
if !strings.EqualFold(asg.Id(), commonAsg.Id()) {
return fmt.Errorf("cannot delete instance (%s) which don't belong to the same Scale Set (%q)", instance.Name, commonAsg)
}

@@ -490,7 +456,7 @@ func (scaleSet *ScaleSet) Nodes() ([]cloudprovider.Instance, error) {

instances := make([]cloudprovider.Instance, 0, len(vms))
for i := range vms {
name := "azure://" + vms[i]
name := "azure://" + strings.ToLower(vms[i])
instances = append(instances, cloudprovider.Instance{Id: name})
}

13 changes: 4 additions & 9 deletions cluster-autoscaler/cloudprovider/azure/azure_scale_set_test.go
Original file line number Diff line number Diff line change
@@ -33,10 +33,9 @@ func newTestScaleSet(manager *AzureManager, name string) *ScaleSet {
azureRef: azureRef{
Name: name,
},
manager: manager,
minSize: 1,
maxSize: 5,
virtualMachines: make(map[string]string),
manager: manager,
minSize: 1,
maxSize: 5,
}
}

@@ -92,7 +91,7 @@ func TestBelongs(t *testing.T) {

invalidNode := &apiv1.Node{
Spec: apiv1.NodeSpec{
ProviderID: "azure:///subscriptions/test-subscrition-id/resourceGroups/invalid-asg/providers/Microsoft.Compute/virtualMachineScaleSets/agents/virtualMachines/0",
ProviderID: "azure:///subscriptions/test-subscrition-id/resourcegroups/invalid-asg/providers/microsoft.compute/virtualmachinescalesets/agents/virtualmachines/0",
},
}
_, err := scaleSet.Belongs(invalidNode)
@@ -183,10 +182,6 @@ func TestScaleSetNodes(t *testing.T) {
ss, ok := group.(*ScaleSet)
assert.True(t, ok)
assert.NotNil(t, ss)
assert.Equal(t, ss.virtualMachines, map[string]string{
"0": fakeVirtualMachineScaleSetVMID,
})

instances, err := group.Nodes()
assert.NoError(t, err)
assert.Equal(t, len(instances), 1)