Documentation ¶
Index ¶
- func AddBuildOptions(cmd *cobra.Command, bo *BuildOptions)
- func AddFileArg(cmd *cobra.Command, fo *FilenameOptions)
- func AddPublishArg(cmd *cobra.Command, po *PublishOptions)
- func AddSelectorArg(cmd *cobra.Command, so *SelectorOptions)
- func EnumerateFiles(fo *FilenameOptions) chan string
- func MakeNamer(po *PublishOptions) publish.Namer
- func Validate(po *PublishOptions, bo *BuildOptions) error
- type BuildOptions
- type FilenameOptions
- type PublishOptions
- type SelectorOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBuildOptions ¶
func AddBuildOptions(cmd *cobra.Command, bo *BuildOptions)
func AddFileArg ¶
func AddFileArg(cmd *cobra.Command, fo *FilenameOptions)
func AddPublishArg ¶ added in v0.4.0
func AddPublishArg(cmd *cobra.Command, po *PublishOptions)
func AddSelectorArg ¶
func AddSelectorArg(cmd *cobra.Command, so *SelectorOptions)
func EnumerateFiles ¶
func EnumerateFiles(fo *FilenameOptions) chan string
Based heavily on pkg/kubectl
func MakeNamer ¶
func MakeNamer(po *PublishOptions) publish.Namer
func Validate ¶ added in v0.11.0
func Validate(po *PublishOptions, bo *BuildOptions) error
Types ¶
type BuildOptions ¶
type BuildOptions struct { // BaseImage enables setting the default base image programmatically. // If non-empty, this takes precedence over the value in `.ko.yaml`. BaseImage string // BaseImageOverrides stores base image overrides for import paths. BaseImageOverrides map[string]string // DefaultPlatforms defines the default platforms when Platforms is not explicitly defined DefaultPlatforms []string // DefaultEnv defines the default environment when per-build value is not explicitly defined. DefaultEnv []string // DefaultFlags defines the default flags when per-build value is not explicitly defined. DefaultFlags []string // DefaultLdflags defines the default ldflags when per-build value is not explicitly defined. DefaultLdflags []string // WorkingDirectory allows for setting the working directory for invocations of the `go` tool. // Empty string means the current working directory. WorkingDirectory string ConcurrentBuilds int DisableOptimizations bool SBOM string SBOMDir string Platforms []string Labels []string Annotations []string User string Debug bool // UserAgent enables overriding the default value of the `User-Agent` HTTP // request header used when retrieving the base image. UserAgent string InsecureRegistry bool // Trimpath controls whether ko adds the `-trimpath` flag to `go build` by default. // The `-trimpath` flags aids in achieving reproducible builds, but it removes path information that is useful for interactive debugging. // Set this field to `false` and `DisableOptimizations` to `true` if you want to interactively debug the binary in the resulting image. // `AddBuildOptions()` defaults this field to `true`. Trimpath bool // BuildConfigs stores the per-image build config from `.ko.yaml`. BuildConfigs map[string]build.Config }
BuildOptions represents options for the ko builder.
func (*BuildOptions) LoadConfig ¶ added in v0.10.0
func (bo *BuildOptions) LoadConfig() error
LoadConfig reads build configuration from defaults, environment variables, and the `.ko.yaml` config file.
type FilenameOptions ¶
FilenameOptions is from pkg/kubectl.
type PublishOptions ¶
type PublishOptions struct { // DockerRepo configures the destination image repository. // In normal ko usage, this is populated with the value of $KO_DOCKER_REPO. DockerRepo string // LocalDomain overrides the default domain for images loaded into the local Docker daemon. Use with Local=true. LocalDomain string // UserAgent enables overriding the default value of the `User-Agent` HTTP // request header used when pushing the built image to an image registry. UserAgent string // DockerClient enables overriding the default docker client when embedding // ko as a module in other tools. // If left as the zero value, ko uses github.com/docker/docker/client.FromEnv DockerClient daemon.Client Tags []string // TagOnly resolves images into tag-only references. TagOnly bool // Push publishes images to a registry. Push bool // Local publishes images to a local docker daemon. Local bool InsecureRegistry bool OCILayoutPath string TarballFile string ImageRefsFile string // PreserveImportPaths preserves the full import path after KO_DOCKER_REPO. PreserveImportPaths bool // BaseImportPaths uses the base path without MD5 hash after KO_DOCKER_REPO. BaseImportPaths bool // Bare uses a tag on the KO_DOCKER_REPO without anything additional. Bare bool // ImageNamer can be used to pass a custom image name function. When given // PreserveImportPaths, BaseImportPaths, Bare has no effect. ImageNamer publish.Namer Jobs int }
PublishOptions encapsulates options when publishing.
type SelectorOptions ¶
type SelectorOptions struct {
Selector string
}
SelectorOptions allows selecting objects from the input manifests by label
Click to show internal directories.
Click to hide internal directories.