gitea

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PhaseInstallDatabase = iota
	PhaseWaitDatabase
	PhaseInstallGitea
	PhaseDone
)
View Source
const (
	GiteaImage              = "quay.io/integreatly/gitea"
	GiteaVersion            = "1.10.3"
	GiteaConfigMapName      = "gitea-config"
	GiteaDeploymentName     = "gitea"
	GiteaIngressName        = "gitea-ingress"
	GiteaPgDeploymentName   = "postgres"
	GiteaPgPvcName          = "gitea-postgres-pvc"
	GiteaPgServiceName      = "gitea-postgres-service"
	GiteaReposPvcName       = "gitea-repos-pvc"
	GiteaServiceAccountName = "gitea-service-account"
	GiteaServiceName        = "gitea-service"
)
View Source
const ExampleNamespace = "example-namespace"
View Source
const (
	RequeueDelay = time.Second * 30
)

Variables

View Source
var DatabaseAdminPassword = generateToken(10)
View Source
var DatabasePassword = generateToken(10)
View Source
var MockCR = integreatlyv1alpha1.Gitea{
	ObjectMeta: metav1.ObjectMeta{
		Namespace: ExampleNamespace,
	},
	Spec: integreatlyv1alpha1.GiteaSpec{
		Hostname: "gitea.example.com",
	},
}

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Gitea Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

Types

type GiteaParameters

type GiteaParameters struct {
	// Resource names
	GiteaConfigMapName      string
	GiteaDeploymentName     string
	GiteaIngressName        string
	GiteaPgDeploymentName   string
	GiteaPgPvcName          string
	GiteaPgServiceName      string
	GiteaReposPvcName       string
	GiteaServiceAccountName string
	GiteaServiceName        string

	// Resource properties
	ApplicationNamespace   string
	ApplicationName        string
	Hostname               string
	DatabaseUser           string
	DatabasePassword       string
	DatabaseAdminPassword  string
	DatabaseName           string
	DatabaseMaxConnections string
	DatabaseSharedBuffers  string
	InstallLock            bool
	GiteaInternalToken     string
	GiteaSecretKey         string
	GiteaImage             string
	GiteaVersion           string
	GiteaVolumeCapacity    string
	DbVolumeCapacity       string
}

type GiteaTemplateHelper

type GiteaTemplateHelper struct {
	Parameters   GiteaParameters
	TemplatePath string
}

type ReconcileGitea

type ReconcileGitea struct {
	// contains filtered or unexported fields
}

ReconcileGitea reconciles a Gitea object

func (*ReconcileGitea) CreateResource

func (r *ReconcileGitea) CreateResource(cr *integreatlyv1alpha1.Gitea, resourceName string) error

Creates a generic kubernetes resource from a templates

func (*ReconcileGitea) GetPostgresReady

func (r *ReconcileGitea) GetPostgresReady(cr *integreatlyv1alpha1.Gitea) (bool, error)

func (*ReconcileGitea) InstallDatabase

func (r *ReconcileGitea) InstallDatabase(cr *integreatlyv1alpha1.Gitea) (reconcile.Result, error)

func (*ReconcileGitea) InstallGitea

func (*ReconcileGitea) Reconcile

func (r *ReconcileGitea) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile reads that state of the cluster for a Gitea object and makes changes based on the state read and what is in the Gitea.Spec Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*ReconcileGitea) UpdateGitea added in v0.0.5

Creates a generic kubernetes resource from a templates

func (*ReconcileGitea) UpdatePhase

func (r *ReconcileGitea) UpdatePhase(cr *integreatlyv1alpha1.Gitea, phase int) error

func (*ReconcileGitea) WaitForDatabase

func (r *ReconcileGitea) WaitForDatabase(cr *integreatlyv1alpha1.Gitea) (reconcile.Result, error)

type ResourceHelper

type ResourceHelper struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL