Project Info | |
---|---|
License: | Apache License, Version 2.0 |
IRC | #integreatly channel in the freenode network. |
An Operator that installs Gitea. Installation is performed by creating a custom resource of kind Gitea
. You can uninstall Gitea by removing this resource.
The Operator will also watch all Gitea resources and reinstall them if they are deleted.
First we need to create a Service Account, Role and Role Binding in order to grant the required permissions to the Operator. The install
target of the Makefile will take care of this. Make sure you are logged in with a user that has permission to create those resources.
$ oc login -u system:admin
$ ORG=<registry url> make build
$ ORG=<registry url> make push
$ make install
Then review deploy/operator.yaml
and update the image url to your preferred registry and deploy it:
$ make deploy
Verify the Operator is running by opening the gitea
namespace. You should see a Pod with the name gitea-operator
.
Instead of pulling the operator image from a registry and installing it in your namespace you can also run the Operator locally. This is especially useful for development:
$ oc login -u system:admin
$ make install
$ make run
Create a custom resource of type Gitea
with the following spec:
apiVersion: integreatly.org/v1alpha1
kind: Gitea
metadata:
name: example-gitea
spec:
hostname: <gitea.apps.CLUSTER_URL>
An example can be found under deploy/cr.yaml
Start the installation with
$ oc create -f <path to your CR>