Skip to content

Instantly share code, notes, and snippets.

@misterikkit
Last active August 10, 2018 16:45
Show Gist options
  • Save misterikkit/b5c5d56f55a52df48839f3e1aa5ec48b to your computer and use it in GitHub Desktop.
Save misterikkit/b5c5d56f55a52df48839f3e1aa5ec48b to your computer and use it in GitHub Desktop.
Kubernetes Scheduler Startup and Configuration Sequence
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="2924" height="1256"><defs/><g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g><rect fill="white" stroke="none" x="0" y="0" width="2924" height="1256"/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="16.5pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1274.0406472671757" y="24.50280495" text-anchor="start" dominant-baseline="alphabetic">K8S Scheduler Configuration Handling</text></g><g/><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 71.50959099270703 116.143295463 L 71.50959099270703 170.049466353" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 320.0351740401328 116.143295463 L 320.0351740401328 490.54615509900003" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 669.991627143711 261.689956866 L 669.991627143711 582.1866456120001" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 1045.2208768781484 399.069016619 L 1045.2208768781484 444.807585859" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 1421.7456381876796 582.1866456120001 L 1421.7456381876796 827.5413991780002" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 1893.2188254864739 827.5413991780002 L 1893.2188254864739 983.878513080474" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 2167.0135506847787 673.8271361250002 L 2167.0135506847787 983.715161047474" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 2511.7545297316196 983.715161047474 L 2511.7545297316196 1075.519003593474" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 2511.7545297316196 983.878513080474 L 2511.7545297316196 1256.8397602234738" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 2793.777063954242 1075.519003593474 L 2793.777063954242 1256.8397602234738" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="12.565541,5.445067766666667"/></g><g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 8.167601649999995 55.86639528600002 L 134.85158033541407 55.86639528600002 L 134.85158033541407 116.14329546300002 L 8.167601649999995 116.14329546300002 L 8.167601649999995 55.86639528600002 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="25.8912972305" y="83.472888863" text-anchor="start" dominant-baseline="alphabetic">command line</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="56.030358204621095" y="99.808092163" text-anchor="start" dominant-baseline="alphabetic">flags</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 151.18678363541406 51.78259446100001 L 488.8835644448516 51.78259446100001 L 488.8835644448516 116.14329546300002 L 151.18678363541406 116.14329546300002 L 151.18678363541406 51.78259446100001 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="168.91047921591405" y="79.389088038" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/cmd/kube-scheduler/options</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="286.80635323935155" y="99.808092163" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="286.80635323935155" y="99.808092163" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="286.80635323935155" y="99.808092163" text-anchor="start" dominant-baseline="alphabetic">Options</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="353.26399484091405" y="99.808092163" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="353.26399484091405" y="99.808092163" text-anchor="start" dominant-baseline="alphabetic"></text></g></g><g><g><g><rect fill="white" stroke="none" x="129.7735180370449" y="148.81370206300002" width="131.99772895875" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="132.2237985320449" y="163.515385033" text-anchor="start" dominant-baseline="alphabetic">parsed into fields of</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 71.50959099270703 170.049466353 L 317.3126401567995 170.049466353" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="6.53408132"/><g transform="translate(320.0351740401328,170.049466353) translate(-320.0351740401328,-170.049466353)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 306.4225046234661 163.24313164466668 L 320.0351740401328 170.049466353 L 306.4225046234661 176.85580106133335 Z"/></g></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 505.21876774485156 195.94076358350003 L 834.7644865425702 195.94076358350003 L 834.7644865425702 260.3014645855 L 505.21876774485156 260.3014645855 L 505.21876774485156 195.94076358350003 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="522.9424633253516" y="223.54725716049998" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/cmd/kube-scheduler/config</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="642.1448787916602" y="243.96626128549997" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="642.1448787916602" y="243.96626128549997" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="642.1448787916602" y="243.96626128549997" text-anchor="start" dominant-baseline="alphabetic">Config</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="697.8383754957617" y="243.96626128549997" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="697.8383754957617" y="243.96626128549997" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="410.17669039749217" y="206.8853497945" width="4.90056099" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="412.6269708924922" y="221.58703276449998" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 320.0351740401328 228.1211140845 L 502.49623386151825 228.1211140845" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(505.21876774485156,228.1211140845) translate(-505.21876774485156,-228.1211140845)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 491.6060983281849 221.31477937616665 L 505.21876774485156 228.1211140845 L 491.6060983281849 234.92744879283333 Z"/></g></g><g><g><rect fill="white" stroke="none" x="397.66983243823046" y="286.192761816" width="194.68713630738281" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="400.1201129332305" y="300.89444478599995" text-anchor="start" dominant-baseline="alphabetic">ApplyTo() fills out some fields</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 320.0351740401328 307.428526106 L 667.2690932603776 307.428526106" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="6.53408132"/><g transform="translate(669.991627143711,307.428526106) translate(-669.991627143711,-307.428526106)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 656.3789577270443 300.62219139766665 L 669.991627143711 307.428526106 L 656.3789577270443 314.23486081433333 Z"/></g></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 851.0996898425702 333.31982333650006 L 1239.3420639137264 333.31982333650006 L 1239.3420639137264 397.68052433850005 L 851.0996898425702 397.68052433850005 L 851.0996898425702 333.31982333650006 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="868.8233854230702" y="360.92631691350005" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="923.0396711286367" y="381.34532103850006" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="923.0396711286367" y="381.34532103850006" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="923.0396711286367" y="381.34532103850006" text-anchor="start" dominant-baseline="alphabetic">KubeSchedulerConfiguration</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1167.40208262766" y="381.34532103850006" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1167.40208262766" y="381.34532103850006" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="514.2943212461562" y="344.2644095475" width="142.54622139039063" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="516.7446017411562" y="358.9660925175" text-anchor="start" dominant-baseline="alphabetic">loadConfigFromFile()</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 320.0351740401328 365.50017383750003 L 848.3771559592369 365.50017383750003" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(851.0996898425702,365.50017383750003) translate(-851.0996898425702,-365.50017383750003)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 837.4870204259036 358.6938391291667 L 851.0996898425702 365.50017383750003 L 837.4870204259036 372.30650854583337 Z"/></g></g><g><g><rect fill="white" stroke="none" x="645.1544600520313" y="423.571821569" width="74.94713081421875" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="647.6047405470313" y="438.273504539" text-anchor="start" dominant-baseline="alphabetic">member of</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 1045.2208768781484 444.807585859 L 322.7577079234661 444.807585859" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="6.53408132"/><g transform="translate(320.0351740401328,444.807585859) translate(-320.0351740401328,-444.807585859)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 333.6478434567995 438.0012511506667 L 320.0351740401328 444.807585859 L 333.6478434567995 451.61392056733337 Z"/></g></g><g><g><rect fill="white" stroke="none" x="403.7740118205547" y="469.310390809" width="182.47877754273438" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="406.2242923155547" y="484.012073779" text-anchor="start" dominant-baseline="alphabetic">Config() fills out other fields</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 320.0351740401328 490.54615509900003 L 667.2690932603776 490.54615509900003" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray="6.53408132"/><g transform="translate(669.991627143711,490.54615509900003) translate(-669.991627143711,-490.54615509900003)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 656.3789577270443 483.7398203906667 L 669.991627143711 490.54615509900003 L 656.3789577270443 497.35248980733337 Z"/></g></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 1256.9727787888203 516.4374523295 L 1586.518497586539 516.4374523295 L 1586.518497586539 580.7981533315001 L 1256.9727787888203 580.7981533315001 L 1256.9727787888203 516.4374523295 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1274.6964743693202" y="544.0439459065001" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/cmd/kube-scheduler/config</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1348.4455054362147" y="564.4629500315001" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1348.4455054362147" y="564.4629500315001" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="1348.4455054362147" y="564.4629500315001" text-anchor="start" dominant-baseline="alphabetic">CompletedConfig</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1495.0457709391444" y="564.4629500315001" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1495.0457709391444" y="564.4629500315001" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="851.8722010967539" y="527.3820385405" width="223.22000373902344" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="854.3224815917539" y="542.0837215105" text-anchor="start" dominant-baseline="alphabetic">Complete() applies some defaults</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 669.991627143711 548.6178028305001 L 1254.2502449054869 548.6178028305001" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(1256.9727787888203,548.6178028305001) translate(-1256.9727787888203,-548.6178028305001)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 1243.3601093721536 541.8114681221667 L 1256.9727787888203 548.6178028305001 L 1243.3601093721536 555.4241375388334 Z"/></g></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 2044.1913748796694 608.0779428425001 L 2289.835726489888 608.0779428425001 L 2289.835726489888 672.4386438445001 L 2044.1913748796694 672.4386438445001 L 2044.1913748796694 608.0779428425001 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2061.9150704601693" y="635.6844364195001" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/pkg/scheduler</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2113.751221583216" y="656.1034405445001" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2113.751221583216" y="656.1034405445001" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="2113.751221583216" y="656.1034405445001" text-anchor="start" dominant-baseline="alphabetic">Configurator</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2220.275879786341" y="656.1034405445001" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2220.275879786341" y="656.1034405445001" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="1665.3630365245142" y="619.0225290535001" width="135.21094001832031" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1667.8133170195142" y="633.7242120235001" text-anchor="start" dominant-baseline="alphabetic">NewConfigFactory()</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 1421.7456381876796 640.2582933435001 L 2041.468840996336 640.2582933435001" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(2044.1913748796694,640.2582933435001) translate(-2044.1913748796694,-640.2582933435001)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 2030.5787054630027 633.4519586351668 L 2044.1913748796694 640.2582933435001 L 2030.5787054630027 647.0646280518334 Z"/></g></g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 1421.7456381876796 717.1154248700002 L 1413.5780365376795 717.1154248700002 M 1068.0901614981485 698.3299410750002 L 1398.8763535676796 698.3299410750002 L 1413.5780365376797 717.1154248700002 L 1398.8763535676796 735.9009086650002 L 1068.0901614981485 735.9009086650002 L 1053.3884785281484 717.1154248700002 L 1068.0901614981485 698.3299410750002" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1076.2577631481483" y="721.1992256950002" text-anchor="start" dominant-baseline="alphabetic">Either a provider name or a Policy object is used</text></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 1758.5814793932786 761.7922058955002 L 2027.8561715796693 761.7922058955002 L 2027.8561715796693 826.1529068975002 L 1758.5814793932786 826.1529068975002 L 1758.5814793932786 761.7922058955002 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1776.3051749737785" y="789.3986994725002" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/pkg/scheduler/api</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1867.3049842389153" y="809.8177035975002" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1867.3049842389153" y="809.8177035975002" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="1867.3049842389153" y="809.8177035975002" text-anchor="start" dominant-baseline="alphabetic">Policy</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1919.1326667340325" y="809.8177035975002" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1919.1326667340325" y="809.8177035975002" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="1441.0756287593463" y="772.7367921065002" width="298.1758600622656" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1443.5259092543463" y="787.4384750765001" text-anchor="start" dominant-baseline="alphabetic">reads from ComponentConfig or separate file</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 1421.7456381876796 793.9725563965002 L 1755.8589455099452 793.9725563965002" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(1758.5814793932786,793.9725563965002) translate(-1758.5814793932786,-793.9725563965002)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 1744.968809976612 787.1662216881668 L 1758.5814793932786 793.9725563965002 L 1744.968809976612 800.7788911048335 Z"/></g></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 2388.93235392651 917.9659677649739 L 2634.5767055367287 917.9659677649739 L 2634.5767055367287 982.326668766974 L 2388.93235392651 982.326668766974 L 2388.93235392651 917.9659677649739 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2406.6560495070103" y="945.572461341974" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/pkg/scheduler</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2483.907781379569" y="965.991465466974" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2483.907781379569" y="965.991465466974" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="2483.907781379569" y="965.991465466974" text-anchor="start" dominant-baseline="alphabetic">Config</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2539.6012780836704" y="965.991465466974" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2539.6012780836704" y="965.991465466974" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="2186.3435412564454" y="847.234537475974" width="183.25882209839844" height="21.23576429"/></g><g><rect fill="white" stroke="none" x="2186.3435412564454" y="863.569740775974" width="79.01195015015625" height="21.23576429"/></g><g><rect fill="white" stroke="none" x="2186.3435412564454" y="879.904944075974" width="174.3062006384375" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2188.793821751445" y="861.936220445974" text-anchor="start" dominant-baseline="alphabetic">CreateFromProvider(string)</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2188.793821751445" y="878.271423745974" text-anchor="start" dominant-baseline="alphabetic">               or</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2188.793821751445" y="894.6066270459739" text-anchor="start" dominant-baseline="alphabetic">CreateFromConfig(Policy)</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 2167.0135506847787 901.140708365974 L 2386.209820043177 949.5451099344707" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(2388.93235392651,950.146318265974) rotate(12.452593582792957,0,0) translate(-2388.93235392651,-950.146318265974)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 2375.3196845098437 943.3399835576406 L 2388.93235392651 950.146318265974 L 2375.3196845098437 956.9526529743073 Z"/><g transform="rotate(-12.452593582792957,0,0)"/></g></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 2388.93235392651 918.129319797974 L 2634.5767055367287 918.129319797974 L 2634.5767055367287 982.490020799974 L 2388.93235392651 982.490020799974 L 2388.93235392651 918.129319797974 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2406.6560495070103" y="945.735813374974" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/pkg/scheduler</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2483.907781379569" y="966.154817499974" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2483.907781379569" y="966.154817499974" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="2483.907781379569" y="966.154817499974" text-anchor="start" dominant-baseline="alphabetic">Config</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2539.6012780836704" y="966.154817499974" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2539.6012780836704" y="966.154817499974" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="2138.625309211492" y="929.073906008974" width="4.90056099" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2141.075589706492" y="943.7755889789739" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 1893.2188254864739 950.309670298974 L 2386.209820043177 950.309670298974" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(2388.93235392651,950.309670298974) translate(-2388.93235392651,-950.309670298974)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 2375.3196845098437 943.5033355906406 L 2388.93235392651 950.309670298974 L 2375.3196845098437 957.1160050073073 Z"/></g></g><path fill="none" stroke="none"/><g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 2670.9548881491323 1009.769810310974 L 2916.599239759351 1009.769810310974 L 2916.599239759351 1074.130511312974 L 2670.9548881491323 1074.130511312974 L 2670.9548881491323 1009.769810310974 Z" stroke-miterlimit="10" stroke-width="2.613632528" stroke-dasharray=""/></g><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2688.6785837296325" y="1037.3763038879742" text-anchor="start" dominant-baseline="alphabetic">k8s.io/kubernetes/pkg/scheduler</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2751.2445169571715" y="1057.7953080129741" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2751.2445169571715" y="1057.7953080129741" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="bold" text-decoration="normal" x="2751.2445169571715" y="1057.7953080129741" text-anchor="start" dominant-baseline="alphabetic">Scheduler</text><text fill="black" stroke="none" font-family="sans-serif" font-size="13.2pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2836.309610951312" y="1057.7953080129741" text-anchor="start" dominant-baseline="alphabetic"></text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2836.309610951312" y="1057.7953080129741" text-anchor="start" dominant-baseline="alphabetic"></text></g><g><g><rect fill="white" stroke="none" x="2531.0845203032864" y="1020.714396521974" width="120.54037727417969" height="21.23576429"/></g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2533.534800798286" y="1035.416079491974" text-anchor="start" dominant-baseline="alphabetic">NewFromConfig()</text></g><g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 2511.7545297316196 1041.950160811974 L 2668.232354265799 1041.950160811974" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g transform="translate(2670.9548881491323,1041.950160811974) translate(-2670.9548881491323,-1041.950160811974)"><path fill="black" stroke="none" paint-order="stroke fill markers" d=" M 2657.342218732466 1035.1438261036408 L 2670.9548881491323 1041.950160811974 L 2657.342218732466 1048.7564955203072 Z"/></g></g><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 2698.8180652839487 1100.021808543474 L 2874.0343796545344 1100.021808543474 L 2888.7360626245345 1114.723491513474 L 2888.7360626245345 1137.592776133474 L 2698.8180652839487 1137.592776133474 L 2698.8180652839487 1100.021808543474 M 2874.0343796545344 1100.021808543474 L 2874.0343796545344 1114.723491513474 L 2888.7360626245345 1114.723491513474" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="2721.687349903949" y="1122.8910931634741" text-anchor="start" dominant-baseline="alphabetic">now we can call Run()</text></g><path fill="none" stroke="black" paint-order="fill stroke markers" d=" M 8.16760165 1175.4359971118074 L 2915.83239835 1175.4359971118074 M 8.16760165 1180.881064878474 L 2915.83239835 1180.881064878474 M 8.16760165 1186.3261326451407 L 2915.83239835 1186.3261326451407" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><path fill="white" stroke="black" paint-order="fill stroke markers" d=" M 1308.780976305293 1162.095581083474 L 1615.2190236947072 1162.095581083474 L 1615.2190236947072 1199.666548673474 L 1308.780976305293 1199.666548673474 Z" stroke-miterlimit="10" stroke-width="1.3612669416666667" stroke-dasharray=""/><g><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1331.650260925293" y="1184.964865703474" text-anchor="start" dominant-baseline="alphabetic">made with https:</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1438.366081237793" y="1184.964865703474" text-anchor="start" dominant-baseline="alphabetic">//</text><text fill="black" stroke="none" font-family="sans-serif" font-size="11pt" font-style="normal" font-weight="normal" text-decoration="normal" x="1446.5100326538086" y="1184.964865703474" text-anchor="start" dominant-baseline="alphabetic">sequencediagram.org/</text></g></g></g></svg>
title K8S Scheduler Configuration Handling
# Paste into https://sequencediagram.org/
participant "command line\nflags" as flags
participant "k8s.io/kubernetes/cmd/kube-scheduler/options\n++**Options**++" as Options
participant "k8s.io/kubernetes/cmd/kube-scheduler/config\n++**Config**++" as Config
participant "k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1\n++**KubeSchedulerConfiguration**++" as componentConfig
participant "k8s.io/kubernetes/cmd/kube-scheduler/config\n++**CompletedConfig**++" as CompletedConfig
participant "k8s.io/kubernetes/pkg/scheduler/api\n++**Policy**++" as Policy
participant "k8s.io/kubernetes/pkg/scheduler\n++**Configurator**++" as Configurator
participant "k8s.io/kubernetes/pkg/scheduler\n++**Config**++" as schedConfig
participant "k8s.io/kubernetes/pkg/scheduler\n++**Scheduler**++" as Scheduler
flags --> Options: parsed into fields of
destroysilent flags
Options -> *Config:
Options --> Config: ApplyTo() fills out some fields
Options -> *componentConfig: loadConfigFromFile()
componentConfig --> Options: member of
destroysilent componentConfig
Options --> Config: Config() fills out other fields
destroysilent Options
Config -> *CompletedConfig: Complete() applies some defaults
destroysilent Config
CompletedConfig -> *Configurator: NewConfigFactory()
abox left of CompletedConfig: Either a provider name or a Policy object is used
CompletedConfig -> *Policy: reads from ComponentConfig or separate file
destroysilent CompletedConfig
Configurator ->(3) *schedConfig: CreateFromProvider(string)\n or\nCreateFromConfig(Policy)
destroysilent Configurator
space -7.1
Policy -> *schedConfig:
destroysilent Policy
schedConfig -> *Scheduler: NewFromConfig()
destroysilent schedConfig
note over Scheduler: now we can call Run()
==made with https://sequencediagram.org/==
title K8S Scheduler Application Lifecycle
# Paste into https://sequencediagram.org/
participant "main()" as main
participant "command" as command
participant "anonymous\nfunc" as anonFunc
participant "k8s.io/kubernetes/cmd/kube-scheduler/options\n++**Options**++" as Options
participant "k8s.io/kubernetes/cmd/kube-scheduler/config\n++**Config**++" as Config
participant "k8s.io/kubernetes/cmd/kube-scheduler/config\n++**CompletedConfig**++" as CompletedConfig
participant "k8s.io/kubernetes/cmd/kube-scheduler/app\n++**func Run(CompletedConfig)**++" as appPkg
participant "k8s.io/client-go/tools/leaderelection\n++**LeaderElector**++" as LeaderElector
participant "k8s.io/kubernetes/pkg/scheduler\n++**Configurator**++" as Configurator
participant "k8s.io/kubernetes/pkg/scheduler\n++**Config**++" as schedulerConfig
participant "k8s.io/kubernetes/pkg/scheduler\n++**Scheduler**++" as scheduler
activate main
main->*command: NewSchedulerCommand()
note left of command:This is a\nCobra command
space -5
command->*anonFunc:value of `Run` field
#space -6
#rbox over main: flags get parsed\ninto `Options`
main->*Options: flags get parsed
main->command: Execute()
activate command
command->anonFunc:
activate anonFunc
anonFunc->>Options: Validate()
linear on
anonFunc->Options: Config()
space -5
Options->*Config:
destroysilent Options
linear off
linear on
anonFunc->Config:Complete()
space -5
Config->*CompletedConfig:
destroysilent Config
linear off
CompletedConfig-->(3)appPkg:
space -3
destroysilent CompletedConfig
activate appPkg
space -2
anonFunc->appPkg:
#activate appPkg
appPkg->*Configurator: NewConfigFactory(CompletedConfig)
abox over Configurator:++Informer event handlers\nare added here++
linear on
appPkg->Configurator: NewSchedulerConfig()
destroysilent Configurator
space -5
Configurator->*schedulerConfig:
schedulerConfig-->(4)*scheduler:
linear off
space -7.1
destroysilent schedulerConfig
appPkg->*scheduler:NewFromConfig(Config)
abox over appPkg:++Informers and broadcasters\nare started here++
appPkg->*LeaderElector:NewLeaderElector()
appPkg->LeaderElector: Run()
activate LeaderElector
LeaderElector->LeaderElector: acquire leadership
LeaderElector->scheduler: Run()
activate scheduler
rbox over scheduler:++This is the\n run loop!++
# Unroll the stack here
scheduler->LeaderElector: crash or lost leadership
deactivate scheduler
LeaderElector->appPkg:
deactivate LeaderElector
appPkg->anonFunc:
deactivate appPkg
anonFunc->command:
deactivate anonFunc
command->main:
deactivate command
deactivate main
==made with https://sequencediagram.org/==
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment