Commit Graph

544 Commits

Author SHA1 Message Date
Peter Rifel 13675fa061
hack/goimports - Replace mapfile with read
`mapfile` was introduced in bash 4.
We can use `read` instead to achieve the same thing - listing all .go files in the repo into an array
2020-12-11 08:22:54 -06:00
Peter Rifel a8a0b6783f
Replace goimports python scripts with shell scripts, remove unnecessary .packages 2020-12-10 21:50:36 -06:00
Peter Rifel 8bde95df70
Move code-generator to hack go module 2020-12-10 21:47:54 -06:00
Peter Rifel 82e25599f7
Move tools.go into separate go module without vendoring 2020-12-08 23:06:44 -06:00
AdamKorcz 5a1f13d123 Added fuzzer to integrate with OSS-fuzz 2020-12-04 10:53:48 +00:00
Peter Rifel df1e30182f
Fix cloudformation lint job
The dockerfile we were using in the cfn-python-lint repo wasn't actually pinned to the version associated with the git tag, it always installs the latest version.
A recent release consolidated error rules regarding invalid values.
We use an invalid "us-test-1" region and zones in much of our testing.
We used to be able to ignore this "invalid AZ" error, but now we would need to ignore all invalid values for all resource properties.
This pins cfn-python-lint to an older version but we'll have to figure out how we want to handle this longer term.
2020-11-17 20:03:40 -06:00
AkiraFukushima 51aadf1cbc Fix to handle exit code of gazelle command in hack/verify-bazel.sh
When some diff are detected in gazelle, the command exit(1), so verify-bazel.sh exit without any messages
2020-11-07 00:05:38 +09:00
Kubernetes Prow Robot b7f66a6d98
Merge pull request #10109 from bmelbourne/set-minimum-terraform-0.12
Set minimum Terraform version to 0.12.26/0.13.0
2020-10-29 01:52:58 -07:00
Peter Rifel a240507fce
Make verify-cloudformation job fail when issues are found 2020-10-28 21:01:22 -05:00
Barry Melbourne 84417c330b Set minimum Terraform version to 0.12.26/0.13.0 2020-10-28 20:24:41 +00:00
Peter Rifel b3cdca7908
Add verify-cloudformation script
This is an official AWS linter for cloudformation.
It has already caught a few bugs in our cloudformation json generation logic
2020-10-28 10:09:01 -05:00
Peter Rifel 50348742e9
Fix various shellcheck failures 2020-10-26 15:55:13 -05:00
Peter Rifel 1f4e02be6c
Compile hack tools into _output/bin/ rather than temp directories 2020-10-26 15:01:43 -04:00
Peter Rifel b2e06093d8
Make hack/update and hack/verify scripts more consistent 2020-10-26 15:01:43 -04:00
Kubernetes Prow Robot c9aa53895a
Merge pull request #10048 from hakman/container-runtime-assets
Install container runtime packages as assets
2020-10-25 21:03:01 -07:00
Peter Rifel 676c6f5a7f
Add tests/e2e go module support to hack/verify-gomod.sh 2020-10-22 20:57:38 -05:00
Kubernetes Prow Robot 3ba214dbe1
Merge pull request #10031 from rifelpet/kubetest2
Initial kubetest2 structure for e2e testing
2020-10-20 06:56:08 -07:00
Ciprian Hacman b27431d86f Install container runtime packages as assets - Tests 2020-10-14 15:41:51 +03:00
Ciprian Hacman e6e3fc1309 Fix docs feature table not being rendered 2020-10-12 07:37:39 +03:00
Peter Rifel edd3258c0a
Update gitignore and some verify scripts for new e2e code 2020-10-08 19:39:28 -05:00
Ciprian Hacman 0c6f1c733c Use all kops mirrors to determine artifacts hashes 2020-09-18 09:44:37 +03:00
Ciprian Hacman 0eb626fcdd Release 1.19.0-alpha.4 2020-09-16 11:37:38 +03:00
Justin SB 8498ac9dbb Create PublicJWKS feature flag
This should be much easier to start and to get under testing; it only
works with a load balancer, it sets the apiserver into anonymous-auth
allowed, it grants the anonymous auth user permission to read our jwks
tokens.  But it shouldn't need a second bucket or anything of that
nature.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-09-09 09:57:06 -04:00
Justin SB 5f9d3b3431 verify-terraform: rearrange arguments to find
Otherwise we get a warning:

"find: warning: you have specified the global option -maxdepth after the argument -type, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments."
2020-09-07 17:35:57 -04:00
Kubernetes Prow Robot cf0466bded
Merge pull request #9851 from MaXinjian/shellcheck
fix "unbound variable" issue
2020-09-02 00:05:06 -07:00
Ma Xinjian 1bda78be78 fix "unbound variable" issue
IGNORE is an empty array, it throws error when make verify-staticcheck
$ make verify-staticcheck
hack/verify-staticcheck.sh
hack/verify-staticcheck.sh: line 50: IGNORE[*]: unbound variable
make: *** [verify-staticcheck] Error 1

Signed-off-by: Ma Xinjian <maxj.fnst@cn.fujitsu.com>
2020-09-01 16:33:50 +08:00
Kubernetes Prow Robot e0da9c0b36
Merge pull request #9849 from MaXinjian/shellcheck
Keep SHELLCHECK_IMAGE vesion sync with SHELLCHECK_VERSION defined before
2020-08-31 20:45:50 -07:00
Ma Xinjian dc852fbb73 Keep SHELLCHECK_IMAGE vesion sync with SHELLCHECK_VERSION defined before
Signed-off-by: Ma Xinjian <maxj.fnst@cn.fujitsu.com>
2020-09-01 09:55:13 +08:00
Justin SB 0cda0f5068 Support authentication helper for kubectl
We create a simple exec plugin command which can create and renew
short-lived admin credentials on the fly, essentially leveraging the
security of the underlying cloud credentials.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-08-30 15:16:20 -04:00
Justin Santa Barbara f32fcc35fa Addons: Support arbitrary additional objects
We will be managing cluster addons using CRDs, and so we want to be
able to apply arbitrary objects as part of cluster bringup.

Start by allowing (behind a feature-flag) for arbitrary objects to be
specified.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-08-28 09:03:41 -04:00
Ciprian Hacman a4ff90205a Pull images from k8s.gcr.io/kops instead of docker.io/kope 2020-08-25 08:04:36 +03:00
Ciprian Hacman 92a3676e51 Ignore untracked files in "git status" 2020-08-24 05:30:30 +03:00
Ciprian Hacman c52a21f9ba Update shellcheck to v0.7.1 2020-08-23 12:07:44 +03:00
Kubernetes Prow Robot 10405bc4d3
Merge pull request #9792 from olemarkus/openstack-newer-nova-2
Don't use nova for glance mocks
2020-08-21 10:19:40 -07:00
Ole Markus With 29682700c7 Don't use nova for glance mocks
Fetching images through nova is deprecated and removed in newer versions
of the compute API. Mocks now reflect this behavior.
2020-08-21 10:18:52 +02:00
Peter Rifel 5052ae866a
Unset more env vars in update-expected.sh
this prevents spurious changes from being made based on the shell's env vars.

Also adding a parameter to override the package being updated, so that we dont need to test the full repo
2020-08-20 10:17:36 -05:00
Ciprian Hacman e68ee80a93 Move and rename the "distros" package 2020-08-17 07:25:43 +03:00
Kubernetes Prow Robot 713c3b20ae
Merge pull request #9653 from johngmyers/kops-controller-server
Bootstrap worker nodes using kops-controller
2020-08-16 18:00:17 -07:00
Justin SB 2b8fcd816c Clear KOPS_FEATURE_FLAGS in update-expected.sh
This ensures update-expected still works even when KOPS_FEATURE_FLAGS
is set.
2020-08-15 21:06:57 -04:00
John Gardiner Myers 00c60ddff6 Add server code to kops-controller 2020-08-15 09:46:30 -07:00
Kubernetes Prow Robot 69954dc124
Merge pull request #9737 from hakman/remove-tags
Remove unused Tags and FSRoot from NodeUp
2020-08-13 00:40:13 -07:00
Peter Rifel bd771c6b6c
Update verify-terraform to use 0.13.0 2020-08-12 22:19:17 -05:00
Ciprian Hacman ec8bb515c9 Update packages 2020-08-12 18:35:26 +03:00
Ciprian Hacman ecc30f7b47 Fix update and verify goimports 2020-08-12 16:24:17 +03:00
Kubernetes Prow Robot ea2d0da1cc
Merge pull request #8577 from justinsb/dump
Capture logs from a kops cluster
2020-08-09 17:18:19 -07:00
Ciprian Hacman f772c552e7 Remove outdated docs for Calico 2020-08-08 11:08:26 +03:00
Kubernetes Prow Robot b6f4307231
Merge pull request #9672 from srikiz/DO-upload-to-spaces
[Digital Ocean] Upload binaries to DO Spaces
2020-08-06 14:05:51 -07:00
Srikanth 42b1daf5a6 Upload binaries to DO Spaces 2020-08-07 00:09:30 +05:30
Peter Rifel 23dc8383da
Add an initial structure for openstack cloudmock
More info in the docs changes. This adds stubbed http handlers for every resource type used by Kops.
2020-08-05 23:13:34 -05:00
John Gardiner Myers 9596ed8f37 Reimplement fitask generator using gengo 2020-07-28 11:48:08 -07:00
John Gardiner Myers b23f0ebb26 Remove dead code 2020-07-28 11:48:08 -07:00
John Gardiner Myers 665bc6da89 Update instructions for fixing verify-gomod.sh 2020-07-27 09:18:24 -07:00
Peter Rifel 1faeb36d37
Address feedback and test failures 2020-07-22 22:19:00 -05:00
Peter Rifel 5475875cec
Make feature tables that dont have a FF version more intuitive
Originally `kops_feature_table(kops_added_default='1.17')` would generate a single column with a header of Default which isnt very intuitive. This replaces the header with Introduced which I think is more intuitive
2020-07-19 18:01:18 -05:00
Kubernetes Prow Robot 26aa33552a
Merge pull request #9576 from hakman/cleanup-images
Remove unused and unmaintained Docker build targets
2020-07-17 13:28:50 -07:00
Kubernetes Prow Robot 9d675e3f5c
Merge pull request #9555 from MoShitrit/issue-9151
Adding feature stability table to docs and including one example for encryption support in cilium
2020-07-16 09:57:41 -07:00
Ciprian Hacman b9623304ff Remove unused and unmaintained Docker build targets 2020-07-15 19:34:35 +03:00
Peter Rifel 6cefa29adf
Update goimports script for go 1.14
Without this change, go 1.14 reports this error:

```
cannot find module providing package golang.org/x/tools/cmd/goimports: working directory is not part of a module
```

Ideally this wouldn't rely on kops being in the GOPATH but that may require updating goimports. This can happen in a followup PR
2020-07-14 15:53:55 -05:00
MoShitrit de5efe6779 Changing table width to 'fit-content' for kops_feature_table 2020-07-14 11:25:10 -04:00
Peter Rifel 0b555f48d4
Upgrade to go 1.14.4 2020-07-14 09:24:48 -05:00
John Gardiner Myers 7ee0471518 Add support for uploading to private buckets 2020-07-13 23:00:20 -07:00
MoShitrit 0c3296d2fb Moving mkdocs_macros package into hack directory 2020-07-13 23:44:01 -04:00
Justin SB aeb690e2cf Don't try to delete terraform providers
Because we are running it in docker, I was hitting permission issues
during the cleanup step of verify-terraform.
2020-07-13 12:04:08 -04:00
MoShitrit af2933b3a7 Adding py to formats 2020-07-12 19:39:35 -04: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
John Gardiner Myers 541f7b5b37 Remove kube-discovery 2020-06-23 21:34:12 -07:00
Kubernetes Prow Robot d5e1bab8b1
Merge pull request #9396 from rifelpet/modvendor
Use -mod=vendor for most go commands
2020-06-18 20:35:58 -07:00
Peter Rifel 2504ad19f2
Dont use -mod=vendor with go install k8s.io/code-generator
though it would probably be best to vendor this?
2020-06-18 21:13:15 -05:00
Peter Rifel 5ad7eac3ae
Cache terraform's providers between tests
The provider binaries are in the hundreds of MBs and by defaulta are redownloaded into each integration tests' directory, this is a waste of bandwidth, time, and space.

TF supports specifying a provider cache directory [0] which will avoid redownloading them and storing them in multiple places, which should speed up the job time by a bit.

I was having trouble getting it to work with TF 0.12 so I bumped us up to the latest 0.13 beta (stable is scheduled for ~1 month from now)

[0] https://www.terraform.io/docs/configuration/providers.html#provider-plugin-cache
2020-06-18 11:55:52 -05:00
Peter Rifel a1111002a3
Run "go mod vendor" in verify-gomod
This will actually catch vendoring issues
2020-06-17 21:39:08 -05:00
Peter Rifel 5499402227
dont allocate tty in `docker run`, fixes prow jobs 2020-06-16 21:30:53 -05:00
John Gardiner Myers e96c61edf9 Remove bundler as baremetal support was removed 2020-06-16 08:26:19 -07:00
John Gardiner Myers 0d74344a43 Remove the baremetal cloud provider 2020-06-14 10:38:29 -07:00
Peter Rifel 01b0fc544c
Remove hack/machine_types script 2020-06-09 10:12:58 -05:00
Kubernetes Prow Robot 9e4bf1699a
Merge pull request #9216 from hakman/prepare-multi-arch
Prepare Kops for multi-architecture support
2020-06-04 21:35:43 -07:00
Ole Markus With b62f6aa894 Move networking in nodeup to dedicated subpackage 2020-06-04 17:32:41 +02:00
Ciprian Hacman 654a0d2d8a Detect supported architecture during node setup 2020-06-03 17:23:59 +03:00
Kubernetes Prow Robot 7b067983df
Merge pull request #9177 from olemarkus/remove-vsphere
Remove vsphere cloud provider
2020-06-01 06:19:54 -07:00
Ciprian Hacman d41fd1ea07 Add packages hashes verification for containerd and Docker 2020-06-01 08:27:18 +03:00
Justin SB 68b826328d Update set-version script to bump tag in Makefile
I had forgotten to automatically bump the
KUBE_APISERVER_HEALTHCHECK_TAG in the Makefile.

Also add pushing the image to the release procedure.
2020-05-31 12:45:36 -04: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
John Gardiner Myers 8a6d29cd40 Remove support for reading legacy-format keypairs 2020-05-20 13:28:13 -07:00
John Gardiner Myers e0c32a3fae Remove dead code 2020-05-09 22:39:19 -07:00
Justin SB 75fd939a62
kube-apiserver: healthcheck via sidecar container
kube-apiserver doesn't expose the healthcheck via a dedicated
endpoint, instead relying on anonyomous-access being enabled.  That
has previously forced us to enable the unauthenticated endpoint on
127.0.0.1:8080.

Instead we now run a small sidecar container, which
proxies /healthz and /readyz requests (only) adding appropriate
authentication using a client certificate.

This will also enable better load balancer checks in future, as these
have previously been hampered by the custom CA certificate.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-05-07 08:06:52 -04:00
John Gardiner Myers 935d757a7c Use KOPS_RSA_PRIVATE_KEY_SIZE for more keys 2020-04-26 20:17:02 -07:00
Peter Rifel 2f098b3ac3 Make verify-terraform script blocking now that it passes 2020-04-08 22:16:57 -05:00
Rodrigo Menezes 95a391c56a add verify-bindata.sh & separate bindata check and update make commands. 2020-04-08 15:50:51 -07:00
Kubernetes Prow Robot ef10d5444e
Merge pull request #8825 from rifelpet/hcl2-native
Add Terraform 0.12 support
2020-04-07 09:01:44 -07:00
Kubernetes Prow Robot a06cebc915
Merge pull request #8847 from rifelpet/machine-types
Switch to using ec2.DescribeInstanceTypes for building the MachineTypes list
2020-04-06 06:43:46 -07:00
Peter Rifel 4e6e00bec1 Add Terraform 0.12 rendering support and feature flag 2020-04-05 21:18:03 -05:00
Peter Rifel 1b29afb45d Switch to using ec2.DescribeInstanceTypes for building the MachineType list 2020-04-05 21:16:49 -05:00
John Gardiner Myers 6844eef4ca Switch to the k/k implementation of drain.Helper 2020-04-05 10:22:49 -07:00
Peter Rifel 4d24c4d1e6 Remove unused ECU and Burstable fields from AWSMachineTypeInfo
I tracked these fields back to a 2016 commit that added the entire struct but they still werent used even back then.
2020-04-03 22:19:05 -05:00
Peter Rifel a0e1672cdc add terraform testing 2020-03-31 14:50:45 -05:00
John Gardiner Myers b645dac752 Remove support for v1alpha1 and before 2020-03-24 19:49:15 -07:00
Ciprian Hacman 55aeafb9c3 Fix node-authorizer/pkg/server staticcheck failure 2020-02-28 09:38:42 +02:00
Justin SB 666f5dfde7
Update release process
* We need to publish kops-controller image
* Including experimental hack/set-version script that should help with rolling versions
2020-02-27 09:34:26 -05:00
Matt Ouille f025ff0e70
Add External Policies (AWS managed policy attachments) 2020-02-16 21:54:12 -08:00
Kubernetes Prow Robot c5d8b142bc
Merge pull request #8575 from johngmyers/utc
Use UTC when calculating copyright year
2020-02-16 16:23:28 -08:00
John Gardiner Myers 78e9f5abe0 Use UTC when calculating copyright year 2020-02-16 11:27:26 -08:00
Peter Rifel 49d31b8366 Import common.sh and use KOPS_ROOT when applicable 2020-02-15 20:04:12 -06:00
Peter Rifel c187cefec2 Move utility functions into common.sh 2020-02-15 20:03:26 -06:00
Peter Rifel b1638fc259 Remove unused scripts
We have long since migrated from Godeps to go mod, and we dont have a gh-pages branch anymore since we use netlify for the docs site.
2020-02-15 20:01:10 -06:00
Justin SB 0cb35638f2
Stop logging to /var/log/kops-controller.log
Writing to a hostPath from a non-root container requires file
ownership changes, which is difficult to roll out today.  See
discussion in #8454

We were primarily using the logfile for e2e diagnostics, so we're
going to look into collecting the information via other means instead.

We also haven't yet shipped this logfile in a released version (though
we have shipped it in beta releases)
2020-02-04 06:41:25 -05:00
Kim Bao Long 3c094cb471 Fix typo in comment
Signed-off-by: Kim Bao Long <longkb@vn.fujitsu.com>
2020-01-31 07:54:37 +07:00
Roberto Rodriguez Alcala b9945594fd Updates based on feedback 2020-01-23 20:31:18 -08:00
Kubernetes Prow Robot 0e1f5ba2aa
Merge pull request #8328 from rifelpet/shellcheck
Add shellcheck verification
2020-01-17 04:46:55 -08:00
tanjunchen 15b4643aee upup/pkg/fi/cloudup/awstasks/ staticcheck 2020-01-14 10:02:16 +08:00
Peter Rifel f6c647230a Add shellcheck verification
Copied from the k/k repo with some of the utility functions inlined, just like verify-staticcheck.sh.
Once merged I'll add another prow job for it.
2020-01-12 18:47:21 -06:00
Kubernetes Prow Robot 179957d09f
Merge pull request #7824 from rifelpet/kops-server-cleanup
Remove traces of kops-server
2020-01-11 23:13:36 -08:00
Justin SB cf5c53c87d
Add tests for manifest normalization
(The tests are split out for easier cherry-picking, should we choose to)
2020-01-11 22:41:18 -05:00
Kubernetes Prow Robot 556175910b
Merge pull request #8193 from Aresforchina/fix-staticheckout-pkg-resource02
upup/pkg/fi-fix staticcheck
2020-01-11 12:15:36 -08:00
Aresforchina f312f7c974 upup/pkg/fi-fix staticcheck 2020-01-07 15:50:30 +08: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
Kubernetes Prow Robot 388a3cb23d
Merge pull request #8232 from hakman/staticcheck-simplify
Add code simplifications for staticheck
2019-12-30 10:53:39 -08:00
Ciprian Hacman 4c4400c5f3 Add code simplifications for staticheck 2019-12-30 17:40:24 +02:00
Kubernetes Prow Robot e34c12a8f7
Merge pull request #8223 from johngmyers/openstack-staticcheck
Fix pkg/resources/openstack staticcheck failure
2019-12-29 21:21:39 -08:00
John Gardiner Myers 4ef035faa2 Fix pkg/resources/openstack staticcheck failure 2019-12-29 15:57:14 -08:00
John Gardiner Myers 00abe3af7e Fix node-authorizer/pkg/authorizers/aws staticcheck failure 2019-12-29 15:54:50 -08:00
John Gardiner Myers e4082aaf4c Fix cloudmock/aws/mockelbv2 staticcheck failures 2019-12-28 21:25:29 -08:00
Kubernetes Prow Robot e7ad6a9601
Merge pull request #8143 from tanjunchen/fix-shell-sh001
/hack: improve shell script  in hack
2019-12-27 18:41:39 -08:00
Kubernetes Prow Robot c1f5c7acd6
Merge pull request #8202 from johngmyers/kops-staticcheck
Fix cmd/kops staticcheck failures
2019-12-27 09:30:31 -08:00
Kubernetes Prow Robot 0377b58a08
Merge pull request #8203 from johngmyers/codegen-staticcheck
Fix upup/tools/generators/pkg/codegen staticcheck failures
2019-12-27 08:45:39 -08:00
Peter Rifel 32d1d6cf65 Remove traces of kops-server 2019-12-26 13:20:32 -06:00
ares 1e6675f9e9
Merge branch 'master' into fix-staticcheck-pkg-resources-digitalocean 2019-12-26 13:05:01 +08:00
John Gardiner Myers 3f35e26c9b Fix upup/tools/generators/pkg/codegen staticcheck failures 2019-12-25 16:15:40 -08:00
John Gardiner Myers d127b9b1a1 Fix cmd/kops staticcheck failures 2019-12-25 14:59:27 -08:00
Kubernetes Prow Robot 22ddc3b423
Merge pull request #8191 from Aresforchina/fix-staticcheck-pkg-resources01
fix staticcheck failures in pkg/resources
2019-12-25 12:03:38 -08:00
tanjunchen cc0f7022f0 /hack: improve shell script in hack 2019-12-25 17:16:31 +08:00
Kubernetes Prow Robot 5cb2d3605c
Merge pull request #8149 from hakman/staticcheck-dnsprovider
dnsprovider/pkg/dnsprovider - fix static check
2019-12-24 06:55:29 -08:00
Aresforchina 8ebcea0024 fix staticcheck failures in pkg/resources 2019-12-24 17:12:53 +08:00
Kubernetes Prow Robot dffc8975d6 pkg/resources/aws:simplify code and remove code 2019-12-24 10:56:57 +08:00
Kubernetes Prow Robot 61d556f9e9
Merge pull request #8188 from Aresforchina/fix-pkg-resources-aws
pkg/resources/aws:simplify code and remove code
2019-12-23 16:19:29 -08:00
Kubernetes Prow Robot 6fd4762290
Merge pull request #8186 from johngmyers/instancegroup-staticcheck
pkg/instancegroups - fix static check
2019-12-23 15:25:29 -08:00
Peter Rifel c6dbe9d686 Remove make command from verify-staticcheck.sh
This script should now be called using `make verify-staticcheck` which will handle the go-bindata dependency.
2019-12-23 09:25:42 -06:00
Aresforchina 8f86a1b201 pkg/resources-aws:simplify code and remove code 2019-12-23 19:00:17 +08:00
Kubernetes Prow Robot 5f588f0a50
Merge pull request #8165 from hakman/staticcheck-protokube
protokube/pkg - fix static check
2019-12-23 02:49:32 -08:00
John Gardiner Myers 1d3d5c1d2f pkg/instancegroups - fix static check 2019-12-22 20:56:27 -08:00
Ciprian Hacman deadeaed1e dnsprovider/pkg/dnsprovider - fix static check 2019-12-23 06:23:38 +02:00
Peter Rifel e7e9e62bcc Remove packages from staticcheck failure list that are no longer failing 2019-12-22 15:12:15 -06:00
Peter Rifel ef8f07c451 Fix verify-staticcheck prow job
The new job was missing the generated files from go-bindata.

I noticed some of the prow jobs use make and others call hack/ scripts directly.

I think it'd be better to use make so we can more easily add dependencies like this, therefor I'd like to propose that we merge this, update the jobs to call make targets, then remove the make command I added to hack/verify-staticcheck.sh

By fixing the existing job as well as the make target, we can unblock other PRs and not get another swarm of failure notifications when the job gets updated to use make.
2019-12-22 15:03:29 -06:00
Ciprian Hacman defcbe8151 protokube/pkg - fix static check 2019-12-20 20:17:19 +02:00
Kubernetes Prow Robot 6856358cd0
Merge pull request #8118 from tanjunchen/fix-staticcheck-001
upup/pkg/fi/ upup/pkg/kutil : simplify code and remove code
2019-12-20 07:41:33 -08:00
Ciprian Hacman fa665943ac nodeup/pkg/model - fix static check 2019-12-18 22:07:31 +02:00
tanjunchen d5fef40863 upup/pkg/fi/cloudup/ upup/pkg/fi/nodeup/ hack/.staticcheck_failures : simplify code and remove code 2019-12-18 09:47:58 +08:00
Kubernetes Prow Robot 252a733415
Merge pull request #8121 from tanjunchen/fix-staiccheck-003
util/pkg/ upup/tools/ :  simplify code and remove unused  code
2019-12-17 11:23:57 -08:00
Kubernetes Prow Robot 40c2762367
Merge pull request #8128 from mikesplain/add_inf1
Add inf1 isntances
2019-12-17 08:13:59 -08:00
tanjunchen e4302e3630 util/pkg/: simplify code and remove unused code 2019-12-17 09:44:18 +08:00
tanjunchen 52537053cc simplify code and remove unused code 2019-12-17 00:28:35 +08:00