Set Status.DaemonEndpoints.KubeletEndpoint.Port to KUBELET_PORT

This commit is contained in:
Rita Zhang
2017-12-20 19:13:56 -08:00
parent 4aeb63892e
commit 04db926faa
4 changed files with 33 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ type ACIProvider struct {
memory string
pods string
internalIP string
daemonEndpointPort int32
}
// AuthConfig is the secret returned from an ImageRegistryCredential
@@ -46,7 +47,7 @@ type AuthConfig struct {
}
// NewACIProvider creates a new ACIProvider.
func NewACIProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string) (*ACIProvider, error) {
func NewACIProvider(config string, rm *manager.ResourceManager, nodeName, operatingSystem string, internalIP string, daemonEndpointPort int32) (*ACIProvider, error) {
var p ACIProvider
var err error
@@ -91,6 +92,7 @@ func NewACIProvider(config string, rm *manager.ResourceManager, nodeName, operat
p.operatingSystem = operatingSystem
p.nodeName = nodeName
p.internalIP = internalIP
p.daemonEndpointPort = daemonEndpointPort
return &p, err
}
@@ -335,6 +337,16 @@ func (p *ACIProvider) NodeAddresses() []v1.NodeAddress {
}
}
// NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status
// within Kuberentes.
func (p *ACIProvider) NodeDaemonEndpoints() *v1.NodeDaemonEndpoints {
return &v1.NodeDaemonEndpoints{
KubeletEndpoint: v1.DaemonEndpoint{
Port: p.daemonEndpointPort,
},
}
}
// OperatingSystem returns the operating system that was provided by the config.
func (p *ACIProvider) OperatingSystem() string {
return p.operatingSystem

View File

@@ -235,6 +235,12 @@ func (p *HyperProvider) NodeAddresses() []v1.NodeAddress {
return nil
}
// NodeDaemonEndpoints returns NodeDaemonEndpoints for the node status
// within Kuberentes.
func (p *HyperProvider) NodeDaemonEndpoints() *v1.NodeDaemonEndpoints {
return nil
}
// OperatingSystem returns the operating system for this provider.
// This is a noop to default to Linux for now.
func (p *HyperProvider) OperatingSystem() string {