Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Documentation/Installation page on old releases shows an incorrect Kubernetes version #2279

Closed
roberthbailey opened this issue Sep 28, 2021 · 8 comments · Fixed by #2914
Labels
area/site The website itself - including redirects, styling, search, etc help wanted We would love help on these issues. Please come help us! kind/bug These are bugs.
Milestone

Comments

@roberthbailey
Copy link
Member

What happened:

During a recent community meeting someone asked the best way to tell which version of Kubernetes is supported by each Agones release. @markmandel suggested looking at the older releases of the website, specifically the https://agones.dev/site/docs/installation/ page, to see what version they suggest.

However, I just checked a few old versions and noticed that they are showing the wrong version of Kubernetes!

From the blog releases, we can see that:

  • 1.13.0 added support for Kubernetes 1.18
  • 1.16.0 added support for Kubernetes 1.19
  • 1.17.0 added support for Kubernetes 1.20

However, if you look at the Install documentation for these releases, we see a different story:

  • 1.12.0 says to use Kubernetes 1.18 (should be 1.17)
  • 1.13.0 says to use Kubernetes 1.18 (correct)
  • 1.14.0 says to use Kubernetes 1.18 (correct)
  • 1.15.0 says to use Kubernetes 1.19 (should be 1.18)
  • 1.16.0 says to use Kubernetes 1.20 (should be 1.19)

What you expected to happen:

I expect that the website for an old release shows the correct Kubernetes version to install for that release.

@roberthbailey roberthbailey added kind/bug These are bugs. area/site The website itself - including redirects, styling, search, etc help wanted We would love help on these issues. Please come help us! labels Sep 28, 2021
@markmandel
Copy link
Member

markmandel commented Sep 29, 2021

Huh! That's super wierd!

🤔 I wonder if it's publishing the dev version of the site, which is showing the next supported version.

uuugh - yeah it is: https://github.com/googleforgames/agones/blob/main/site/layouts/shortcodes/k8s-version.html

So we don't publish with env HUGO_ENV=production so we don't have duplicate content on search engines (dev content is set to not be indexable). (This is a docsy setting, which I think changed recently)

A few thoughts:

  1. May be worth updating hugo and docsy with a fix and catch up with the breaking change. But it's not neccessary.
  2. Could include a new env var that could be an or statement equivalent of: {{- if or (eq (getenv "HUGO_ENV") "production") (eq (getenv "HUGO_ENV") "snapshot") }} (as an idea) and replace all the conditionals, and also update the release checklist to set this env var as part of the command.

@roberthbailey
Copy link
Member Author

I'm not sure I understand option 1. If we update hugo / docsy are you saying that will fix this for us?

Also, I don't think either option will fix the old releases pages, right? This seems like a good reason to tackle #2237 (and we can add a note/warning that the old release docs may show an incorrect version).

@markmandel
Copy link
Member

I'm not sure I understand option 1. If we update hugo / docsy are you saying that will fix this for us?

Not separate options, just separate thoughts. Basically that if we are going to make a change, we may want to upgrade the tooling now as we will have to do it later. Not a fix, just saying the work streams might align, but it's not neccessary.

Also, won't fix previous versions - would need to backport the change to release branches and then redeploy.

@markmandel
Copy link
Member

Adding some extra notes here for reference:

@igooch
Copy link
Collaborator

igooch commented Nov 23, 2022

Agones Version Kubernetes Version (release blog) Kubernetes Version (installation docs)
1.27 1.23 1.23
1.26 1.23 1.23
1.25 1.22 1.22
1.24 1.22 1.22
1.23 1.22 1.22
1.22 1.21 1.22
1.21 1.21 1.21
1.20 1.21 1.21
1.19 1.21 1.21
1.18 1.20 1.21
1.17 1.20 1.20
1.16 1.19 1.20
1.15 1.18 1.19
1.14 1.18 1.18
1.13 1.18 1.18
1.12 1.17 1.18
1.11 1.17 1.17
1.10 1.16 1.17
1.9 1.16 1.16
1.8 1.15 1.15
1.7 1.15 1.15
1.6 1.15 1.15
1.5 1.14 1.15
1.4 1.14 1.14
1.3 1.13 1.13
1.2 1.13 1.13
1.1 1.12 1.12
1.0 1.12 1.12

Incorrect installation documentation under the release specific website are in bold. The non-matching Agones versions are: 1.22, 1.18, 1.16, 1.15, 1.12, 1.10, 1.5.

There are a few exceptions to the pattern where it's publishing the next-supported version of Kubernetes. Pattern exceptions: Agones versions 1.25, 1.8, 1.3, 1.1.

@markmandel
Copy link
Member

I am wondering if #2808 will help here, since @mangalpalli has already done the work to subtract a minor version from the current version -- we could pass that through as the version to actually be reported.

@igooch
Copy link
Collaborator

igooch commented Dec 5, 2022

So we don't publish with env HUGO_ENV=production so we don't have duplicate content on search engines (dev content is set to not be indexable). (This is a docsy setting, which I think changed recently)

Based on the docsy link you listed, it looks like production is the default environment for hugo. I don't see that we're passing any other environment to hugo, unless I'm missing something?

@markmandel
Copy link
Member

Based on the docsy link you listed, it looks like production is the default environment for hugo. I don't see that we're passing any other environment to hugo, unless I'm missing something?

No, we don't pass anything else through - my suggestion in #2279 (comment) would be to pass a different env values to HUGO_ENV and update the k8s-version.html shortcode to act on it.

We do now have a specific Make target to be used specifically at release time:

# Deploys the site by taking in the base version and deploying the previous version
release-deploy-site: $(ensure-build-image)
release-deploy-site: DOCKER_RUN_ARGS += -e GOFLAGS="-mod=mod" --entrypoint=/usr/local/go/bin/go
release-deploy-site:
version=$$($(DOCKER_RUN) run $(mount_path)/build/scripts/previousversion/main.go -version $(base_version)) && \
echo "Deploying Site Version: $$version" && \
$(MAKE) site-deploy SERVICE=$$version

So we could add this new variable / value in there and it would get passed all the way through.

This is the cloudbuild script that pushes to production for the canonical production version of the website:

- name: "make-docker" # build production version of the site
dir: "build"
args: ["site-static", "site-gen-app-yaml", "ENV=HUGO_ENV=production"]
- name: "gcr.io/cloud-builders/gcloud" # deploy the website
dir: "site"
args: ["app", "deploy", ".app.yaml", "--promote", "--version=$SHORT_SHA"]
env:
- GOPATH=/workspace/go
- GO111MODULE=on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/site The website itself - including redirects, styling, search, etc help wanted We would love help on these issues. Please come help us! kind/bug These are bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants