kubernetes

package
v0.0.0-...-599887d Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Overview

* Copyright 2023 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KanikoSecurityDefaults

func KanikoSecurityDefaults() *corev1.SecurityContext

Types

type Action

type Action interface {
	log.Injectable
	client.Injectable
	// Name returns user-friendly name for the action
	Name() string

	// CanHandle returns true if the action can handle the build
	CanHandle(build *api.Build) bool

	// Handle executes the handling function
	Handle(ctx context.Context, build *api.Build) (*api.Build, error)
}

type Builder

type Builder interface {
	WithClient(client client.Client) Builder
	CancelBuild() (*api.Build, error)
	Reconcile() (*api.Build, error)
}

func FromBuild

func FromBuild(build *api.Build) Builder

type BuilderInfo

type BuilderInfo struct {
	FinalImageName  string
	BuildUniqueName string
	Platform        api.PlatformBuild
}

type BuilderProperty

type BuilderProperty string
const KanikoCache BuilderProperty = "kaniko-cache"

type Scheduler

type Scheduler interface {
	// WithResource the actual file/resource to add to the builder. Might be called multiple times.
	WithResource(target string, content []byte) Scheduler
	WithClient(client client.Client) Scheduler
	// WithResourceRequirements Kubernetes resource requirements to be passed to the underlying builder if necessary. For example, a builder pod might require specific resources underneath.
	WithResourceRequirements(res corev1.ResourceRequirements) Scheduler
	// WithAdditionalArgs array of strings to pass to the underlying builder. For example "--myarg=myvalue" or "MY_ENV=MY_VALUE". The args are passed separated by spaces.
	WithAdditionalArgs(args []string) Scheduler
	// WithProperty specialized property known by inner implementations for additional properties to configure the underlying builder
	WithProperty(property BuilderProperty, object interface{}) Scheduler
	Schedule() (*api.Build, error)
}

Scheduler provides an interface to add resources and schedule a new build

func NewBuild

func NewBuild(info BuilderInfo) Scheduler

NewBuild is the API entry for the Builder. Create a new Build instance based on PlatformBuild.

Jump to

Keyboard shortcuts

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