-
Notifications
You must be signed in to change notification settings - Fork 858
Description
Is your feature request related to a problem? Please describe.
There is lots of confusion on the best path for how to make changes to simple game server in a safe way.
Describe the solution you'd like
Make the ImagePullPolicy a variable, so it can easily be set to Always
:
Variables:
agones/test/e2e/framework/framework.go
Lines 152 to 169 in bff72b1
viper.SetDefault(kubeconfigFlag, filepath.Join(usr.HomeDir, ".kube", "config")) | |
viper.SetDefault(gsimageFlag, "us-docker.pkg.dev/agones-images/examples/simple-game-server:0.32") | |
viper.SetDefault(pullSecretFlag, "") | |
viper.SetDefault(stressTestLevelFlag, 0) | |
viper.SetDefault(perfOutputDirFlag, "") | |
viper.SetDefault(versionFlag, "") | |
viper.SetDefault(runtime.FeatureGateFlag, "") | |
viper.SetDefault(namespaceFlag, "") | |
viper.SetDefault(cloudProductFlag, "generic") | |
pflag.String(kubeconfigFlag, viper.GetString(kubeconfigFlag), "kube config path, e.g. $HOME/.kube/config") | |
pflag.String(gsimageFlag, viper.GetString(gsimageFlag), "gameserver image to use for those tests") | |
pflag.String(pullSecretFlag, viper.GetString(pullSecretFlag), "optional secret to be used for pulling the gameserver and/or Agones SDK sidecar images") | |
pflag.Int(stressTestLevelFlag, viper.GetInt(stressTestLevelFlag), "enable stress test at given level 0-100") | |
pflag.String(perfOutputDirFlag, viper.GetString(perfOutputDirFlag), "write performance statistics to the specified directory") | |
pflag.String(versionFlag, viper.GetString(versionFlag), "agones controller version to be tested, consists of release version plus a short hash of the latest commit") | |
pflag.String(namespaceFlag, viper.GetString(namespaceFlag), "namespace is used to isolate test runs to their own namespaces") | |
pflag.String(cloudProductFlag, viper.GetString(cloudProductFlag), "cloud product of cluster references by kubeconfig; defaults to 'generic'; options are 'generic', 'gke-autopilot'") |
Line:
agones/test/e2e/framework/framework.go
Line 802 in bff72b1
ImagePullPolicy: corev1.PullIfNotPresent, |
Write a new section in https://github.com/googleforgames/agones/blob/main/build/README.md#testing-and-building called "Making changes to Simple Game Server with e2e Tests", with the following documentation:
- How to create your own local image for Simple Game Server, and point to https://github.com/googleforgames/agones/blob/main/build/README.md#running-individual-end-to-end-tests for beginning of making changes.
- For moving to CI - set the image tag to a
0.xx-dev
tag (so-dev
with the version number), andimagePullPolicy
toAlways
, and create a draft PR. - With this approach the developer (or maintainer who is helping) can publish the
-dev
version multiple times without polluting the production version space, can can fix issues with CI's help without any risk. - Once CI is passing and review has occured, the PR can be edited to remove the
-dev
tag, moveimagePullPolicy
back toIfNotPresent
, and the production version0.xx
can be published -- and the PR merged. - The
-dev
can also be manually cleaned up if required as well.
Describe alternatives you've considered
Rather than a -dev
suffix, we could guide people to use the us-docker.pkg.dev/agones-images/ci
repository, that will have a 40 day cleanup rule (eventually - I need to check the audit logs for some previous cleanup work), so no manual cleanup step is required.
So, for example - us-docker.pkg.dev/agones-images/examples/simple-game-server:0.32
would become us-docker.pkg.dev/agones-images/ci/simple-game-server:0.32
I think I like this better - but would like consensus.
Additional context
N/A