jenkins

package
v0.0.0-...-530e6f3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
	JenkinsAppLabelName    = "app"
	JenkinsWebPortName     = "web"
	JenkinsWebPortProtocol = corev1.ProtocolTCP
	JenkinsWebPort         = 80
	JenkinsWebPortAsInt    = 8080
	JenkinsWebPortAsStr    = "8080"

	JenkinsAgentPortName     = "agent"
	JenkinsAgentPortProtocol = corev1.ProtocolTCP
	JenkinsAgentPort         = 50000
	JenkinsAgentPortAsInt    = 50000
	JenkinsAgentPortAsStr    = "50000"

	JenkinsServiceName       = "jenkins"
	JenkinsJNLPServiceName   = "jenkins-jnlp"
	JenkinsJnlpServiceSuffix = "-jnlp"
	JenkinsImage             = "image-registry.openshift-image-registry.svc:5000/openshift/jenkins"
	JenkinsContainerName     = "jenkins"
	JenkinsContainerMemory   = "1Gi"
	JenkinsAppLabel          = "app"
	JenkinsNameLabel         = "name"

	JenkinsPvcName         = "jenkins"
	JenkinsPvcDefaultSize  = "1Gi"
	JenkinsVolumeName      = "jenkins-data"
	JenkinsVolumeMountPath = "/var/lib/jenkins"
)
View Source
const JenkinsControllerName = "jenkins-controller"

Variables

View Source
var (
	JenkinsInstanceName = ""
)

Functions

func Add

func Add(mgr manager.Manager) error

Add creates a new Jenkins 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 ControlledResources

type ControlledResources struct {
	JenkinsInstance       *jenkinsv1alpha1.Jenkins
	DeploymentConfig      *appsv1.DeploymentConfig
	Deployment            *kappsv1.Deployment
	ImageStream           *imagev1.ImageStream
	JenkinsService        *corev1.Service
	JNLPService           *corev1.Service
	Volume                *corev1.Volume
	PersistentVolumeClaim *corev1.PersistentVolumeClaim `json:",omitempty" bson:",omitempty"`
	Route                 *routev1.Route
	RoleBinding           *rbacv1.RoleBinding
	ServiceAccount        *corev1.ServiceAccount
}

type JenkinsReconciler

type JenkinsReconciler struct {
	// This client, initialized using mgr.Client() above, is a split client
	// that reads objects from the cache and writes to the apiserver
	Client               client.Client
	Scheme               *runtime.Scheme
	Result               reconcile.Result
	Request              reconcile.Request
	ControlledRescources ControlledResources
	Messages             common.Messages
}

ReconcileJenkins reconciles a Jenkins object

func (*JenkinsReconciler) Reconcile

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

Reconciliation && Requeing Requests : Works on matching the current state of the resources to the expected state The Controller will requeue the Request to be processed again if the returned error is non-nil

Jump to

Keyboard shortcuts

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