Commit Graph

36 Commits

Author SHA1 Message Date
Ole Markus With ce2e877aeb Remove bazel files from vendor 2022-04-12 13:29:03 +02:00
Ole Markus With 39defc4d91 Remove all bazel targets from Makefile
Fix comment

Remove bazel artifacts

Remove bazel hacks

Fix kubetest compat copy
2022-04-12 13:28:58 +02:00
justinsb 05ae9aa5b4 Use .bazel-bin to help gopls & VSCode
This means that gopls will ignore the bazel-* symlinks, in particular
when using the go LSP plugin (gopls) with VSCode.

Idea from https://bitworking.org/news/2021/06/bazel-and-gopls/
2021-10-26 08:04:06 -04:00
Justin SB eb2943671f Use the get_workspace_status script to get the versions
This avoids duplication of logic / different logic - and the logic in
the Makefile was indeed different, which was causing us to overwrite
the staging alpha images.
2020-08-28 08:34:42 -04:00
Justin SB be905b9af2 Allow CI builds to build a tagged version
This is working towards "hands off" release builds, where we just tag
the release.  When CI=1 and the git sha we are building _exactly_
matches a tag, we build that version.  We enforce that version.go must
have previously been updated to match the tag.

We also refactor out the duplicated code into a shared script (tools/get_version.sh)
2020-07-04 16:59:53 -04:00
John Gardiner Myers e313f384ba Remove more sha1-generation code 2020-06-21 23:16:33 -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
Ole Markus With 62ac54aab5 Don't force bazel to use python2 2020-04-27 14:37:54 +02:00
Justin SB 2586d6da45 gzip: use --no-name to avoid saving timestamp
Another source of non-reproducible builds!
2020-02-14 22:27:07 -05:00
Peter Rifel d777347705 Remove .git dependency from get_workspace_status.sh
The image pushing postsubmit job [0] is one step closer to succeeding.

It currently fails because when the builder image uploads the kops directory to GCS for to be consumed by GCB, it excludes the .git directory [1].

This causes the job to fail because `make kops-controller-push` uses bazel which runs get_workspace_status.sh which aborts if the git commands fail.

The prow job doesnt contain much output but the GCB logs can be seen in GCS [2].

This PR removes the dependency on git commands.
I dont think any of the logic in the script will change because we already set VERSION [3] which is the only variable in get_workspace_status.sh that depends on git commands and is used to build and push the kops controller image.
[0] https://testgrid.k8s.io/sig-cluster-lifecycle-kops#kops-postsubmit-push-to-staging
[1] 18391d8986/images/builder/main.go (L87)
[2] gs://k8s-staging-kops-gcb/logs/log-a7dc3a24-97cd-42fe-bec3-971dc78a0e3a.txt
[3] b1276ac835/cloudbuild.yaml (L10)
2020-02-07 18:35:26 -06:00
mikesplain ef21fb0d91
Fix gz path to work on macos 2020-01-03 15:25:21 -05:00
mikesplain 202b9cfe21
Replace binary "which" with build in "command" 2020-01-03 15:23:07 -05:00
Erick Fejta 8dcb19e6b2 Add optional RBE support for kops 2019-10-07 14:54:38 -07:00
Justin SB 958c1a0771
bazel: fix hashes rule to generate outputs
So I figured out how to generate the outputs in the correct way so
that we don't need an artificial name; we must construct the outputs
field in the rule using a helper function.
2019-10-01 11:31:09 -04:00
Justin SB 15cd4d1284
Use helpers to move gzip & sha from makefile to bazel
We can move the gzip & sha steps from the makefile to bazel.  This not
only simplifies the makefile, it should enable more parallelism and
better caching.
2019-09-30 13:52:32 -04:00
Justin SB 622d13b85e
Create tools/sha1 and sha256 helpers, simply Makefile
We can continue to support platforms that have either shasum or
sha1sum / sha256sum.  but we can move that logic to a helper so that
our makefile is simpler, and also so that we can use the same helper
in bazel in future.
2019-09-28 20:02:15 -04:00
Justin SB 3ccc84dcf8
kops-controller container image
Based on distroless for security / stability
2019-09-25 12:04:36 -04:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Peter Rifel e38558a8fc Update rules_docker and go 2019-09-03 15:54:01 -07:00
mikesplain 9a73a5cba2 Add verbosity 2019-09-03 16:22:04 -04:00
Justin SB 8daf1c56d0
Update to golang 1.12.9
We particularly want the http fixes in 1.12.8:

https://golang.org/doc/devel/release.html#go1.12.minor
2019-08-31 07:51:44 -07:00
Justin SB 807780102b
Add suggested alias for bazelrc import location
See https://github.com/bazelbuild/bazel/issues/6319

The default bazelrc location is changing.  So that we don't break
during the transition, we set up an alias so that bazel versions that
load from the new location are redirected to the old location.

Also add a TODO to move to the new location once bazel 0.18 is
prevalent.
2018-10-18 09:01:39 -07:00
Justin Santa Barbara 822cc7f603 Mark 1.10.0-alpha.1 2018-06-21 21:26:10 -04:00
Justin Santa Barbara a9111e00ac Use STABLE_ prefixes for bazel workspace vars
This ensures that we rebuild when they change.
2018-06-03 13:13:33 -07:00
Justin Santa Barbara a5e58b243e Release 1.9.0 2018-04-11 10:07:36 -04:00
Justin Santa Barbara 367f534f89 Release 1.9.0-beta.2 2018-04-04 06:21:12 -07:00
Justin Santa Barbara 98ff1bf726 Release 1.9.0-beta.1 2018-04-02 06:12:53 -07:00
Justin Santa Barbara 4fc3e7114d kops release 1.9.0 alpha.3 2018-03-26 13:07:59 -04:00
Justin Santa Barbara d49ac2268a Release 1.9.0-alpha.2 2018-03-22 01:23:06 -04:00
chrislovecnm 0ece706486 Updating bazel kops versions so that it matches the Makefile 2018-03-05 11:12:00 -07:00
Justin Santa Barbara 7d142a1c9e Build protokube tar in bazel 2018-02-25 00:51:14 -05:00
chrislovecnm 0fe61ca341 Updating kops version when using bazel
We bumped the version in the Makefile, but I did not understand that we
have to bump the version in the workplace status script.  I added a note
in the Makefile, and bumped the version in the script.
2018-02-20 11:20:16 -07:00
Mike Splain 06d25ef26f Move get_workspace_status to .sh file 2018-01-24 11:31:34 -05:00
Mike Splain 622aa0fe9b Add license to get_workspace_status 2018-01-24 11:19:09 -05:00
Justin Santa Barbara c633ab62c5 bazel: expose version as in Makefile
This means that bazel build should stamp kops with the same version as
the Makefile does, given the same env vars.
2018-01-24 09:43:30 -05:00
Justin Santa Barbara 39d4f21954 bazel: stamp version into build 2017-10-03 11:36:40 -04:00