• Kubernetes Submit Queue's avatar
    Merge pull request #53694 from andyzhangx/azure-avset-nil-fix · 6118a4b9
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 53694, 53919). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    fix controller manager crash issue on a manually created k8s cluster
    
    **What this PR does / why we need it**:
    fix controller manager crash issue on a manually created k8s cluster, it's due to availability set nil issue in azure loadbalancer
    
    **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
    In the testing of a manually created k8s cluster, I found controller manager on master would crash in current scenario:
    1. Use acs-engine to set up k8s 1.7.7 cluster (it's with an availability set)
    2. Manually add a node to the k8s cluster (without an availibity set in this VM)
    3. Set up a service and schedule the pod onto this newly added node
    4. controller manager would crash on master because although this k8s cluster has an availability set, the newly added node's `machine.AvailabilitySet` is nil which would cause controller manager crash
    
    **Special notes for your reviewer**:
    @brendanburns @karataliu @JiangtianLi 
    
    **Release note**:
    
    ```
    fix controller manager crash issue on a manually created k8s cluster
    ```
    /sig azure
    6118a4b9
Name
Last commit
Last update
..
providers Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
README.md Loading commit data...
cloud.go Loading commit data...
doc.go Loading commit data...
plugins.go Loading commit data...