mirror of https://github.com/kubernetes/kops.git
Fixed the formatting and added copyright headers to new files
This commit is contained in:
parent
333e1aee40
commit
3ed60bd708
|
@ -48,6 +48,7 @@ k8s.io/kops/pkg/model/gcemodel
|
|||
k8s.io/kops/pkg/model/iam
|
||||
k8s.io/kops/pkg/model/resources
|
||||
k8s.io/kops/pkg/resources
|
||||
k8s.io/kops/pkg/model/vspheremodel
|
||||
k8s.io/kops/pkg/systemd
|
||||
k8s.io/kops/pkg/util/stringorslice
|
||||
k8s.io/kops/pkg/validation
|
||||
|
@ -67,6 +68,8 @@ k8s.io/kops/upup/pkg/fi/cloudup/dnstasks
|
|||
k8s.io/kops/upup/pkg/fi/cloudup/gce
|
||||
k8s.io/kops/upup/pkg/fi/cloudup/gcetasks
|
||||
k8s.io/kops/upup/pkg/fi/cloudup/terraform
|
||||
k8s.io/kops/upup/pkg/fi/cloudup/vsphere
|
||||
k8s.io/kops/upup/pkg/fi/cloudup/vspheretasks
|
||||
k8s.io/kops/upup/pkg/fi/fitasks
|
||||
k8s.io/kops/upup/pkg/fi/k8sapi
|
||||
k8s.io/kops/upup/pkg/fi/loader
|
||||
|
|
|
@ -17,11 +17,11 @@ limitations under the License.
|
|||
package components
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/apis/kops"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/loader"
|
||||
"strings"
|
||||
"github.com/golang/glog"
|
||||
)
|
||||
|
||||
// KubeletOptionsBuilder adds options for kubelets
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vspheremodel
|
||||
|
||||
import (
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/pkg/model"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/pkg/model"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vspheretasks"
|
||||
)
|
||||
|
||||
|
@ -21,7 +37,7 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
for _, ig := range b.InstanceGroups {
|
||||
name := b.AutoscalingGroupName(ig)
|
||||
createVmTask := &vspheretasks.VirtualMachine{
|
||||
Name: &name,
|
||||
Name: &name,
|
||||
VMTemplateName: fi.String("dummyVmTemplate"),
|
||||
}
|
||||
c.AddTask(createVmTask)
|
||||
|
@ -29,13 +45,13 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.ModelBuilderContext) error {
|
|||
attachISOTaskName := "AttachISO-" + name
|
||||
attachISOTask := &vspheretasks.AttachISO{
|
||||
Name: &attachISOTaskName,
|
||||
VM: createVmTask,
|
||||
VM: createVmTask,
|
||||
}
|
||||
c.AddTask(attachISOTask)
|
||||
|
||||
powerOnTaskName := "PowerON-" + name
|
||||
powerOnTask := &vspheretasks.VMPowerOn{
|
||||
Name: &powerOnTaskName,
|
||||
Name: &powerOnTaskName,
|
||||
AttachISO: attachISOTask,
|
||||
}
|
||||
c.AddTask(powerOnTask)
|
||||
|
|
|
@ -1,7 +1,23 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vspheremodel
|
||||
|
||||
import "k8s.io/kops/pkg/model"
|
||||
|
||||
type VSphereModelContext struct {
|
||||
*model.KopsModelContext
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,24 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vspheremodel
|
||||
|
||||
import (
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"fmt"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
)
|
||||
|
||||
// Do we need this model builder?
|
||||
|
|
|
@ -31,16 +31,16 @@ import (
|
|||
|
||||
// Default Machine types for various types of instance group machine
|
||||
const (
|
||||
defaultNodeMachineTypeAWS = "t2.medium"
|
||||
defaultNodeMachineTypeGCE = "n1-standard-2"
|
||||
defaultNodeMachineTypeAWS = "t2.medium"
|
||||
defaultNodeMachineTypeGCE = "n1-standard-2"
|
||||
defaultNodeMachineTypeVSphere = "vsphere_node"
|
||||
|
||||
defaultBastionMachineTypeAWS = "t2.micro"
|
||||
defaultBastionMachineTypeGCE = "f1-micro"
|
||||
defaultBastionMachineTypeAWS = "t2.micro"
|
||||
defaultBastionMachineTypeGCE = "f1-micro"
|
||||
defaultBastionMachineTypeVSphere = "vsphere_bastion"
|
||||
|
||||
defaultMasterMachineTypeGCE = "n1-standard-1"
|
||||
defaultMasterMachineTypeAWS = "m3.medium"
|
||||
defaultMasterMachineTypeGCE = "n1-standard-1"
|
||||
defaultMasterMachineTypeAWS = "m3.medium"
|
||||
defaultMasterMachineTypeVSphere = "vsphere_master"
|
||||
)
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ import (
|
|||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/awsup"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/gce"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vsphere"
|
||||
"k8s.io/kubernetes/federation/pkg/dnsprovider"
|
||||
"strings"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vsphere"
|
||||
)
|
||||
|
||||
func BuildCloud(cluster *api.Cluster) (fi.Cloud, error) {
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vsphere
|
||||
|
||||
import "k8s.io/kops/upup/pkg/fi"
|
||||
|
|
|
@ -1,17 +1,33 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vsphere
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kubernetes/federation/pkg/dnsprovider"
|
||||
"github.com/golang/glog"
|
||||
k8sroute53 "k8s.io/kubernetes/federation/pkg/dnsprovider/providers/aws/route53"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type VSphereCloud struct {
|
||||
// dummy field
|
||||
name string
|
||||
Region string
|
||||
name string
|
||||
Region string
|
||||
}
|
||||
|
||||
var _ fi.Cloud = &VSphereCloud{}
|
||||
|
|
|
@ -1,16 +1,32 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vspheretasks
|
||||
|
||||
import (
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vsphere"
|
||||
)
|
||||
|
||||
// AttachISO represents the cloud-init ISO file attached to a VMware VM
|
||||
//go:generate fitask -type=AttachISO
|
||||
type AttachISO struct {
|
||||
Name *string
|
||||
VM *VirtualMachine
|
||||
Name *string
|
||||
VM *VirtualMachine
|
||||
}
|
||||
|
||||
var _ fi.HasName = &AttachISO{}
|
||||
|
@ -44,4 +60,3 @@ func (_ *AttachISO) RenderVC(t *vsphere.VSphereAPITarget, a, e, changes *AttachI
|
|||
glog.Info("AttachISO.RenderVC invoked!")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,31 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vspheretasks
|
||||
|
||||
import (
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vsphere"
|
||||
)
|
||||
|
||||
// VirtualMachine represents a VMware VM
|
||||
//go:generate fitask -type=VirtualMachine
|
||||
type VirtualMachine struct {
|
||||
Name *string
|
||||
Name *string
|
||||
VMTemplateName *string
|
||||
}
|
||||
|
||||
|
@ -55,5 +71,3 @@ func (_ *VirtualMachine) RenderVSphere(t *vsphere.VSphereAPITarget, a, e, change
|
|||
glog.Info("VirtualMachine.RenderVSphere invoked!")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,31 @@
|
|||
/*
|
||||
Copyright 2017 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package vspheretasks
|
||||
|
||||
import (
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/kops/upup/pkg/fi"
|
||||
"k8s.io/kops/upup/pkg/fi/cloudup/vsphere"
|
||||
)
|
||||
|
||||
// VMPowerOn powers on a VMware VM
|
||||
//go:generate fitask -type=VMPowerOn
|
||||
type VMPowerOn struct {
|
||||
Name *string
|
||||
Name *string
|
||||
AttachISO *AttachISO
|
||||
}
|
||||
|
||||
|
@ -44,4 +60,3 @@ func (_ *VMPowerOn) RenderVC(t *vsphere.VSphereAPITarget, a, e, changes *VMPower
|
|||
glog.Info("VMPowerOn.RenderVC invoked!")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue