Skip to content

Commit

Permalink
Merge pull request #8155 from hakman/staticcheck-nodeup
Browse files Browse the repository at this point in the history
nodeup/pkg/model - fix static check
  • Loading branch information
k8s-ci-robot authored Dec 20, 2019
2 parents 015efe0 + fa66594 commit 4621df3
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 24 deletions.
5 changes: 0 additions & 5 deletions hack/.staticcheck_failures
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ dnsprovider/pkg/dnsprovider/providers/google/clouddns/internal/stubs
dnsprovider/pkg/dnsprovider/providers/openstack/designate
node-authorizer/pkg/authorizers/aws
node-authorizer/pkg/server
nodeup/pkg/model
pkg/apis/kops/v1alpha1
pkg/apis/kops/v1alpha2
pkg/apis/kops/validation
pkg/instancegroups
pkg/model/components
pkg/resources/ali
pkg/resources/aws
pkg/resources/digitalocean
Expand Down
4 changes: 2 additions & 2 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,8 @@ spec:
- use insecure-bind-address and bind-address'
type: string
admissionControl:
description: 'Deprecated: AdmissionControl is a list of admission
controllers to use'
description: 'AdmissionControl is a list of admission controllers
to use: Deprecated - use enable-admission-plugins instead'
items:
type: string
type: array
Expand Down
5 changes: 0 additions & 5 deletions nodeup/pkg/model/convenience.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ func s(v string) *string {
return fi.String(v)
}

// i64 is a helper that builds a *int64 from an int64 value
func i64(v int64) *int64 {
return fi.Int64(v)
}

// b returns a pointer to a boolean
func b(v bool) *bool {
return fi.Bool(v)
Expand Down
7 changes: 0 additions & 7 deletions nodeup/pkg/model/file_assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"encoding/base64"
"fmt"
"path/filepath"
"strings"
"text/template"

"k8s.io/kops/pkg/apis/kops"
"k8s.io/kops/upup/pkg/fi"
Expand All @@ -35,11 +33,6 @@ type FileAssetsBuilder struct {

var _ fi.ModelBuilder = &FileAssetsBuilder{}

var templateFuncs = template.FuncMap{
"split": strings.Split,
"join": strings.Join,
}

// Build is responsible for writing out the file assets from cluster and instanceGroup
func (f *FileAssetsBuilder) Build(c *fi.ModelBuilderContext) error {
// used to keep track of previous file, so a instanceGroup can override a cluster wide one
Expand Down
2 changes: 0 additions & 2 deletions nodeup/pkg/model/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,6 @@ func (b *KubeletBuilder) buildKubeletConfigSpec() (*kops.KubeletConfigSpec, erro
// Enable scheduling since it can be controlled via taints.
// For pre-1.6.0 clusters, this is handled by tainter.go
c.RegisterSchedulable = fi.Bool(true)
} else {
// For 1.5 and earlier, protokube will taint the master
}

if c.VolumePluginDirectory == "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ type KubeAPIServerConfig struct {
EnableBootstrapAuthToken *bool `json:"enableBootstrapTokenAuth,omitempty" flag:"enable-bootstrap-token-auth"`
// EnableAggregatorRouting enables aggregator routing requests to endpoints IP rather than cluster IP
EnableAggregatorRouting *bool `json:"enableAggregatorRouting,omitempty" flag:"enable-aggregator-routing"`
// Deprecated: AdmissionControl is a list of admission controllers to use
// AdmissionControl is a list of admission controllers to use: Deprecated - use enable-admission-plugins instead
AdmissionControl []string `json:"admissionControl,omitempty" flag:"admission-control"`
// AppendAdmissionPlugins appends list of enabled admission plugins
AppendAdmissionPlugins []string `json:"appendAdmissionPlugins,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kops/v1alpha1/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ type KubeAPIServerConfig struct {
EnableBootstrapAuthToken *bool `json:"enableBootstrapTokenAuth,omitempty" flag:"enable-bootstrap-token-auth"`
// EnableAggregatorRouting enables aggregator routing requests to endpoints IP rather than cluster IP
EnableAggregatorRouting *bool `json:"enableAggregatorRouting,omitempty" flag:"enable-aggregator-routing"`
// Deprecated: AdmissionControl is a list of admission controllers to use
// AdmissionControl is a list of admission controllers to use: Deprecated - use enable-admission-plugins instead
AdmissionControl []string `json:"admissionControl,omitempty" flag:"admission-control"`
// AppendAdmissionPlugins appends list of enabled admission plugins
AppendAdmissionPlugins []string `json:"appendAdmissionPlugins,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ type KubeAPIServerConfig struct {
EnableBootstrapAuthToken *bool `json:"enableBootstrapTokenAuth,omitempty" flag:"enable-bootstrap-token-auth"`
// EnableAggregatorRouting enables aggregator routing requests to endpoints IP rather than cluster IP
EnableAggregatorRouting *bool `json:"enableAggregatorRouting,omitempty" flag:"enable-aggregator-routing"`
// Deprecated: AdmissionControl is a list of admission controllers to use
// AdmissionControl is a list of admission controllers to use: Deprecated - use enable-admission-plugins instead
AdmissionControl []string `json:"admissionControl,omitempty" flag:"admission-control"`
// AppendAdmissionPlugins appends list of enabled admission plugins
AppendAdmissionPlugins []string `json:"appendAdmissionPlugins,omitempty"`
Expand Down

0 comments on commit 4621df3

Please sign in to comment.