s2irun

package
v0.0.14 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ConfigDataKey     = "data"
	TaintKey          = "node.kubernetes.io/ci"
	NodeAffinityKey   = "node-role.kubernetes.io/worker"
	NodeAffinityValue = "ci"
)
View Source
const (
	S2iRunBuilderLabel       = "labels.devops.kubesphere.io/builder-name"
	AnnotationBuildResultKey = "s2iBuildResult"
	AnnotationBuildSourceKey = "s2iBuildSource"
	RegularServiceAccount    = "s2irun"
	RegularRoleName          = "s2i-regular-role"
	RegularRoleBinding       = "s2i-regular-rolebinding"
	DefaultRevisionId        = "master"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager) error

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

func GetNewImageName added in v0.0.2

func GetNewImageName(instance *devopsv1alpha1.S2iRun, config devopsv1alpha1.S2iConfig) string

func GetNewRevisionId added in v0.0.12

func GetNewRevisionId(instance *devopsv1alpha1.S2iRun, config devopsv1alpha1.S2iConfig) string

func GetNewSourceURL added in v0.0.12

func GetNewSourceURL(instance *devopsv1alpha1.S2iRun, config devopsv1alpha1.S2iConfig) string

Types

type ReconcileS2iRun

type ReconcileS2iRun struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileS2iRun reconciles a S2iRun object

func (*ReconcileS2iRun) GenerateNewJob

func (r *ReconcileS2iRun) GenerateNewJob(instance *devopsv1alpha1.S2iRun) (*batchv1.Job, error)

func (*ReconcileS2iRun) GetLogURL added in v0.0.2

func (r *ReconcileS2iRun) GetLogURL(job *batchv1.Job) (string, error)

func (*ReconcileS2iRun) NewConfigMap

func (*ReconcileS2iRun) NewRegularRole added in v0.0.13

func (r *ReconcileS2iRun) NewRegularRole(roleName, namespace string) *v1.Role

func (*ReconcileS2iRun) NewRoleBinding added in v0.0.13

func (r *ReconcileS2iRun) NewRoleBinding(name, roleName, saName, namespace string) *v1.RoleBinding

func (*ReconcileS2iRun) NewServiceAccount added in v0.0.13

func (r *ReconcileS2iRun) NewServiceAccount(saName string, namespace string) *corev1.ServiceAccount

func (*ReconcileS2iRun) Reconcile

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

+kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=devops.kubesphere.io,resources=s2iruns,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=devops.kubesphere.io,resources=s2iruns/status,verbs=get;update;patch +kubebuilder:rbac:groups=devops.kubesphere.io,resources=s2ibuildertemplates,verbs=get;list;watch +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;update;patch +kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;watch;create;update;patch +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch +kubebuilder:rbac:groups=extensions,resources=deployments,verbs=get;list;watch;create;update;patch +kubebuilder:rbac:groups=core,resources=secrets,verbs=get +kubebuilder:rbac:groups=core,resources=serviceaccounts,verbs=get;list;watch;create +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=rolebindings,verbs=get;list;watch;create +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles,verbs=get;list;watch;create +kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;list;watch

func (*ReconcileS2iRun) ScaleWorkLoads added in v0.0.2

func (r *ReconcileS2iRun) ScaleWorkLoads(instance *devopsv1alpha1.S2iRun, builder *devopsv1alpha1.S2iBuilder) error

ScaleWorkLoads will auto scale workloads define in s2ibuilder's annotations

Jump to

Keyboard shortcuts

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