Commit Graph

297 Commits

Author SHA1 Message Date
Bharath Vedartham 5cc94d76a6 Move channels exec path to /opt/kops/bin 2021-03-06 00:32:21 +05:30
Barry Melbourne 659bfa0daf Update Controller Runtime Go module to v0.8.2 2021-02-25 20:34:12 +00:00
Ciprian Hacman 57f6f362d8 Release binaries for protokube and channels 2021-02-16 09:40:01 +02:00
Ole Markus With 783b6c0d6c Make protokube CP label setting consistent with kops-controller 2021-02-12 08:17:14 +01:00
Jesse Haka 41d04d8d4b add user agent to openstack api requests 2021-02-04 23:04:06 +02:00
Justin SB 8d77f24b96 protokube: Remove unused ExecuteTemplate function
This eliminates some unused code.
2021-01-22 10:37:30 -05:00
Ole Markus With 076ae3dfe4 Remove coredns dnsprovider 2021-01-22 09:19:35 +01:00
Barry Melbourne f2ecb5c153 Upgrade Go v1.15.6 / Bazel v3.4.1 2021-01-10 18:13:12 +00:00
Barry Melbourne 1c96e826d9 Remove copyright YEAR from generated Go files 2021-01-03 12:48:50 +00:00
Kenji Kaneda a61caea8d2 Add Azure support
This commit contains all changes required to support Azure
(https://github.com/kubernetes/kops/issues/3957).
2020-12-21 08:27:54 -08:00
Rodrigo Menezes 01842c3d39 protokube - query host by label when setting master tags 2020-12-11 15:14:55 -08:00
Ciprian Hacman 924ab9effa Update Bazel rules for Go to v0.24.7 2020-11-15 12:32:24 +02:00
John Gardiner Myers 11bebf0b4b Add label to prevent kops-controller from running on old nodes 2020-09-27 21:44:50 -07:00
Peter Rifel dd75c1ed91
make apimachinery crds gomod, update-expected.sh 2020-08-24 10:58:09 -05:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05:00
Kubernetes Prow Robot 96ab8423b1
Merge pull request #9566 from hakman/arm64-images
Add ARM64 support for masters
2020-08-14 20:46:17 -07:00
Kubernetes Prow Robot 46ebae1b4e
Merge pull request #9726 from Evalle/ISSUE-9695
Add missing cli options for kube-controller-manager and kube-scheduler
2020-08-12 01:01:45 -07:00
Evgeny Shmarnev fd9f4e481f Add missing cli options for kube-controller-manager and kube-scheduler 2020-08-12 08:40:59 +02:00
Ciprian Hacman e08cafe62c Fix cert dirs in the etcd manifest for Windows 2020-08-11 14:28:37 +03:00
Ciprian Hacman 2359a25b84 Fix integration tests EOLs for Windows 2020-08-11 14:28:37 +03:00
Ciprian Hacman 172031859d ARM64 support - Build multi-arch images 2020-08-10 13:47:07 +03:00
Ciprian Hacman 5e93722ba5 Fix verify-gofmt 2020-08-05 18:27:03 +03:00
Ciprian Hacman 68595416af Fix verify-boilerplate 2020-08-05 18:27:03 +03:00
Ciprian Hacman 91d97c274c make protobuf 2020-08-05 06:03:23 +03:00
Ciprian Hacman 041e965bdb make gomod 2020-08-05 06:03:23 +03:00
Ciprian Hacman dcd8c15db9 Move Protokube images build scripts to its dir 2020-07-15 19:34:35 +03:00
Ciprian Hacman 3a057aa27c Use distroless image as base for protokube 2020-07-05 14:41:29 +03:00
Justin SB 6cdf9d5001 Don't start kubelet in protokube
Previously as an optimization we would start the kubelet from
protokube, after we had mounted the disks.  This helped avoid e.g. the
apiserver going into backoff waiting for etcd.

However, this no longer achieves anything with etcd-manager - nothing
happens on this front until after we start the kubelet anyway.

Doing this both takes protokube out of the dependency sequence here
(slightly faster boot time), but also removes the systemd dependency
from the protokube image.  (So we can get a smaller image, perhaps
even distroless)
2020-07-05 14:41:29 +03:00
Peter Rifel 199307cf62
staticcheck fixes and updates
Errors being fixed or ignored:

```
Errors from staticcheck:
cmd/kops/create_cluster.go:740:37: possible nil pointer dereference (SA5011)
cmd/kops/create_cluster.go:736:7: this check suggests that the pointer can be nil
cmd/kops/create_cluster.go:828:30: possible nil pointer dereference (SA5011)
cmd/kops/create_cluster.go:825:7: this check suggests that the pointer can be nil
dns-controller/pkg/dns/dnscontroller.go:585:5: this value of existing is never used (SA4006)
nodeup/pkg/model/kubelet_test.go:67:23: possible nil pointer dereference (SA5011)
nodeup/pkg/model/kubelet_test.go:63:5: this check suggests that the pointer can be nil
pkg/apis/kops/validation/legacy.go:138:97: unnecessary use of fmt.Sprintf (S1039)
pkg/apis/kops/validation/legacy.go:150:112: unnecessary use of fmt.Sprintf (S1039)
upup/pkg/fi/nodeup/nodetasks/update_packages.go:48:9: unnecessary use of fmt.Sprintf (S1039)

cmd/kops-controller/controllers/node_controller.go:89:1: comment on exported method Reconcile should be of the form "Reconcile ..." (ST1020)
dnsprovider/pkg/dnsprovider/dns.go:102:1: comment on exported function ResourceRecordSetsEquivalent should be of the form "ResourceRecordSetsEquivalent ..." (ST1020)
dnsprovider/pkg/dnsprovider/plugins.go:65:1: comment on exported function RegisteredDnsProviders should be of the form "RegisteredDnsProviders ..." (ST1020)
dnsprovider/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go:30:1: comment on exported type Route53API should be of the form "Route53API ..." (with optional leading article) (ST1021)
dnsprovider/pkg/dnsprovider/providers/google/clouddns/internal/stubs/clouddns.go:26:2: comment on exported type Project should be of the form "Project ..." (with optional leading article) (ST1021)
dnsprovider/pkg/dnsprovider/tests/commontests.go:28:1: comment on exported function CommonTestResourceRecordSetsReplace should be of the form "CommonTestResourceRecordSetsReplace ..." (ST1020)
dnsprovider/pkg/dnsprovider/tests/commontests.go:52:1: comment on exported function CommonTestResourceRecordSetsReplaceAll should be of the form "CommonTestResourceRecordSetsReplaceAll ..." (ST1020)
dnsprovider/pkg/dnsprovider/tests/commontests.go:78:1: comment on exported function CommonTestResourceRecordSetsDifferentTypes should be of the form "CommonTestResourceRecordSetsDifferentTypes ..." (ST1020)
pkg/apis/kops/instancegroup.go:318:1: comment on exported type LoadBalancer should be of the form "LoadBalancer ..." (with optional leading article) (ST1021)
pkg/apis/kops/v1alpha2/instancegroup.go:23:1: comment on exported type InstanceGroup should be of the form "InstanceGroup ..." (with optional leading article) (ST1021)
pkg/apis/kops/v1alpha2/networking.go:449:1: comment on exported type LyftVPCNetworkingSpec should be of the form "LyftVPCNetworkingSpec ..." (with optional leading article) (ST1021)
pkg/dns/gossip.go:21:1: comment on exported function IsGossipHostname should be of the form "IsGossipHostname ..." (ST1020)
pkg/kubeconfig/kubecfg_builder.go:47:1: comment on exported function NewKubeconfigBuilder should be of the form "NewKubeconfigBuilder ..." (ST1020)
pkg/kubeconfig/kubecfg_builder.go:82:1: comment on exported method BuildRestConfig should be of the form "BuildRestConfig ..." (ST1020)
pkg/kubeconfig/kubecfg_builder.go:102:1: comment on exported method WriteKubecfg should be of the form "WriteKubecfg ..." (ST1020)
pkg/model/alimodel/context.go:52:1: comment on exported method LinkToNatGateway should be of the form "LinkToNatGateway ..." (ST1020)
pkg/model/domodel/context.go:21:1: comment on exported type DOModelContext should be of the form "DOModelContext ..." (with optional leading article) (ST1021)
pkg/model/gcemodel/autoscalinggroup.go:38:1: comment on exported type AutoscalingGroupModelBuilder should be of the form "AutoscalingGroupModelBuilder ..." (with optional leading article) (ST1021)
pkg/nodeidentity/do/identify.go:51:1: comment on exported method Token should be of the form "Token ..." (ST1020)
pkg/resources/aws/aws.go:1560:1: comment on exported function ListELBV2s should be of the form "ListELBV2s ..." (ST1020)
pkg/resources/digitalocean/cloud.go:47:1: comment on exported method Token should be of the form "Token ..." (ST1020)
pkg/resources/spotinst/spotinst.go:84:1: comment on exported function NewInstanceGroup should be of the form "NewInstanceGroup ..." (ST1020)
protokube/pkg/gossip/dns/dns.go:29:1: comment on exported const DefaultZoneName should be of the form "DefaultZoneName ..." (ST1022)
protokube/pkg/gossip/mesh/mesh.pb.go:421:4: this value of iNdEx is never used (SA4006)
protokube/pkg/protokube/openstack_volume.go:53:1: comment on exported type OpenstackVolumes should be of the form "OpenstackVolumes ..." (with optional leading article) (ST1021)
upup/pkg/fi/assetstore.go:132:1: comment on exported method AddForTest should be of the form "AddForTest ..." (ST1020)
upup/pkg/fi/cloudup/alitasks/disk.go:128:1: comment on exported method RenderALI should be of the form "RenderALI ..." (ST1020)
upup/pkg/fi/cloudup/alitasks/eip_natgateway_association.go:34:1: comment on exported type EIP should be of the form "EIP ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/alitasks/loadbalancer.go:169:1: comment on exported method RenderALI should be of the form "RenderALI ..." (ST1020)
upup/pkg/fi/cloudup/alitasks/loadbalancerlistener.go:33:1: comment on exported type LoadBalancerListener should be of the form "LoadBalancerListener ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/alitasks/loadbalancerlistener.go:106:1: comment on exported method RenderALI should be of the form "RenderALI ..." (ST1020)
upup/pkg/fi/cloudup/alitasks/natgateway.go:30:1: comment on exported type NatGateway should be of the form "NatGateway ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/alitasks/securitygroup.go:32:1: comment on exported const SecurityResource should be of the form "SecurityResource ..." (ST1022)
upup/pkg/fi/cloudup/alitasks/sshkey.go:33:1: comment on exported type SSHKey should be of the form "SSHKey ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/alitasks/vpc.go:30:1: comment on exported type VPC should be of the form "VPC ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/alitasks/vswitch.go:31:1: comment on exported type VSwitch should be of the form "VSwitch ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/alitasks/vswitchSNAT.go:31:1: comment on exported type VSwitchSNAT should be of the form "VSwitchSNAT ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/aliup/ali_cloud.go:50:1: comment on exported var KubernetesKopsIdentity should be of the form "KubernetesKopsIdentity ..." (ST1022)
upup/pkg/fi/cloudup/awstasks/dhcp_options.go:33:1: comment on exported type DHCPOptions should be of the form "DHCPOptions ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/dnsname.go:33:1: comment on exported type DNSName should be of the form "DNSName ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/ebsvolume.go:32:1: comment on exported type EBSVolume should be of the form "EBSVolume ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/external_load_balancer_attachment.go:31:1: comment on exported type ExternalLoadBalancerAttachment should be of the form "ExternalLoadBalancerAttachment ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/external_target_group_attachment.go:32:1: comment on exported type ExternalTargetGroupAttachment should be of the form "ExternalTargetGroupAttachment ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/iaminstanceprofile.go:34:1: comment on exported type IAMInstanceProfile should be of the form "IAMInstanceProfile ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/iaminstanceprofilerole.go:32:1: comment on exported type IAMInstanceProfileRole should be of the form "IAMInstanceProfileRole ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/iamoidcprovider.go:32:1: comment on exported type IAMOIDCProvider should be of the form "IAMOIDCProvider ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/iamrole.go:38:1: comment on exported type IAMRole should be of the form "IAMRole ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/iamrolepolicy.go:37:1: comment on exported type IAMRolePolicy should be of the form "IAMRolePolicy ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/internetgateway.go:30:1: comment on exported type InternetGateway should be of the form "InternetGateway ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/launchtemplate_target_cloudformation.go:150:1: comment on exported method CloudformationVersion should be of the form "CloudformationVersion ..." (ST1020)
upup/pkg/fi/cloudup/awstasks/load_balancer.go:39:1: comment on exported type LoadBalancer should be of the form "LoadBalancer ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/load_balancer_attachment.go:32:1: comment on exported type LoadBalancerAttachment should be of the form "LoadBalancerAttachment ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/natgateway.go:32:1: comment on exported type NatGateway should be of the form "NatGateway ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/route.go:31:1: comment on exported type Route should be of the form "Route ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/routetable.go:31:1: comment on exported type RouteTable should be of the form "RouteTable ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/routetableassociation.go:31:1: comment on exported type RouteTableAssociation should be of the form "RouteTableAssociation ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/securitygroup.go:33:1: comment on exported type SecurityGroup should be of the form "SecurityGroup ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/securitygrouprule.go:34:1: comment on exported type SecurityGroupRule should be of the form "SecurityGroupRule ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/sshkey.go:34:1: comment on exported type SSHKey should be of the form "SSHKey ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/subnet.go:32:1: comment on exported type Subnet should be of the form "Subnet ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/vpc.go:33:1: comment on exported type VPC should be of the form "VPC ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/vpc_dhcpoptions_association.go:30:1: comment on exported type VPCDHCPOptionsAssociation should be of the form "VPCDHCPOptionsAssociation ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awstasks/vpccidrblock.go:29:1: comment on exported type VPCCIDRBlock should be of the form "VPCCIDRBlock ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/awsup/aws_cloud.go:58:1: comment on exported const ClientMaxRetries should be of the form "ClientMaxRetries ..." (ST1022)
upup/pkg/fi/cloudup/awsup/status.go:44:1: comment on exported method FindClusterStatus should be of the form "FindClusterStatus ..." (ST1020)
upup/pkg/fi/cloudup/dotasks/droplet.go:32:1: comment on exported type Droplet should be of the form "Droplet ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/dotasks/loadbalancer.go:35:1: comment on exported type LoadBalancer should be of the form "LoadBalancer ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/dotasks/volume.go:32:1: comment on exported type Volume should be of the form "Volume ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/gcetasks/address.go:29:1: comment on exported type Address should be of the form "Address ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/gcetasks/instance.go:33:1: comment on exported type Instance should be of the form "Instance ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/gcetasks/instancegroupmanager.go:29:1: comment on exported type InstanceGroupManager should be of the form "InstanceGroupManager ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/gcetasks/instancetemplate.go:35:1: comment on exported const InstanceTemplateNamePrefixMaxLength should be of the form "InstanceTemplateNamePrefixMaxLength ..." (ST1022)
upup/pkg/fi/cloudup/gcetasks/network.go:30:1: comment on exported type Network should be of the form "Network ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/gcetasks/subnet.go:30:1: comment on exported type Subnet should be of the form "Subnet ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/floatingip.go:32:1: comment on exported type FloatingIP should be of the form "FloatingIP ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/instance.go:32:1: comment on exported type Instance should be of the form "Instance ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/lb.go:34:1: comment on exported type LB should be of the form "LB ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/lblistener.go:30:1: comment on exported type LBListener should be of the form "LBListener ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/lbpool.go:28:1: comment on exported type LBPool should be of the form "LBPool ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/network.go:28:1: comment on exported type Network should be of the form "Network ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/poolassociation.go:30:1: comment on exported type PoolAssociation should be of the form "PoolAssociation ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/port.go:29:1: comment on exported type Port should be of the form "Port ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/router.go:28:1: comment on exported type Router should be of the form "Router ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/routerinterface.go:29:1: comment on exported type RouterInterface should be of the form "RouterInterface ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/securitygroup.go:31:1: comment on exported type SecurityGroup should be of the form "SecurityGroup ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/servergroup.go:30:1: comment on exported type ServerGroup should be of the form "ServerGroup ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/sshkey.go:31:1: comment on exported type SSHKey should be of the form "SSHKey ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/subnet.go:29:1: comment on exported type Subnet should be of the form "Subnet ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/openstacktasks/volume.go:28:1: comment on exported type Volume should be of the form "Volume ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/spotinsttasks/elastigroup.go:42:1: comment on exported type Elastigroup should be of the form "Elastigroup ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/spotinsttasks/launch_spec.go:37:1: comment on exported type LaunchSpec should be of the form "LaunchSpec ..." (with optional leading article) (ST1021)
upup/pkg/fi/cloudup/spotinsttasks/ocean.go:39:1: comment on exported type Ocean should be of the form "Ocean ..." (with optional leading article) (ST1021)
upup/pkg/fi/context.go:249:1: comment on exported function NewExistsAndWarnIfChangesError should be of the form "NewExistsAndWarnIfChangesError ..." (ST1020)
upup/pkg/fi/context.go:256:1: comment on exported method Error should be of the form "Error ..." (ST1020)
upup/pkg/fi/fitasks/keypair.go:31:1: comment on exported type Keypair should be of the form "Keypair ..." (with optional leading article) (ST1021)
upup/pkg/fi/fitasks/keypair.go:55:1: comment on exported method CheckExisting should be of the form "CheckExisting ..." (ST1020)
upup/pkg/fi/fitasks/managedfile.go:29:1: comment on exported type ManagedFile should be of the form "ManagedFile ..." (with optional leading article) (ST1021)
upup/pkg/fi/fitasks/mirrorkeystore.go:25:1: comment on exported type MirrorKeystore should be of the form "MirrorKeystore ..." (with optional leading article) (ST1021)
upup/pkg/fi/fitasks/mirrorsecrets.go:26:1: comment on exported type MirrorSecrets should be of the form "MirrorSecrets ..." (with optional leading article) (ST1021)
upup/pkg/fi/fitasks/secret.go:25:1: comment on exported type Secret should be of the form "Secret ..." (with optional leading article) (ST1021)
upup/pkg/fi/fitasks/secret.go:33:1: comment on exported method CheckExisting should be of the form "CheckExisting ..." (ST1020)
upup/pkg/fi/resources.go:248:1: comment on exported method AsBytes should be of the form "AsBytes ..." (ST1020)
upup/pkg/kutil/import_cluster.go:680:1: comment on exported function GetInstanceUserData should be of the form "GetInstanceUserData ..." (ST1020)
```
2020-06-30 09:07:11 -05:00
Xiaoyu Zhong 98c35cd220 Rename accessKeyId to accessKeyID 2020-06-22 09:32:20 +08:00
John Gardiner Myers 0d74344a43 Remove the baremetal cloud provider 2020-06-14 10:38:29 -07:00
Ole Markus With 7342525872 Remove vsphere from kops files 2020-05-30 13:36:55 +02:00
Ole Markus With 89fba09caa Remove vsphere vendor stuff and related build files 2020-05-30 13:34:39 +02:00
Justin Santa Barbara 7e710e85d9 DNS: Apply should be a no-op when empty
Document the contract a bit more, change the signature by adding a
context arg and following through to make sure we honor the contract
everywhere.
2020-05-17 16:45:08 -04:00
Jesse Haka bdaeb6df36 upgrade to cinder v3 to use api 2020-05-11 08:06:13 +03:00
eric-hole f25b26ff07 Migrates GCE sdk from v0.beta to v1 2020-04-24 10:54:19 -07:00
Justin Santa Barbara 145b71b376 Partially implement MountSensitive
We still don't actually support sensitive options, but it doesn't look
like we need them, MountSensitive is just called with empty
sensitiveOptions in a few places.

Issue #8908
2020-04-19 13:26:53 -04:00
Justin Santa Barbara 3490d9d1a1 Add MountSensitive stub to mounter 2020-04-11 14:44:23 -04:00
Justin Santa Barbara 31bb16d4d1 Add context.Context to most signatures
The client-go signature for most methods adds a context.Context
object, and also makes Options mandatory.  Feed through a
context.Context through many of our methods (but use context.TODO to
stop it getting totally out of hand!)
2020-04-11 14:44:17 -04:00
Justin Santa Barbara 108d1eee5d Replace deprecated x/net/context with context
It's not x-perimental any more!
2020-04-09 23:58:19 -04:00
Peter Rifel a999b3ea61 fix OWNERS labels format
These need to be lists
2020-03-10 22:47:50 -05:00
Peter Rifel 237a125f2c Add labels to OWNERS files
This will automatically label PRs that touch these directories.

This makes it easier to query GitHub for PRs that affect certain areas of the code.

I mostly used existing labels but created some new ones as well.
2020-03-10 08:35:58 -05:00
Justin Santa Barbara 5ebbfc96b9
Replace deprecated method calls to google cloud libraries
Required for static-check to pass.
2020-01-17 06:38:43 -05:00
Austin Moore 4a88f7b5a5
Add ability to specify no ssh key by setting sshKeyName to empty
Add tests for no ssh key functionality

Add docs for setting no ssh key

Disable sshKey rendering for cloudformation if nosshkey is set

Fix broken test

make goimports

Fix

Formatting fix

Update kubernetes version for tests

Update expected test output

Fix imports in mesh.pb.go

Run hack/update-expected.sh

Change digital ocean logic to handle *string for SSHKeyName

Fix expected output

Missed a few
2020-01-15 15:24:32 -05:00
Justin Santa Barbara fc21f4255f Replace kubernetes mount code with utils
This will remove one of the main dependencies on the
kubernetes/kubernetes repo.
2020-01-04 17:34:31 -05:00
Ciprian Hacman defcbe8151 protokube/pkg - fix static check 2019-12-20 20:17:19 +02:00
陈谭军 e197b32b0e
Merge branch 'master' into remove-some-unused-code 2019-11-13 09:50:30 +08:00
Kubernetes Prow Robot e29a04e5af
Merge pull request #7854 from FayerZhang/master
fix golint failures
2019-11-07 11:37:43 -08:00
feifei.zhang@huawei.com 4b49412105 fix golint failures 2019-10-31 20:22:37 +08:00
Srikanth 60329f07db Incorporate review comments 2019-10-30 20:09:45 +05:30
Srikanth 18ec58f28b Incorporate review comments 2019-10-29 12:28:06 +05:30
Srikanth cc80f6f766 Fix gofmt issues 2019-10-29 11:51:24 +05:30
Srikanth d237a4cb04 Code cleanup for PR 2019-10-29 09:45:30 +05:30
Srikanth afe59ba7cc Remove clusterID to be passed as a parameter for protokube 2019-10-29 09:40:38 +05:30
Srikanth dd8554e7e9 Remove unnecessary code 2019-10-29 09:40:38 +05:30
Srikanth c52d4d9dbd More updates to protokube seeding DO cloud provider 2019-10-29 09:40:38 +05:30
Srikanth cb4a8ef6fc Rebase with latest master 2019-10-29 09:40:38 +05:30
Srikanth a4bae774cb Initial changes for DO gossip seed provider 2019-10-29 09:38:48 +05:30
hwdef 3264e3b69d fix static check 2019-10-28 10:24:30 +08:00
Jesse Haka 5e3b94ae17 use existing network and subnet 2019-10-27 08:21:25 +02:00
Kubernetes Prow Robot 7ca9531695
Merge pull request #7759 from beautytiger/dev-191008-clean
replace slice loop with append for simple and clear
2019-10-21 08:11:37 -07:00
tanjunchen fa6d0130c8 remove unused functions and simplify return str 2019-10-15 23:54:10 +08:00
Justin SB b6862103bb
Change default port for memberlist from 3997
We had a port collision on 3997; change the default memberlist ports
to avoid the collision (we haven't shipped a release with this in it).

Also create a go file so that we can use constants to keep track of
our port numbers, rather than magic values.
2019-10-14 07:26:27 -04:00
Kubernetes Prow Robot 211d272f80
Merge pull request #7760 from tanjunchen/fix-up-unnecessary-newline
remove the unnecessary newline and unused vars
2019-10-13 09:18:36 -07:00
Kubernetes Prow Robot 34c7d5a64a
Merge pull request #7755 from tanjunchen/fix-up-static-error
fix-up staticcheck error
2019-10-13 08:20:35 -07:00
Kubernetes Prow Robot 0c66a304c3
Merge pull request #7754 from tanjunchen/fix-up-gosimple-error
fix-up gosimple check error
2019-10-12 11:18:44 -07:00
Thomas Jackson 14a60a53c9 Enable primary=mesh secondary=memberlist by default 2019-10-10 13:21:00 -07:00
Thomas Jackson 85db3dce27 make apimachinery 2019-10-10 13:13:38 -07:00
Thomas Jackson cd8c743d1c make gomod 2019-10-10 13:10:13 -07:00
Thomas Jackson 6acbfe661b Move gossip implementations into a plugin interface 2019-10-10 13:09:22 -07:00
Thomas Jackson 0650848489 Add boilerplate to new files 2019-10-10 13:09:22 -07:00
Thomas Jackson 98352ffe2e remove go-kit log 2019-10-10 13:09:22 -07:00
Thomas Jackson 0685357152 Move to fork 2019-10-10 13:09:22 -07:00
Thomas Jackson 421ee540b9 Add memberlist gossip option 2019-10-10 13:08:55 -07:00
tanjunchen 279c429abd remove the unnecessary newline and unused vars 2019-10-08 22:43:10 +08:00
Guangming Wang c295a49bb1 replace slice loop with append for simple and clear
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-10-08 20:21:09 +08:00
tanjunchen 28fdb358f8 fix-up staticcheck error 2019-10-08 13:53:04 +08:00
tanjunchen 43bf6bdab6 fix-up gosimple check error 2019-10-07 11:59:57 +08:00
Peter Rifel 4c66dd3918 Check for error when describing openstack instances 2019-09-27 12:51:19 -07:00
Kubernetes Prow Robot 942c8915db
Merge pull request #7496 from justinsb/label_controller
kops-controller
2019-09-27 03:43:35 -07:00
Justin SB 728e582360
Fill out kops controller functionality
k8s 1.16 requires that we move label setting away from the kubelet, to
a central controller.  kops-controller is that controller.
2019-09-25 12:04:34 -04:00
Peter Rifel c8d424dd87 Fix some staticcheck warnings 2019-09-25 06:35:25 -07:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Justin SB 8e2dbb6a99
Bootstrap: protokube labels its own node with node-role label
As of k8s 1.16, the node-role label is protected for security reasons.
We will introduce a controller to set those labels generically.
However, we need these labels to run the controller (only) on master
nodes.

To solve this bootstrapping problem, we use protokube to apply the
master role node labels to the master node only.  This isn't a
security problem because we assume that protokube on the master is
highly trusted - we are still administering labels centrally.

Then kops-controller can use this label to target the master nodes,
and run a central label controller.
2019-09-08 20:51:00 -04:00
Justin SB 17186ff7ba
Generated vendor & bazel from `make gomod`
Automatically generated vendor & BUILD.bazel files
2019-08-25 16:00:41 -04:00
Justin SB b1f8f84306
Code changes for 1.15 2019-08-25 16:00:39 -04:00
928234269 09f564da3b
fix typo "specifiction" -> "specification"
Signed-off-by: 928234269 <longfei.shang@daocloud.io>
2019-08-20 17:29:19 +08:00
ethan 0c6b86ac59
protokube/gce_volume.go: error info correction
Signed-off-by: ethan <guangming.wang@daocloud.io>
2019-08-06 22:03:14 +08:00
Kubernetes Prow Robot dd6b0314fc
Merge pull request #6897 from vainu-arto/set-priority-for-static-pods
Set priority for static pods
2019-07-12 00:41:07 -07:00
Thomas Jackson bf8efa89d6 Make an actual deep-copy of the state
Before this patch this was creating a shallow copy, as the KVState was
copied but the underlying map (Records) wasn't.

Related to #7134
2019-07-09 09:40:19 -07:00
Arto Jantunen 238fdaf1c1 Give etcd pods system-cluster-critical priority
Again unlikely to matter since master nodes aren't expected to run out of
capacity, done mostly for completeness (all pods should usually have a
priority defined if the cluster is running with PodPriority enabled).
2019-05-09 16:03:08 +03:00
Justin SB feec6820fe
Avoid concurrent write corruption to /etc/hosts
When we have multiple writers racing to write /etc/hosts, we could
have file corruption where we see a mix of both files.

We can't use a traditional atomic file write, because we are bind-mounting /etc/hosts.

Instead we write to /etc/hosts, pause, then re-read the contents.  If
the contents don't match, we repeat.  This will not result in fair
queuing, but will avoid corruption.
2019-05-07 11:41:36 -04:00
Justin SB 68e975cc74
/etc/hosts (gossip): Stronger logic
* Add a mutex around /etc/hosts updates (for a little extra safety)
* Don't write unchanged files
* Recover from out-of-sequence guard lines
* Add tests

Thanks to granular-ryanbonham for the suggestions & finding the issue!
2019-05-06 22:09:07 -04:00
Justin SB 044395c588
Call klog.InitFlags to enable logging 2019-05-06 13:00:31 -04:00
Justin SB 76d03b3f71
Generated files: glog -> klog 2019-05-06 12:56:03 -04:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
Justin SB 78ebe93f9f
Update kubernetes dependencies to 1.13.5
Notable changes:

* openapi-gen moved to k8s.io/kube-openapi/cmd/openapi-gen
* templates moved to k8s.io/kubernetes/pkg/kubectl/util/templates
2019-05-06 09:58:37 -04:00
xichengliudui 3cd5c71330 Using const() defines constants together (part:3) 2019-04-11 15:19:27 -04:00
Justin Santa Barbara 1965db6605 Deep-copy proto state to prevent concurrent modification
Fix #6635
2019-03-30 02:23:11 -04:00
Kubernetes Prow Robot 269a6f67a5
Merge pull request #6562 from appvia/etcd-backup-tls
If using etcd-backup and TLS is enabled, pass relevant options
2019-03-25 12:22:20 -07:00