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) UpdateGitea(cr *integreatlyv1alpha1.Gitea) (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 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 GiteaAdminPassword = generateToken(10)
View Source
var MockCR = integreatlyv1alpha1.Gitea{ ObjectMeta: metav1.ObjectMeta{ Namespace: ExampleNamespace, }, Spec: integreatlyv1alpha1.GiteaSpec{ Hostname: "gitea.example.com", }, }
View Source
var Templates = []string{
GiteaServiceAccountName,
GiteaConfigName,
GiteaPgPvcName,
GiteaReposPvcName,
GiteaDeploymentName,
GiteaIngressName,
GiteaServiceName,
GiteaPgDeploymentName,
GiteaPgServiceName,
}
Functions ¶
Types ¶
type GiteaParameters ¶
type GiteaParameters struct { // Resource names GiteaConfigName string GiteaDeploymentName string GiteaIngressName string GiteaPgDeploymentName string GiteaPgPvcName string GiteaPgServiceName string GiteaReposPvcName string GiteaServiceAccountName string GiteaServiceName string GiteaServiceSshName string // added by TB GiteaInitSecretName string GiteaAdminSecretName string GiteaAdminPassword 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) UpdateGitea ¶ added in v0.0.5
func (r *ReconcileGitea) UpdateGitea(cr *integreatlyv1alpha1.Gitea) (reconcile.Result, error)
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
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.