Commit Graph

1402 Commits

Author SHA1 Message Date
Andrew Seigner abcb8bb22c
Updated release notes for edge-19.4.3 (#2670)
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-08 17:19:58 -07:00
Oliver Gould bbe1a60358
upgrade: Generate an Identity config if missing (#2656)
When upgrading from an older cluster that has a Linkerd config but no
identity, we need to generate an identity context so that the cluster is
configured properly.

Fixes #2650
2019-04-08 16:49:12 -07:00
Kevin Lingerfelt e395803ce2
Allow web server to load without install config (#2668)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2019-04-08 13:24:44 -07:00
Carol A. Scott d4e955f805
Updating webdriverio libraries (#2665)
Updates the WebdriverIO libraries used in the front-end integration tests so that officially-supported libraries are used where possible.
2019-04-08 13:19:50 -07:00
Katerina 938d64a16f Web server updated to read the UUID from the linkerd-config ConfigMap. (#2603)
Signed-off-by: Kateryna Melnyk <kattymelnyk@gmail.com>
2019-04-08 12:56:00 -07:00
Oliver Gould ba65bd8039
Switch UUID implementation (#2667)
The UUID implementation we use to generate install IDs is technically
not random enough for secure uses, which ours is not. To prevent
security scanners like SNYK from flagging this false-positive, let's
just switch to the other UUID implementation (Already in our
dependencies).
2019-04-08 10:58:02 -07:00
Oliver Gould d3b0d39f3b
upgrade: Fix the linkerd version in linkerd-config (#2662)
92f15e78a9 incorrectly removed the config
version override when patching a config from options, which caused
upgrade to stop updating the config version.

Fixes #2660
2019-04-08 10:57:02 -07:00
Kevin Leimkuhler 65a228fe6c
Add edge-19.4.2 release notes (#2648)
* Add edge-19.4.2 release notes

Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io>
2019-04-05 15:51:59 -07:00
Kevin Leimkuhler 10f8c786c7
proxy: Bump proxy for edge-19.4.2 (#2654)
This bump pulls in:
  * New proxy tests

Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io>
2019-04-05 15:50:19 -07:00
Oliver Gould 4fd1de4340
install: Don't reuse flag set (#2649)
The instalOnlyFlagSet incorrectly extends the recordableFlagSet.

I'm not sure if this has any potential for unexpected user interactions,
but it's at least confusing when reading the code.

This change makes the flag sets distinct.
2019-04-05 14:29:52 -07:00
Alejandro Pedraza edb225069c
Add validation webhook for service profiles (#2623)
Add validation webhook for service profiles

Fixes #2075

Todo in a follow-up PRs: remove the SP check from the CLI check.

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-04-05 16:10:47 -05:00
Oliver Gould 4c5378f586
install: Change --ha to set a 100m CPU request (#2644)
When the --ha flag is set, we currently set a 10m CPU request, which
corresponds to 1% of a core, which isn't actually enough to keep the
proxy responding to health checks if you have 100 processes on the box.
Let's give ourselves a little more breathing room.

Fixes #2643
2019-04-05 13:41:00 -07:00
Risha Mars 4b3d21aa27
Fix check for empty metrics that always returned false (#2645)
Problem:
In #2532 I removed the Tap/Top tables if there was no http traffic, but the
check I used depended on a stats object being present in the processed metrics
(spoiler: it isn't present in the processed metrics). 

Solution:
Use a better check for no traffic. 
The new check checks for both no requests (so nil request rate) and
also no latency (in the case that the service is http but receiving no traffic).

Fixes #2641
2019-04-05 12:15:43 -07:00
Andrew Seigner 1c938b3f52
Introduce upgrade command unit tests (#2639)
This change introduces a basic unit test for the `linkerd upgrade`
command. Given a mock k8s client with linkerd-config and
linkerd-identity-issuer objects, it validates the rendered yaml output
against an expected file.

To enable this testing, most of the logic in the top-level upgrade
command has been moved down into a `validateAndBuild` method.

TODO:
- test individual functions around mutating options, flags, configs, and
  values
- enable reading the install information from a manifest rather than k8s

Part of #2637

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-05 11:55:20 -07:00
Andrew Seigner 2f80add17a
Introduce inject integration tests (#2616)
This change introduces integration tests for `linkerd inject`. The tests
perform CLI injection, with and without params, and validates the
output, including annotations.

Also add some known errors in logs to `install_test.go`.

TODO:
- deploy uninjected and injected resources to a default and
  auto-injected cluster
- test creation and update

Part of #2459

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-05 11:42:49 -07:00
Carol A. Scott e15ce7f6d2
Output a URL with instructions after running `linkerd upgrade` (#2627)
Adds a URL to the `linkerd upgrade` output which contains full upgrade instructions. The message and the URL anchors are different in the case of success or failure.

Fixes #2575.
2019-04-04 16:32:11 -07:00
Kevin Lingerfelt 74e48ba301
Remove project injector's -no-init-container flag (#2635)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2019-04-04 11:09:47 -07:00
harsh jain 976bc40345 Fixes #2607: Remove TLS from stat (#2613)
Removes the TLS percentages from the stat command in the CLI.
2019-04-04 10:37:42 -07:00
harsh jain 31706e5417 Fixes #2568: Remove cni option from inject subcommand (#2573)
Signed-off-by: harsh jain <harshjniitr@gmail.com>
2019-04-03 18:46:20 -07:00
Oliver Gould e0ba802f80
proxy-identity: Set a CommonName on CSRs (#2626)
Some CA's (like AWS) require a CN be set on the CSR.

This change modifies proxy-identity to set the identity name as the
CSR's CommonName.

Fixes #2622
2019-04-03 13:54:50 -07:00
Alejandro Pedraza f6fb865183
Enhance webhook unit tests by checking returned JSON patch (#2615)
Enhance webhook unit tests by checking returned JSON patch

Also have labels/annotations added during injection to be added in order

Fixes #2560

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-04-03 15:39:27 -05:00
Kevin Lingerfelt 50952c813e
testutil: Only store k8s context in KubernetesHelper struct (#2625)
Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
2019-04-02 17:26:23 -07:00
Carol A. Scott 05a899fc21
Fixing bin/web test (#2621)
Fixes bin/web test by restoring a preset to the Babel config file.
2019-04-02 17:02:15 -07:00
Carol A. Scott 982d629552
Removing TLS columns from tables in dashboard (#2611)
This PR closes #2608. It removes the TLS columns from the dashboard tables and updates the associated tests.
2019-04-02 16:54:39 -07:00
Ivan Sim 92f15e78a9
Define proxy version override annotation (#2593)
* Define proxy version override annotation
* Don't override global linkerd version during inject

This ensures consistent usages of the config.linkerd.io/linkerd-version and
linkerd.io/proxy-version annotations. The former will only be used to track
overridden version, while the latter shows the cluster's current default
version.

* Rename proxy version config override annotation

Signed-off-by: Ivan Sim <ivan@buoyant.io>
2019-04-02 14:27:12 -07:00
Andrew Seigner a3bba0e143
Fix logging regex to handle any addr (#2619)
Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-02 12:47:38 -07:00
Oliver Gould 9051e4f12d
upgrade: Do not require an 'install' config (#2618)
Previous control plane versions do not provide an 'install' config, so
this field cannot be required.

Now, missing empty are handled more gracefully; and upgrade repairs
install configs with missing fields.
2019-04-02 12:01:48 -07:00
Andrew Seigner a21c7be9f5
Fix ci logging errors (#2617)
Introduce some additional known logging errors to the integration tests

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-02 11:24:30 -07:00
Kevin Leimkuhler 552060ddd8
Add edge-19.4.1 release notes (#2610)
* Add edge-19.4.1 release notes

Signed-off-by: Kevin Leimkuhler <kevinl@buoyant.io>
2019-04-02 09:35:07 -07:00
Kevin Leimkuhler 1f2401c7a3
proxy: Bump pinned version to f2d907b (#2609)
* proxy: Bump pinned version to f2d907b

This change picks up:
* Added configuration for overriding the connection backoff
* Added configuration for overriding the HTTP/2 stream or connection window size
* Disable potentially info-leaking header

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
2019-04-01 21:31:16 -07:00
Ivan Sim a80335ed51
Disable external profiles by default (#2594)
* Disable external profiles by default
* Rename the --disable-external-profiles flag to --enable-external-profiles

Signed-off-by: Ivan Sim <ivan@buoyant.io>
2019-04-01 15:13:50 -07:00
Oliver Gould d74ca1bab0
cli: Introduce an upgrade command (#2564)
The `install` command errors when the deploy target contains an existing
Linkerd deployment. The `upgrade` command is introduced to reinstall or
reconfigure the Linkerd control plane.

Upgrade works as follows:

1. The controller config is fetched from the Kubernetes API. The Public
   API is not used, because we need to be able to reinstall the control
   plane when the Public API is not available; and we are not concerned
   about RBAC restrictions preventing the installer from reading the
   config (as we are for inject).

2. The install configuration is read, particularly the flags used during
   the last install/upgrade. If these flags were not set again during the
   upgrade, the previous values are used as if they were passed this time.
   The configuration is updated from the combination of these values,
   including the install configuration itself.

   Note that some flags, including the linkerd-version, are omitted
   since they are stored elsewhere in the configurations and don't make
   sense to track as overrides..

3. The issuer secrets are read from the Kubernetes API so that they can
   be re-used. There is currently no way to reconfigure issuer
   certificates. We will need to create _another_ workflow for
   updating these credentials.

4. The install rendering is invoked with values and config fetched from
   the cluster, synthesized with the new configuration.
2019-04-01 13:27:41 -07:00
Andrew Seigner 38f504beb1
Introduce test-scale script (#2578)
Introduce a `bin/test-scale` script to deploy Linkerd alongside sample
apps at scale.

This script deploys the following:
- Linkerd control-plane, with service profiles
- 5 namespaces x 5 replicas of each:
  - Emojivoto demo app
  - Books demo app, with service profiles
  - Lifecycle / bb test environment

Fixes #2517

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-01 12:51:53 -07:00
Andrew Seigner b454f8fbc1
Introduce auto inject integration tests (#2595)
The integration tests were not exercising proxy auto inject.

Introduce a `--proxy-auto-inject` flag to `install_test.go`, which
now exercises install, check, and smoke test deploy for both manual and
auto injected use cases.

Part of #2569

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-04-01 10:32:56 -07:00
Andrew Seigner 48ddde2146
Introduce script to test multiple cloud providers (#2592)
Introduce a `bin/test-clouds` and cleanup script, to run integration
tests against 4 cloud providers.

Also modify the integration tests to accept a `--context` param to
specify the Kubernetes context to run the tests against.

Fixes #2516

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-03-29 16:22:30 -07:00
Carol A. Scott 0251f50fa4
Adding local and cloud integration testing for dashboard (#2586)
Adds local and cloud integration testing for the dashboard using WebdriverIO and
SauceLabs. Includes documentation on how to set up and run the Sauce Connect
proxy locally. Adds a `bin/web integration` script that takes `local` or `cloud`
arguments to run the tests. 

Note: for web development, the web server launched by `bin/web run` and `bin/web
dev` is now 7777, not 8084, because the Sauce Connect proxy can only tunnel to
certain ports.
2019-03-29 15:48:00 -07:00
Gaurav Kumar 23454d248d Add validation to the Service Profile form (#2490) (#2514)
Fixes #2490

The following PR adds validation to the New Service Profile popup form in the linkerd dashboard for the service and namespace user input.

* Add validation to the Service Profile form (#2490)

Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>

* Change RegExp to handle all cases

Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>

* Fix link and error msg issue

Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>

* Refactor code

Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>

* Revert to onBlur and remove warning on field clear

Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>

* Refactor code to make it more readable

Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>

* Reset state to initialstate on form close

Signed-off-by: Gaurav Kumar <gaurav.kumar9825@gmail.com>
2019-03-29 14:57:52 -07:00
Andrew Seigner 9eab0e28a6
Introduce ServiceProfile integration tests (#2588)
The existing integration tests were not validating ServiceProfile
functionality.

Introduce ServiceProfile integration tests that:
- install control-plane ServiceProfiles via `linkerd install-sp`
- install smoke-test ServiceProfiles via `linkerd profile --proto`
- validate well-formed ServiceProfiles via `linkerd check`
- validate `linkerd routes` returns expected output

Fixes #2520

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-03-29 10:52:54 -07:00
Andrew Seigner e38ad7e9d1
Update Prometheus retention param (#2584)
`storage.tsdb.retention` is deprecated in favor of
`storage.tsdb.retention.time`.

Replace all occurrences.

Signed-off-by: Andrew Seigner <siggy@buoyant.io>
2019-03-29 10:45:02 -07:00
Alejandro Pedraza e711ab7b15
Update tap integration test to account for always-on mTLS (#2589)
Out of all the integration tests (egress, get, stat, tap and
install_test) only in stat and tap do meshed (proxy-to-proxy) connections take
place, which we can test are 100% TLS.

For stat, #2537 already added such check for connections with the
Prometheus pod (connections to other pods are not meshed, apparently).

This commit adds such check for tap.

Fixes #2519
2019-03-29 12:28:47 -05:00
Oliver Gould 655632191b
config: Store install parameters with global config (#2577)
When installing Linkerd, a user may override default settings, or may
explicitly configure defaults. Consider install options like `--ha
--controller-replicas=4` -- the `--ha` flag sets a new default value for
the controller-replicas, and then we override it.

When we later upgrade this cluster, how can we know how to configure the
cluster?

We could store EnableHA and ControllerReplicas configurations in the
config, but what if, in a later upgrade, the default value changes? How
can we know whether the user specified an override or just used the
default?

To solve this, we add an `Install` message into a new config.
This message includes (at least) the CLI flags used to invoke
install.

upgrade does not specify defaults for install/proxy-options fields and,
instead, uses the persisted install flags to populate default values,
before applying overrides from the upgrade invocation.

This change breaks the protobuf compatibility by altering the
`installation_uuid` field introduced in 9c442f6885.
Because this change was not yet released (even in an edge release), we
feel that it is safe to break.

Fixes https://github.com/linkerd/linkerd2/issues/2574
2019-03-29 10:04:20 -07:00
Carol A. Scott 45aa10dcc2
Modifying Contribution Guidelines for PRs (#2587)
This PR modifies the Linkerd2 Contribution Guidelines. It adds a request that
PRs include instructions on how to test changes, and to include a screenshot if
there is a UI change.
2019-03-28 16:09:09 -07:00
Oliver Gould 93e7654eba
install: Replace EnableHA with resource values (#2572)
This change moves resource-templating logic into a dedicated template,
creates new values types to model kubernetes resource constraints, and
changes the `--ha` flag's behavior to create these resource templates
instead of hardcoding the resource constraints in the various templates.
2019-03-27 15:56:30 -07:00
Ivan Sim ea07dd3938
Promote the shared injection check to the CLI and webhook (#2555)
Performing this check earlier helps to separate the specialized logic to the CLI
and webhook.
Any subsequent modification of this check logic to support config override of
existing meshed workload will be confined to the relevant component.
The shared lib can then focus only on config overrides.

Signed-off-by: Ivan Sim <ivan@buoyant.io>
2019-03-27 14:51:05 -07:00
Risha Mars eda36e3258
Always show TCP open connections in the CLI (#2533)
Allow the TCP CONNECTIONS column to be shown on all stat queries in the CLI.
This column will now be called TCP_CONN for brevity.
Read/Write bytes will still only be shown on -o wide or -o json
2019-03-27 13:34:28 -07:00
Oliver Gould fda2035d5c
Use "With .Values" scoping in all templates (#2570)
Some of our templates have started to use 'with .Values' scoping to
limit boilerplate within the tempates.

This change makes this uniform in all templates.
2019-03-26 19:09:21 -07:00
Oliver Gould 24222da13b
install: Create auto-inject configuration (#2562)
When reading a Linkerd configuration, we cannot determine whether
auto-inject should be configured.

This change adds auto-inject configuration to the global config
structure. Currently, this configuration is effectively boolean,
determined by the presence of an empty value (versus a null).
2019-03-26 15:28:54 -07:00
Risha Mars 408cffdc23
Better handle TCP only resources in the dashboard (#2532)
When a resource only has TCP traffic and no HTTP traffic, the dashboard looks
weird in a bunch of places.

This branch:
- updates the main resource card in the Octopus graph to show TCP stats if no HTTP
stats are available 
- cleans up the resource detail page to show fewer blank
tables if the resource only has TCP traffic.
2019-03-26 14:39:54 -07:00
Ivan Sim 9c5bb4ec0c
Convert CLI inject proxy options to annotations (#2547)
* Include the DisableExternalProfile option even if it's 'false'. The override logic depends on this option to assign different profile suffix.
* Check for proxy and init image overrides even when registry option is empty
* Append the config annotations to the pod's meta before creating the patch. This ensures that any configs provided via the CLI options are persisted as annotations before the configs override.
* Persist linkerd version CLI option

Signed-off-by: Ivan Sim <ivan@buoyant.io>
2019-03-26 14:21:22 -07:00
Alejandro Pedraza 7efe385feb
Have the Webhook react to pod creation/update only (#2472)
Have the Webhook react to pod creation/update only

This was already working almost out-of-the-box, just had to:

- Change the webhook config so it watches pods instead of deployments
- Grant some extra ClusterRole permissions
- Add the piece that figures what's the OwnerReference and add the label
for it
- Manually inject service account mount paths
- Readd volumes tests

Fixes #2342 and #1751

Signed-off-by: Alejandro Pedraza <alejandro@buoyant.io>
2019-03-26 11:53:56 -05:00