resources

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package resources contains Kubernetes resources required by Jenkins

Index

Constants

View Source
const (
	// OperatorUserName defines username for Jenkins API calls
	OperatorUserName = "jenkins-operator"
	// OperatorCredentialsSecretUserNameKey defines key of username in operator credentials secret
	OperatorCredentialsSecretUserNameKey = "user"
	// OperatorCredentialsSecretPasswordKey defines key of password in operator credentials secret
	OperatorCredentialsSecretPasswordKey = "password"
	// OperatorCredentialsSecretTokenKey defines key of token in operator credentials secret
	OperatorCredentialsSecretTokenKey = "token"
	// OperatorCredentialsSecretTokenCreationKey defines key of token creation time in operator credentials secret
	OperatorCredentialsSecretTokenCreationKey = "tokenCreationTime"
)
View Source
const (

	// JenkinsBaseConfigurationVolumePath is a path where are groovy scripts used to configure Jenkins
	// this scripts are provided by jenkins-operator
	JenkinsBaseConfigurationVolumePath = "/var/jenkins/base-configuration"

	// JenkinsUserConfigurationVolumePath is a path where are groovy scripts used to configure Jenkins
	// this scripts are provided by user
	JenkinsUserConfigurationVolumePath = "/var/jenkins/user-configuration"

	// HTTPPortInt defines Jenkins master HTTP port
	HTTPPortInt = 8080
)

Variables

This section is empty.

Functions

func BuildLabelsForWatchedResources added in v0.0.4

func BuildLabelsForWatchedResources(jenkins *v1alpha1.Jenkins) map[string]string

BuildLabelsForWatchedResources returns labels for Kubernetes resources which operator want to watch resources with that labels should not be deleted after Jenkins CR deletion, to prevent this situation don't set any owner

func BuildResourceLabels

func BuildResourceLabels(jenkins *v1alpha1.Jenkins) map[string]string

BuildResourceLabels returns labels for all Kubernetes resources created by operator

func GetBaseConfigurationConfigMapName

func GetBaseConfigurationConfigMapName(jenkins *v1alpha1.Jenkins) string

GetBaseConfigurationConfigMapName returns name of Kubernetes config map used to base configuration

func GetInitConfigurationConfigMapName

func GetInitConfigurationConfigMapName(jenkins *v1alpha1.Jenkins) string

GetInitConfigurationConfigMapName returns name of Kubernetes config map used to init configuration

func GetOperatorCredentialsSecretName

func GetOperatorCredentialsSecretName(jenkins *v1alpha1.Jenkins) string

GetOperatorCredentialsSecretName returns name of Kubernetes secret used to store jenkins operator credentials to allow calls to Jenkins API

func GetResourceName

func GetResourceName(jenkins *v1alpha1.Jenkins) string

GetResourceName returns name of Kubernetes resource base on Jenkins CR

func GetUserConfigurationConfigMapName

func GetUserConfigurationConfigMapName(jenkins *v1alpha1.Jenkins) string

GetUserConfigurationConfigMapName returns name of Kubernetes config map used to user configuration

func NewBaseConfigurationConfigMap

func NewBaseConfigurationConfigMap(meta metav1.ObjectMeta, jenkins *v1alpha1.Jenkins) *corev1.ConfigMap

NewBaseConfigurationConfigMap builds Kubernetes config map used to base configuration

func NewInitConfigurationConfigMap

func NewInitConfigurationConfigMap(meta metav1.ObjectMeta, jenkins *v1alpha1.Jenkins) (*corev1.ConfigMap, error)

NewInitConfigurationConfigMap builds Kubernetes config map used to init configuration

func NewJenkinsMasterPod

func NewJenkinsMasterPod(objectMeta metav1.ObjectMeta, jenkins *v1alpha1.Jenkins) *corev1.Pod

NewJenkinsMasterPod builds Jenkins Master Kubernetes Pod resource

func NewOperatorCredentialsSecret

func NewOperatorCredentialsSecret(meta metav1.ObjectMeta, jenkins *v1alpha1.Jenkins) *corev1.Secret

NewOperatorCredentialsSecret builds the Kubernetes secret used to store jenkins operator credentials to allow calls to Jenkins API

func NewResourceObjectMeta

func NewResourceObjectMeta(jenkins *v1alpha1.Jenkins) metav1.ObjectMeta

NewResourceObjectMeta builds ObjectMeta for all Kubernetes resources created by operator

func NewRole

func NewRole(meta metav1.ObjectMeta) *v1.Role

NewRole returns rbac role for jenkins master

func NewRoleBinding

func NewRoleBinding(meta metav1.ObjectMeta) *v1.RoleBinding

NewRoleBinding returns rbac role binding for jenkins master

func NewScriptsConfigMap

func NewScriptsConfigMap(meta metav1.ObjectMeta, jenkins *v1alpha1.Jenkins) (*corev1.ConfigMap, error)

NewScriptsConfigMap builds Kubernetes config map used to store scripts

func NewService

func NewService(meta metav1.ObjectMeta, minikube bool) *corev1.Service

NewService builds the Kubernetes service resource

func NewServiceAccount

func NewServiceAccount(meta metav1.ObjectMeta) *v1.ServiceAccount

NewServiceAccount return kubernetes service account

func NewUserConfigurationConfigMap

func NewUserConfigurationConfigMap(jenkins *v1alpha1.Jenkins) *corev1.ConfigMap

NewUserConfigurationConfigMap builds Kubernetes config map used to user configuration

Types

This section is empty.

Jump to

Keyboard shortcuts

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