Skip to content

automatic upgrades: use default version channel everywhere#35342

Merged
hugoShaka merged 4 commits intomasterfrom
hugo/use-default-update-channel
Dec 18, 2023
Merged

automatic upgrades: use default version channel everywhere#35342
hugoShaka merged 4 commits intomasterfrom
hugo/use-default-update-channel

Conversation

@hugoShaka
Copy link
Copy Markdown
Contributor

@hugoShaka hugoShaka commented Dec 4, 2023

This PR:

  • makes every Discover feature use the new update channels instead of directly hitting the cloud endpoint
  • creates default channels for cloud and self-hosted
  • cleans up unused code

Part of https://github.com/gravitational/cloud/issues/6773

@hugoShaka hugoShaka force-pushed the hugo/add-proxy-version-server branch 4 times, most recently from cc8d429 to eb76306 Compare December 12, 2023 00:44
Base automatically changed from hugo/add-proxy-version-server to master December 12, 2023 01:22
@hugoShaka hugoShaka force-pushed the hugo/use-default-update-channel branch from c608252 to f367546 Compare December 12, 2023 16:23
@hugoShaka hugoShaka added the no-changelog Indicates that a PR does not require a changelog entry label Dec 12, 2023
@hugoShaka hugoShaka marked this pull request as ready for review December 12, 2023 17:18
@bernardjkim
Copy link
Copy Markdown
Contributor

If we'd like to avoid too much cloud specific login in the teleport code base, we can configure the cloud specific channels in the teleportcontroller ex: https://github.com/gravitational/cloud/pull/6904

@hugoShaka
Copy link
Copy Markdown
Contributor Author

hugoShaka commented Dec 13, 2023

If we'd like to avoid too much cloud specific login in the teleport code base, we can configure the cloud specific channels in the teleportcontroller ex: gravitational/cloud#6904

I added the defaults because cloud-specific code was already relying on this or using hardcoded URLs. This default is required to not break existing integrations.

@hugoShaka hugoShaka force-pushed the hugo/use-default-update-channel branch 2 times, most recently from f589c48 to bca6cb9 Compare December 13, 2023 20:55
Comment thread lib/service/awsoidc.go Outdated
Comment thread lib/web/join_tokens.go Outdated
Comment thread lib/service/awsoidc.go Outdated
Comment thread lib/web/join_tokens.go Outdated
Comment thread lib/automaticupgrades/channel.go Outdated
Comment thread lib/automaticupgrades/channel.go Outdated
Comment on lines 68 to 70
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is for v15
So, I guess we want to remove this and add it back for the backport PRs

Comment thread lib/automaticupgrades/channel.go Outdated
Comment thread lib/automaticupgrades/channel.go Outdated
Comment thread lib/config/configuration.go Outdated
Comment thread lib/web/join_tokens.go Outdated
Comment thread lib/web/join_tokens.go Outdated
Copy link
Copy Markdown
Collaborator

@r0mant r0mant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code lgtm but let's please test all affected Discover flows to make sure nothing regresses.

Also, does this cover auto-discovery install scripts (e.g. for EC2) as well?

hugoShaka and others added 3 commits December 18, 2023 14:31
This commit:
- initializes default upgrade channels based on the server features
- makes all integrations use the upgrade channels instead of hitting
  hardcoded s3 bucket
- makes the version channel return its own version if the target
  version is too high
- makes the NoVersion handler properly: returned as an error. This way
  soneone relying on the version getter doesn't have to check
- moves the version kube-agent-updater lib in main teleport libs
- add tests for noVersion channels
Co-authored-by: Bernard Kim <bernard@goteleport.com>
@hugoShaka hugoShaka force-pushed the hugo/use-default-update-channel branch from bc1c8b9 to 708b1b9 Compare December 18, 2023 19:32
@hugoShaka hugoShaka added this pull request to the merge queue Dec 18, 2023
Merged via the queue into master with commit 3472a60 Dec 18, 2023
@hugoShaka hugoShaka deleted the hugo/use-default-update-channel branch December 18, 2023 20:17
bernardjkim added a commit that referenced this pull request Jan 3, 2024
* Use default upgrade channel

This commit:
- initializes default upgrade channels based on the server features
- makes all integrations use the upgrade channels instead of hitting
  hardcoded s3 bucket
- makes the version channel return its own version if the target
  version is too high
- makes the NoVersion handler properly: returned as an error. This way
  soneone relying on the version getter doesn't have to check
- moves the version kube-agent-updater lib in main teleport libs
- add tests for noVersion channels

* Update lib/web/join_tokens.go

Co-authored-by: Bernard Kim <bernard@goteleport.com>

* address marco's feedback

* address marco's feedback pt.2

---------

Co-authored-by: Bernard Kim <bernard@goteleport.com>
bernardjkim added a commit that referenced this pull request Jan 5, 2024
* Use default upgrade channel

This commit:
- initializes default upgrade channels based on the server features
- makes all integrations use the upgrade channels instead of hitting
  hardcoded s3 bucket
- makes the version channel return its own version if the target
  version is too high
- makes the NoVersion handler properly: returned as an error. This way
  soneone relying on the version getter doesn't have to check
- moves the version kube-agent-updater lib in main teleport libs
- add tests for noVersion channels

* Update lib/web/join_tokens.go

Co-authored-by: Bernard Kim <bernard@goteleport.com>

* address marco's feedback

* address marco's feedback pt.2

---------

Co-authored-by: Bernard Kim <bernard@goteleport.com>
github-merge-queue Bot pushed a commit that referenced this pull request Jan 8, 2024
* Add a version server in the proxy + use it in agent chart (#35150)

This PR adds an embedded [version server](https://goteleport.com/docs/architecture/agent-update-management/#version-server-and-source-of-truth) in the proxy to address: gravitational/cloud#6773

The version server can be configured through `teleport.yaml`:

```yaml
proxy_service:
  enabled: "yes"
  automatic_upgrades_channels:
    stable/cloud:
      forward_url: https://updates.releases.teleport.dev/v1/stable/cloud
    preview/cloud:
      static_version: v12.5.4
```

The forwarded call results are cached for a minute.

* automatic upgrades: use default version channel everywhere (#35342)

* Use default upgrade channel

This commit:
- initializes default upgrade channels based on the server features
- makes all integrations use the upgrade channels instead of hitting
  hardcoded s3 bucket
- makes the version channel return its own version if the target
  version is too high
- makes the NoVersion handler properly: returned as an error. This way
  soneone relying on the version getter doesn't have to check
- moves the version kube-agent-updater lib in main teleport libs
- add tests for noVersion channels

* Update lib/web/join_tokens.go

Co-authored-by: Bernard Kim <bernard@goteleport.com>

* address marco's feedback

* address marco's feedback pt.2

---------

Co-authored-by: Bernard Kim <bernard@goteleport.com>

* Fix teleport.e integrations builds (#35996)

* Move automaticupgrades packages in `lib/automaticupgrades`

* Fix `kube-agent-udpater` Dockerfile

* Write handler config (#35998)

* go mod tidy

* Bump controller-runtime v0.16.3

* Use channel

---------

Co-authored-by: Hugo Shaka <hugo.hervieux@goteleport.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants