Skip to content

Commit

Permalink
Merge pull request #7233 from jacksontj/automated-cherry-pick-of-#721…
Browse files Browse the repository at this point in the history
…1-upstream-release-1.13

Automated cherry pick of #7211: Use NodeAuthorizer config options instead of soely
  • Loading branch information
k8s-ci-robot committed Jul 12, 2019
2 parents d5d809b + d7acca2 commit 65d9e82
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nodeup/pkg/model/node_authorizer.go
Expand Up @@ -89,7 +89,13 @@ func (b *NodeAuthorizationBuilder) Build(c *fi.ModelBuilderContext) error {
man.Set("Service", "ExecStartPre", "/bin/bash -c 'while [ ! -f "+clientCert+" ]; do sleep 5; done; sleep 5'")

interval := 10 * time.Second
if na.Interval != nil {
interval = na.Interval.Duration
}
timeout := 5 * time.Minute
if na.Timeout != nil {
timeout = na.Timeout.Duration
}

// @node: using a string array just to make it easier to read
dockerCmd := []string{
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/cluster.go
Expand Up @@ -189,6 +189,8 @@ type NodeAuthorizerSpec struct {
NodeURL string `json:"nodeURL,omitempty"`
// Port is the port the service is running on the master
Port int `json:"port,omitempty"`
// Interval the time between retires for authorization request
Interval *metav1.Duration `json:"interval,omitempty"`
// Timeout the max time for authorization request
Timeout *metav1.Duration `json:"timeout,omitempty"`
// TokenTTL is the max ttl for an issued token
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/cluster.go
Expand Up @@ -188,6 +188,8 @@ type NodeAuthorizerSpec struct {
NodeURL string `json:"nodeURL,omitempty"`
// Port is the port the service is running on the master
Port int `json:"port,omitempty"`
// Interval the time between retires for authorization request
Interval *metav1.Duration `json:"interval,omitempty"`
// Timeout the max time for authorization request
Timeout *metav1.Duration `json:"timeout,omitempty"`
// TokenTTL is the max ttl for an issued token
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/cluster.go
Expand Up @@ -189,6 +189,8 @@ type NodeAuthorizerSpec struct {
NodeURL string `json:"nodeURL,omitempty"`
// Port is the port the service is running on the master
Port int `json:"port,omitempty"`
// Interval the time between retires for authorization request
Interval *metav1.Duration `json:"interval,omitempty"`
// Timeout the max time for authorization request
Timeout *metav1.Duration `json:"timeout,omitempty"`
// TokenTTL is the max ttl for an issued token
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/apis/kops/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 65d9e82

Please sign in to comment.