Agones Platform Operator
wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/operator-sdk/latest/operator-sdk-linux-x86_64.tar.gz
tar -xzf operator-sdk-linux-x86_64.tar.gz
cp x86_64/operator-sdk /usr/local/bin/
mkdir agones-operator
cd agones-operator
operator-sdk init --plugins helm --domain agones.dev
operator-sdk create api --helm-chart=agones --helm-chart-repo=https://agones.dev/chart/stable
It's okay to ignore the warnings.
.
├── config
│ ├── crd
│ │ ├── bases
│ │ │ └── charts.agones.dev_agones.yaml
│ │ └── kustomization.yaml
│ ├── default
│ │ ├── kustomization.yaml
│ │ ├── manager_auth_proxy_patch.yaml
│ │ └── manager_config_patch.yaml
│ ├── manager
│ │ ├── kustomization.yaml
│ │ └── manager.yaml
│ ├── manifests
│ │ └── kustomization.yaml
│ ├── prometheus
│ │ ├── kustomization.yaml
│ │ └── monitor.yaml
│ ├── rbac
│ │ ├── agones_editor_role.yaml
│ │ ├── agones_viewer_role.yaml
│ │ ├── auth_proxy_client_clusterrole.yaml
│ │ ├── auth_proxy_role_binding.yaml
│ │ ├── auth_proxy_role.yaml
│ │ ├── auth_proxy_service.yaml
│ │ ├── kustomization.yaml
│ │ ├── leader_election_role_binding.yaml
│ │ ├── leader_election_role.yaml
│ │ ├── role_binding.yaml
│ │ ├── role.yaml
│ │ └── service_account.yaml
│ ├── samples
│ │ ├── charts_v1alpha1_agones.yaml
│ │ └── kustomization.yaml
│ └── scorecard
│ ├── bases
│ │ └── config.yaml
│ ├── kustomization.yaml
│ └── patches
│ ├── basic.config.yaml
│ └── olm.config.yaml
├── Dockerfile
├── helm-charts
│ └── agones
│ ├── certs
│ │ ├── allocator
│ │ │ ├── client-ca
│ │ │ │ └── ca.crt
│ │ │ ├── server.crt
│ │ │ └── server.key
│ │ ├── cert.sh
│ │ ├── server.crt
│ │ └── server.key
│ ├── Chart.yaml
│ ├── defaultfeaturegates.yaml
│ ├── README.md
│ ├── scripts
│ │ └── delete_agones_resources.sh
│ ├── templates
│ │ ├── controller.yaml
│ │ ├── crds
│ │ │ ├── fleetautoscaler.yaml
│ │ │ ├── fleet.yaml
│ │ │ ├── gameserverallocationpolicy.yaml
│ │ │ ├── gameserverset.yaml
│ │ │ ├── _gameserverspecschema.yaml
│ │ │ ├── _gameserverstatus.yaml
│ │ │ ├── gameserver.yaml
│ │ │ └── k8s
│ │ │ ├── _io.k8s.api.core.v1.PodTemplateSpec.yaml
│ │ │ └── _io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.yaml
│ │ ├── extensions-deployment.yaml
│ │ ├── extensions.yaml
│ │ ├── _helpers.tpl
│ │ ├── hooks
│ │ │ ├── pre_delete_hook.yaml
│ │ │ ├── sa.yaml
│ │ │ └── scripts.yaml
│ │ ├── NOTES.txt
│ │ ├── pdb.yaml
│ │ ├── ping.yaml
│ │ ├── priority-class.yaml
│ │ ├── service
│ │ │ └── allocation.yaml
│ │ ├── serviceaccounts
│ │ │ ├── controller.yaml
│ │ │ └── sdk.yaml
│ │ ├── service-monitor.yaml
│ │ ├── service.yaml
│ │ └── tests
│ │ └── test-runner.yaml
│ └── values.yaml
├── Makefile
├── PROJECT
└── watches.yaml
Things to note:
- If you're a podman user you may need to do a
dnf install podman-docker
before building. - You may need to login to registry.redhat.io to pull the
registry.redhat.io/openshift4/ose-helm-operator
image. If you do not already have a login you can sign up for one on Red Hat Developer for free.
Example:
make docker-build docker-push IMG=quay.io/agones-operator/agones:v1.32.0
Bundle the operator for use with Operator Lifecycle Manager (OLM)
make bundle IMG=quay.io/agones-operator/agones:v1.32.0
Fill in all the details. The output should be a bundle
directory with the following contents
bundle
├── manifests
│ ├── agones-operator.clusterserviceversion.yaml
│ ├── agones-operator-controller-manager-metrics-service_v1_service.yaml
│ ├── agones-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml
│ └── charts.agones.dev_agones.yaml
├── metadata
│ └── annotations.yaml
└── tests
└── scorecard
└── config.yaml
Example:
make bundle-build BUNDLE_IMG=quay.io/agones-operator/agones-operator:v1.32.0
podman push quay.io/agones-operator/agones-operator:v1.32.0
operator-sdk run bundle -n agones-system quay.io/agones-operator/agones-operator:v1.32.0
The output should look like this:
INFO[0004] Creating a File-Based Catalog of the bundle "quay.io/agones-operator/agones-operator:v1.32.0"
INFO[0005] Generated a valid File-Based Catalog
INFO[0007] Created registry pod: quay-io-agones-operator-agones-operator-v1-30-0
INFO[0007] Created CatalogSource: agones-operator-catalog
INFO[0007] OperatorGroup "operator-sdk-og" created
INFO[0007] Created Subscription: agones-operator-v0-0-1-sub
INFO[0009] Approved InstallPlan install-flkhj for the Subscription: agones-operator-v0-0-1-sub
INFO[0009] Waiting for ClusterServiceVersion "agones-system/agones-operator.v0.0.1" to reach 'Succeeded' phase
INFO[0009] Waiting for ClusterServiceVersion "agones-system/agones-operator.v0.0.1" to appear
INFO[0021] Found ClusterServiceVersion "agones-system/agones-operator.v0.0.1" phase: Pending
INFO[0023] Found ClusterServiceVersion "agones-system/agones-operator.v0.0.1" phase: InstallReady
INFO[0024] Found ClusterServiceVersion "agones-system/agones-operator.v0.0.1" phase: Installing
INFO[0034] Found ClusterServiceVersion "agones-system/agones-operator.v0.0.1" phase: Succeeded
INFO[0034] OLM has successfully installed "agones-operator.v0.0.1"