Documentation
¶
Index ¶
- Constants
- Variables
- func Add(mgr manager.Manager) error
- type GiteaParameters
- type GiteaTemplateHelper
- type ReconcileGitea
- func (r *ReconcileGitea) CreateResource(cr *integreatlyv1alpha1.Gitea, resourceName string) error
- func (r *ReconcileGitea) GetPostgresReady(cr *integreatlyv1alpha1.Gitea) (bool, error)
- func (r *ReconcileGitea) InstallDatabase(cr *integreatlyv1alpha1.Gitea) (reconcile.Result, error)
- func (r *ReconcileGitea) InstallGitea(cr *integreatlyv1alpha1.Gitea) (reconcile.Result, error)
- func (r *ReconcileGitea) Reconcile(request reconcile.Request) (reconcile.Result, error)
- func (r *ReconcileGitea) UpdatePhase(cr *integreatlyv1alpha1.Gitea, phase int) error
- func (r *ReconcileGitea) WaitForDatabase(cr *integreatlyv1alpha1.Gitea) (reconcile.Result, error)
- type ResourceHelper
Constants ¶
View Source
const ( PhaseInstallDatabase = iota PhaseWaitDatabase PhaseInstallGitea PhaseDone )
View Source
const ( GiteaImage = "docker.io/wkulhanek/gitea" GiteaVersion = "1.6.0" 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"
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 ¶
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
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 (r *ReconcileGitea) InstallGitea(cr *integreatlyv1alpha1.Gitea) (reconcile.Result, error)
func (*ReconcileGitea) Reconcile ¶
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) 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
}
Click to show internal directories.
Click to hide internal directories.