Commit Graph
176 Commits
Author SHA1 Message Date
Tiago Silva d3bc7bd7f4 Add option to disable the ServiceAccount creation for teleport-kube-agent chart (#16876)
When assigning AWS IAM permissions to Teleport, `eksctl create iamserviceaccount` command manages the ServiceAccount lifecycle. 

This PR allows any user to configure an existing Kubernetes ServiceAccount used by the agent.

Part of #11866
2022-10-03 16:25:51 +01:00
Ryan Clark 806a568ada Introduce config v3, add auth_server and proxy_server, remove auth_addresses (#15761) 2022-09-28 15:30:15 +00:00
Steven Martin 2e56b592bb gcp secret only in gcp mode fix (#13319) 2022-09-26 16:14:56 +00:00
Hugo Shaka cfb2fb01b4 helm: support imagePullSecret in kube-agent chart in statefulset mode (#16508) 2022-09-23 15:24:50 +00:00
Hugo Shaka 1cf949e5c4 helm: add minReadySeconds to teleport-cluster chart (#16465)
Fixes #13129

This PR sets minReadySeconds to 15 by default. During a rollout we still have proxies that don't have tunnels to all agents, but at least agents don't end up with 0 active tunnels.
2022-09-23 14:20:03 +00:00
Brian Joerger 2654add770 RequireMFAType (#16034)
Replace role/authPref RequireSessionMFA (bool) with RequireMFAType
(string).

  - Add new RequireMFAType constant values with custom boolean marshalling.

  - Add RequireMFAType to role and auth preference and deprecate
RequireSessionMFA.

  - Add session-mfa override login when hardware_key_touch is enforced.

  - Add protobuf enum for RequireMFAType.

  - Add support for proto enums in protoc-gen-crd and update Kubernetes
Operator manifests.
2022-09-22 20:30:32 +00:00
Hugo ShakaandPaul Gottschling 920495c6d7 helm: allow custom CA in teleport-cluster without custom certs (#16325)
Provides a solution for #9298

This removes an unnecessary limitation of the Helm chart: `.Values.tls.existingCASecretName` can now be used without `.Values.tls.existingSecretName`. This allows users to trust their own CAs without building custom images.

Context:
- go's x509 library supports loading system certs based on the SSL_CERTS_FILE environment variable
- we are already using this in the chart to trust private CAs (teleport proxy needs to trust its own certs to start)
- users might want to trust custom CAs to
  - speak with a S3 backend (minio)
  - validate upstream app certs (unlike DB access you can't trust certs per-application)
  - trust another cluster
  - call an OIDC provider
- teleport-kube-agent chart already has the feature

Co-authored-by: Paul Gottschling <paul.gottschling@goteleport.com>
2022-09-16 15:53:35 +00:00
ec47195944 Linting adjustment for comment-space complaint (#13280)
Co-authored-by: Gus Luxton <gus@goteleport.com>
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2022-09-15 19:05:38 +00:00
c67130052f helm: Add conditional creation of serviceAccount (#16337 and #11895)
Add conditional creation of `serviceAccount` in both `teleport-cluster` and `teleport-kube-agent` charts.

Signed-off-by: Hugo Hervieux <hugo.hervieux@goteleport.com>
Co-authored-by: nickolanick <biliaievnk@gmail.com>
Co-authored-by: Gus Luxton <gus@goteleport.com>
Co-authored-by: Mykola Biliaiev <mykola@firebolt.io>
2022-09-13 12:25:19 +00:00
Hugo Shaka 0290c671ed helm: support Kubernetes 1.25 (#16243)
Check if PodSecurityPolicy resources are supported before attempting to
deploy one. See https://kubernetes.io/docs/reference/using-api/deprecation-guide/#psp-v125
2022-09-12 20:30:30 +00:00
Logan Davis 6cbc9e1142 Update helm chart snapshots and tests for amazon ECR Public (#15355) 2022-08-23 16:03:40 +00:00
Hugo Shaka 65e861daeb Stop validating schema for labels in k8s operator (#15206)
* Stop validating schema for labels (#15204)
* operator: support receiving invalid TeleportRole CRs

This PR makes the controller-runtime manager decode TeleportRole
resource in an unstructured object. This avoid errors during decoding.
The resource is later decoded as a TeleportRole, with proper error
handling.
2022-08-17 03:18:17 +00:00
Hugo Shaka 82c520c818 helm: allow to disable local auth in teleport-cluster chart (#13827)
Fixes #12974

This commit introduces a new `authentication` value controlling:
- the authentication type (previously `authenticationType`)
- the second-factor (previously under `authenticationSecondFactor`)
- if local auth is enabled (new feature)
- the connector name (new feature)
- the locking mode (new feature)

If previous values `authenticationType` and `authenticationSecondFactor`
are specified we'll prefer them for backward compatibility.
2022-08-16 22:38:11 +00:00
Hugo Shaka f8be9cb6be helm: Add support for mounting existing TLS root CA (#13671)
* helm: Add support for mounting existing TLS root CA #12594
* Document per-database CA trust
2022-08-03 16:23:40 +00:00
Hugo Shaka 5add07799d helm: configure dynamoDB autoscaling in teleport-cluster (#13808)
* helm: configure dynamoDB autoscaling in teleport-cluster (#12046)
* Clarify best practices around DynamoDB autoscaling
2022-08-02 15:11:24 +00:00
Tiago Silva 40abd14635 Kubernetes Secret storage for Agent's Identity (#13942)
This MR introduces Kubernetes Secret storage for Teleport Kubernetes Agent state.

When running Teleport Agent inside a Kubernetes cluster where TELEPORT_REPLICA_NAME and KUBE_NAMESPACE exist, the agent will store identities and states in a Kubernetes Secret instead of local storage.

Otherwise, if the above environment variables are not present or not in Kubernetes, the agent persists state in SQLite.

Notes:

Fresh installs will enable the Kubernetes Secret Storage by default.
If PV storage is configured, the agent will store its identity in a Secret and use the PV for non-identity objects.
If the operator is upgrading from an existing release that didn't support Secret storage, the Helm chart will convert the objects to enable Kube Secret Storage. If the current object is a Deployment, the Helm chart installs a new Statefulset side by side and will trigger a Helm hook that is responsible for deleting the Deployment once Statefulset pods are healthy. Otherwise, if upgrading from a Statefulset the agent will read the credentials stored in PV and move them into Kube Secret.

Implementation of #12958
Related to #5585
2022-07-29 13:21:51 +00:00
Hugo Shaka 290b34f3be helm: Deploy CRDs when the operator is enabled (#14942)
* helm: Deploy CRDs when the operator is enabled
2022-07-28 17:05:11 +00:00
Hugo Shaka b3fd61790b helm: configure session recording in teleport-cluster (#13705)
* helm: configure session recording in teleport-cluster (#13543)
* Update docs/pages/setup/helm-reference/teleport-cluster.mdx
2022-07-28 15:51:25 +00:00
Hugo Shaka b0afb172eb helm: Add CA Pinning Support (#13685)
helm: Add CA Pinning Support
2022-07-26 17:30:21 +00:00
Hugo Shaka 22c75e1ee9 Support dynamic registration in kube-agent helm chart (#13641)
* Support dynamic registration in kube-agent helm chart(#9846)
* Update docs/pages/setup/helm-reference/teleport-kube-agent.mdx
2022-07-25 20:37:46 +00:00
Marco Dinis 5effbd8359 Add Teleport operator
This commit adds the Teleport operator. The operator reconciles
TeleportUsers and TeleportRoles Kubernetes resources with Users and
Roles Teleport resources.
2022-07-25 15:27:10 -04:00
Hugo Shaka 0adb3c16e8 Allow setting public addresses in teleport-cluster chart (#14603)
Allow setting public addresses in `teleport-cluster` chart
2022-07-21 16:49:38 -04:00
Gus Luxton 30404f5630 helm: Remove old teleport charts (#14111) 2022-07-06 20:16:36 +00:00
Roman Tkachenko 683d11d23e Update versions to 11 (#13528) 2022-06-15 23:28:08 +00:00
Gus Luxtonanddaquinoaldo 339bc6f25b feat(helm): expose securityContext as a value (#13016)
The PodSecurityPolicy specifies `MustRunAsNonRoot` but the image runs as root.
`Error: container has runAsNonRoot and image will run as root (pod: "<redacted>", container: teleport).`
We expose the securityContext to allow forcing to run as a non-root user such as 99 (nobody) and respect the psp.

Co-authored-by: daquinoaldo <aldd@bendingspoons.com>
2022-06-08 02:31:51 +00:00
Gus LuxtonandAldo D'Aquino ba3065cc40 docs(helm): remove wrong statement from kube-agent highAvailability (#13014)
Co-authored-by: Aldo D'Aquino <18645793+daquinoaldo@users.noreply.github.com>
2022-06-07 20:10:47 +00:00
Tiago Silva e8388cdb0e Fix liveness probe endpoint (#13208)
* fix liveness probe endpoint

* fix helm unittests
2022-06-07 16:49:29 +00:00
Roman Tkachenkoanddaquinoaldo ea394747bb feat(helm): add priorityClassName and extraLabels to kube-agent (#12559)
* feat(helm): add priorityClassName and extraLabels to kube-agent

Signed-off-by: Roman Tkachenko <roman@goteleport.com>

Co-authored-by: daquinoaldo <aldd@bendingspoons.com>
2022-05-10 22:37:20 +00:00
Gus LuxtonandPierre Lebrun a2ece60402 helm: Buddy merge for #11368 (Enable persistence in custom mode) (#11993)
* feat: Standardize persistence

* helm: Use deprecated standalone.existingClaimName when specified over newer persistence.existingClaimName

* chore: Change pvc comment

* feat: Update chart reference

* Update docs/pages/kubernetes-access/helm/reference/teleport-cluster.mdx

Co-authored-by: Pierre Lebrun <pierreyves.lebrun@rakuten.com>
2022-04-16 00:31:14 +00:00
Gus LuxtonandJohannes Kastl 59e03d42e0 helm: Buddy merge for #11493 (#11693)
* examples/chart/teleport-cluster/templates/deployment.yaml: set strategy to 'Recreate' if chartMode is 'standalone' (fixes #11484)

Signed-off-by: Johannes Kastl <kastl@b1-systems.de>

* examples/chart/teleport-cluster/tests/deployment_test.yaml: add test for strategy in standalone mode

Signed-off-by: Johannes Kastl <kastl@b1-systems.de>

* update examples/chart/teleport-cluster/tests/__snapshot__/deployment_test.yaml.snap after running local tests

Co-authored-by: Johannes Kastl <kastl@b1-systems.de>
2022-04-05 04:09:57 +00:00
Gus Luxton 75e0fcbd67 helm: Add support for mounting existing TLS secrets with optional root CA (#11295) 2022-04-01 17:35:21 -03:00
Gus Luxton f512f27851 Remove references to authentication type 'false' from docs (#11621) 2022-04-01 02:40:16 +00:00
d2a656ef3f helm: Allow probe timeouts to be configurable (buddy merge of #11176) (#11396)
* Allow for probe timeouts to be configurable

When setting up a new Teleport enterprise cluster on GCP,
I noticed that I needed to set the probe timeouts to get the
cluster to be healthy. This seems to be a known issue (https://github.com/kubernetes/kubernetes/issues/89898).

As a "stopgap", I've updated the helm chart to allow for end users
to be able to configure these timeouts.

* Update configuration option name and add documentation

* Update docs/pages/kubernetes-access/helm/reference.mdx

Co-authored-by: Gus Luxton <gus@goteleport.com>

* Add tests for probeTimeoutSeconds

* Add probeTimeoutSeconds to required values

* Add probeTimeoutSeconds to teleport-kube-agent

* Add tests for probeTimeoutSeconds to teleport-kube-agent

* Add probeTimeoutSeconds to teleport-kube-agent reference

Co-authored-by: Hunter Madison <hunter.madison@instana.com>
Co-authored-by: Hunter Madison <hmadison@users.noreply.github.com>
2022-03-25 01:56:22 +00:00
Gus Luxton e5cbd620ce helm: Add support for separate Postgres/Mongo listeners in teleport-cluster chart (#10858)
* helm: Update NOTES.txt for AWS ACM

* Add support for separate Postgres/MongoDB listeners in teleport-cluster chart

* Special case backend listener protocol based on presence of ACM annotation

* Add tests for separate listeners

* Add tests for ACM annotation setting backend protocol

* Don't add AWS annotations when not in AWS mode

* Adds for separatePostgresListener/separateMongoListener

Also adds missing example for setitng proxyListenerMode

* Add continuous backups permission to DynamoDB policy

Fixes #11411
2022-03-24 18:41:08 +00:00
Gus Luxton 4baf68a4f1 helm: Set default second factor to "otp" in values (#11034)
https://github.com/gravitational/teleport/pull/10817 states in the docs that the default for `authenticationSecondFactor.secondfactor` is `otp`, but it didn't actually update the values.yaml file to make this change the default. This PR addresses that mistake and brings the chart in-line with the docs.
2022-03-22 17:04:32 +00:00
Gus Luxton 1b90927193 helm: Adds missing namespaces to ConfigMap (#11032) 2022-03-22 14:33:12 +00:00
Gus Luxton ee5b859593 helm: Refine snapshotting for Deployment/StatefulSet in unit tests (#11279) 2022-03-22 01:29:06 +00:00
3c74adf218 Add Helm unit tests (#11062)
* POC for Helm unit tests

This uses https://github.com/vbehar/helm3-unittest to define
expectations of our helm templates

* Test that enterprise is configured correctly

* Added tests for teleport-cluster

* Added tests for teleport-kube-agent

* Removed tests for teleport chart

* Add tests for teleport-cluster Deployment

* Run shorter tests first

* Fix Docker plugin installation and add update-helm-snapshots target

* Add README

* Fix lint syntax error and add some missing linters

* Add missing ImagePullPolicy to Deployment and StatefulSet

* Add Deployment tests for teleport-kube-agent

* Fix replicaCount logic

* Add clarification to values

* Add StatefulSet suite for teleport-kube-agent

* Update snapshots after merge with master

* Helm tests are quicker than bash tests

* Add tests for extraEnv

* Random space

* Tidy up formatting of multiple tests

* [debug] List helm plugins and directories

* Special case Helm linting when running in CI

* Make trailing line breaks consistent

* Special case Helm linting when running in CI

* Add contribution guidelines for Helm charts

* Add contribution guidelines to READMEs

* Deprecate old charts

* Typo

* Spacing

* Clarification

* Update examples/chart/CONTRIBUTING.md

* Don't erroneously set extraEnv for initContainers

* Rename update-helm-snapshots -> test-helm-update-snapshots for clarity

Co-authored-by: Gus Luxton <gus@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-03-20 19:01:58 +00:00
Gus Luxton a463dacaf2 helm: Adds extraArgs and extraEnv to teleport-kube-agent (#11155)
* helm: Adds extraArgs and extraEnv to teleport-kube-agent

These were present in teleport-cluster but not teleport-kube-agent. This PR fixes that.

* Line breaks

* Also add to StatefulSet
2022-03-17 18:22:59 +00:00
Erick ReyesandGus Luxton 508bf7adb2 helm: include static_labels in database example (#10414)
* Updated comment

Update clarifying comment for database section.

* Update examples/chart/teleport-kube-agent/values.yaml

Co-authored-by: Gus Luxton <gus@goteleport.com>
2022-03-17 03:04:35 +00:00
Peter CandGus Luxton 3723b9d472 Fix TLS multiplexing for the kubernetes_service in the teleport-cluster helm chart (#10002)
Co-authored-by: Gus Luxton <gus@goteleport.com>
2022-03-16 20:37:32 +00:00
Gus Luxton 79e05c0508 helm: Set default second factor to 'otp' (#10817) 2022-03-04 01:58:27 +00:00
Peter Collins 5cb4ff9d94 Add webauthn.yaml lint for teleport-cluster helm chart tests 2022-03-02 18:41:50 -08:00
Peter Collins a4bf397ee8 Set rpId as clusterName instead 2022-03-02 18:41:50 -08:00
Peter Collins db3a9c7596 Add support for webauthn in the teleport-cluster helm chart 2022-03-02 18:41:50 -08:00
Gus Luxton eab8fd2dda helm: Fix enabled clause for db_service when using awsDatabases only (#10643)
Some logic was in the wrong place and was erroneously adding both enabled: true and enabled:false when only awsDatabases was enabled.
2022-03-01 20:01:57 +00:00
Gus Luxton aa1d3c6029 helm: Fix indenting on database autodiscovery (#10622)
I had previously assumed that db_service.aws and db_service.databases.aws were the same key; they are not. This PR fixes this error.
2022-02-25 18:13:57 +00:00
Gus Luxton 1d1efaa70f helm: Revert PodSecurityPolicy change (#10563) 2022-02-23 23:10:06 +00:00
Roman Tkachenko 033debf7e4 Bump version to v10-dev (#10510) 2022-02-22 18:01:11 +00:00
Gus Luxton 562f5bd38b helm: Add AWS database auto-discovery to teleport-kube-agent (#10344)
* helm: Add AWS database auto-discovery to teleport-kube-agent

* Update psp v1beta -> v1 to avoid upcoming deprecation

* Address docs feedback
2022-02-18 02:54:02 +00:00