Commit Graph

32 Commits

Author SHA1 Message Date
Daniel Nephin 44d91ea56f
Add failures_before_warning to checks (#10969)
Signed-off-by: Jakub Sokołowski <jakub@status.im>

* agent: add failures_before_warning setting

The new setting allows users to specify the number of check failures
that have to happen before a service status us updated to be `warning`.
This allows for more visibility for detected issues without creating
alerts and pinging administrators. Unlike the previous behavior, which
caused the service status to not update until it reached the configured
`failures_before_critical` setting, now Consul updates the Web UI view
with the `warning` state and the output of the service check when
`failures_before_warning` is breached.

The default value of `FailuresBeforeWarning` is the same as the value of
`FailuresBeforeCritical`, which allows for retaining the previous default
behavior of not triggering a warning.

When `FailuresBeforeWarning` is set to a value higher than that of
`FailuresBeforeCritical it has no effect as `FailuresBeforeCritical`
takes precedence.

Resolves: https://github.com/hashicorp/consul/issues/10680

Signed-off-by: Jakub Sokołowski <jakub@status.im>

Co-authored-by: Jakub Sokołowski <jakub@status.im>
2021-09-14 12:47:52 -04:00
Daniel Nephin 0cb479f782
Merge pull request #10353 from hashicorp/dnephin/prune-build-scripts-1
Remove a few unused things from build-support
2021-07-16 14:27:00 -04:00
Daniel Nephin 1e0b233472 Remove a few unused things from build-support 2021-07-05 13:56:26 -04:00
Jared Kirschner 4c3b1b8b7b Replace use of 'sane' where appropriate
HashiCorp voice, style, and language guidelines recommend avoiding ableist
language unless its reference to ability is accurate in a particular use.
2021-07-02 12:18:46 -04:00
R.B. Boyer 06cd0aaa8d
xds: ensure that all envoyproxy/go-control-plane protobuf symbols are linked into the final binary (#10131)
This ensures that if someone does include some extension Consul does not currently make use of, that extension is actually usable. Without linking these envoy protobufs into the main binary it can't round trip the escape hatches to send them down to envoy.

Whenenver the go-control-plane library is upgraded next we just have to re-run 'make envoy-library'.
2021-04-29 14:58:26 -05:00
R.B. Boyer c88512fe14
connect: update centralized upstreams representation in service-defaults (#10015) 2021-04-15 14:21:44 -05:00
R.B. Boyer d2f09ca306
upstream some differences from enterprise (#8902) 2020-10-09 09:42:53 -05:00
Daniel Nephin b26a2ba522 Update build-support/scripts/proto-gen.sh 2020-09-24 15:09:01 -04:00
Daniel Nephin 1abd042162 ci: Add check-generated
And remove makefile targets that can be accomplished with --always-make
2020-07-29 12:10:44 -04:00
Matt Keeler eda8cb39fd
Implement the insecure version of the Cluster.AutoConfig RPC endpoint
Right now this is only hooked into the insecure RPC server and requires JWT authorization. If no JWT authorizer is setup in the configuration then we inject a disabled “authorizer” to always report that JWT authorization is disabled.
2020-06-17 11:25:29 -04:00
Matt Keeler 29f0616708
Use encoding/json instead of jsonpb even for protobuf types (#6572)
This only works so long as we use simplistic protobuf types. Constructs such as oneof or Any types that require type annotations for decoding properly will fail hard but that is by design. If/when we want to use any of that we will probably need to consider a v2 API.
2019-10-02 15:32:15 -04:00
Matt Keeler cfa879d63c
Generate JSON and Binary Marshalers for Protobuf Types (#6564)
* Add JSON and Binary Marshaler Generators for Protobuf Types

* Generate files with the correct version of gogo/protobuf

I have pinned the version in the makefile so when you run make tools you get the right version. This pulls the version out of go.mod so it should remain up to date.

The version at the time of this commit we are using is v1.2.1

* Fixup some shell output

* Update how we determine the version of gogo
This just greps the go.mod file instead of expecting the go mod cache to already be present

* Fixup vendoring and remove no longer needed json encoder functions
2019-09-30 15:39:20 -04:00
Matt Keeler 8431c5f533
Add support for implementing new requests with protobufs instea… (#6502)
* Add build system support for protobuf generation

This is done generically so that we don’t have to keep updating the makefile to add another proto generation.

Note: anything not in the vendor directory and with a .proto extension will be run through protoc if the corresponding namespace.pb.go file is not up to date.

If you want to rebuild just a single proto file you can do so with: make proto-rebuild PROTOFILES=<list of proto files to rebuild>

Providing the PROTOFILES var will override the default behavior of finding all the .proto files.

* Start adding types to the agent/proto package

These will be needed for some other work and are by no means comprehensive.

* Add ability to resolve/fixup the agentpb.ACLLinks structure in the state store.

* Use protobuf marshalling of raft requests instead of msgpack for protoc generated types.

This does not change any encoding of existing types.

* Removed structs package automatically encoding with protobuf marshalling

Instead the caller of raftApply that wants to opt-in to protobuf encoding will have to call `raftApplyProtobuf`

* Run update-vendor to fixup modules.txt

Nothing changed as far as dependencies go but the ordering of modules in that file depends on the time they are first seen and its not alphabetical.

* Rename some things and implement the structs.RPCInfo interface bits

agentpb.QueryOptions and agentpb.WriteRequest implement 3 of the 4 RPCInfo funcs and the new TargetDatacenter message type implements the fourth.

* Use the right encoding function.

* Renamed agent/proto package to agent/agentpb to prevent package name conflicts

* Update modules.txt to fix ordering

* Change blockingQuery to take in interfaces for the query options and meta

* Add %T to error output.

* Add/Update some comments
2019-09-20 14:37:22 -04:00
Freddy 73f8286099
Remove old UI, option to use it, and its build processes 2019-04-12 09:02:27 -06:00
Freddy 93aaf00b6b
Add script and makefile goal to help debug flaky tests 2018-09-10 16:44:07 +01:00
John Cowen 08fe675865
UI: Add conditional enterprise logo (#4432)
Adds additional 'enterprise' text underneath the 'startup' logo if the
ui is built with a CONSUL_BINARY_TYPE environment variable that doesn't
equal `oss`.
2018-07-30 17:59:43 +01:00
Matt Keeler 5b44cadb74 Update verify.sh script 2018-06-26 12:08:33 -04:00
Matt Keeler ba2bf40ede Added capability to make dev-tree without pushing
No push is the default
2018-06-26 11:46:37 -04:00
Matt Keeler 9651b9a1f9 Added release verification script
Also implemented shasum verification and gpg signature verification
2018-06-26 11:45:02 -04:00
Matt Keeler 50f43fe247 Create a new ui_version function to pull it out of an index.html file
Also verify the ui version after it was built that it matches the env var we set in the build container.
2018-06-26 11:22:13 -04:00
John Cowen 655a2dff2d Adds version messages both before and after the ui-v2 build
1. Prints the $version that you are passing through to the docker
container
2. Prints the CONSUL_VERSION that is used in the UI v2 footer
3. Additionally added a `mkdir -p` so so `make ui-docker` runs with a
clean exit if run in isolation
2018-06-26 10:33:22 +01:00
Matt Keeler 2d863b8d4c PR Updates 2018-06-19 12:47:58 -04:00
Matt Keeler 5fc30a4e6f Allow for building pre-releases/rcs/betas 2018-06-18 17:06:38 -04:00
Matt Keeler 7f4e18d3d1 Quote $@ when passing around 2018-06-18 14:53:50 -04:00
Matt Keeler 1031a2bbf8 Pass the right var to git_push_ref 2018-06-18 12:34:30 -04:00
Matt Keeler c59afc119a Return early when git changes are denied 2018-06-18 12:33:59 -04:00
Matt Keeler e542e63031 Generalize git pushing in a bash function 2018-06-15 20:42:07 -04:00
Matt Keeler 1aac7c7081 Add capability to put tree back into dev mode via make dev-tree 2018-06-15 08:00:12 -04:00
Matt Keeler 57aa738416 Update the scripting
Automated putting the source tree into release mode.
2018-06-14 21:42:47 -04:00
Matt Keeler 237c78d4a4 Add more functionality related to verifying a build and publishing 2018-06-13 17:03:18 -04:00
Matt Keeler 351841c7b2 Redo the build system
Improvements:
   - More modular
   - Building within docker doesn’t use volumes so can be run on a remote docker host
   - Build containers include only minimal context so they only rarely need to be rebuilt and most of the time can be used from the cache.
   - 3 build containers instead of 1. One based off of the upstream golang containers for building go stuff with all our required GOTOOLS installed. One like the old container based off ubuntu bionic for building the old UI (didn’t bother creating a much better container as this shouldn’t be needed once we completely remove the legacy UI). One for building the new UI. Its alpine based with all the node, ember, yarn stuff installed.
   - Top level makefile has the ability to do a container based build without running make dist
   - Can build for arbitrary platforms at the top level using: make consul-docker XC_OS=… XC_ARCH=…
   - overridable functionality to allow for customizations to the enterprise build (like to generate multiple binaries)
   - unified how we compile our go. always use gox even for dev-builds or rather always use the tooling around our scripts which will make sure things get copied to the correct places throughout the filesystem.
2018-06-12 16:55:52 -04:00
Matt Keeler d7a0d61e7d Initial progress on build system updates 2018-06-08 10:20:54 -04:00