Documentation
¶
Overview ¶
Package kptfileapi contains Kptfile API types.
TEMPORARY COPY: These types are copied from github.com/kptdev/kpt/pkg/api/kptfile/v1 to break a circular dependency (SDK depends on kpt, kpt depends on SDK).
TARGET: Replace this package with an import from a central API repo (e.g. github.com/kptdev/api) once that repo is created.
Index ¶
- Constants
- Variables
- func KptFileGVK() schema.GroupVersionKind
- type Condition
- type ConditionStatus
- type FieldRef
- type FileRef
- type Function
- type GenericLock
- type Git
- type GitLock
- type Inventory
- type KptFile
- type Locator
- type OriginType
- type PackageInfo
- type Pipeline
- type PipelineStepResult
- type ReadinessGate
- type RenderStatus
- type ResourceRef
- type ResultItem
- type Selector
- type Status
- type UpdateStrategyType
- type Upstream
Constants ¶
View Source
const ( KptFileName = "Kptfile" RevisionMetaDataFileName = ".KptRevisionMetadata" RevisionMetaDataKind = "KptRevisionMetadata" KptFileKind = "Kptfile" KptFileGroup = "kpt.dev" KptFileVersion = "v1" KptFileAPIVersion = KptFileGroup + "/" + KptFileVersion )
View Source
const ( ConditionTypeRendered = "Rendered" ReasonRenderSuccess = "RenderSuccess" ReasonRenderFailed = "RenderFailed" )
Variables ¶
View Source
var TypeMeta = yaml.ResourceMeta{ TypeMeta: yaml.TypeMeta{ APIVersion: KptFileAPIVersion, Kind: KptFileKind, }, }
TypeMeta is the TypeMeta for KptFile instances.
Functions ¶
func KptFileGVK ¶
func KptFileGVK() schema.GroupVersionKind
KptFileGVK is the GroupVersionKind of Kptfile objects
Types ¶
type Condition ¶
type Condition struct {
Type string `yaml:"type" json:"type"`
Status ConditionStatus `yaml:"status" json:"status"`
Reason string `yaml:"reason,omitempty" json:"reason,omitempty"`
Message string `yaml:"message,omitempty" json:"message,omitempty"`
}
func NewRenderedCondition ¶
func NewRenderedCondition(status ConditionStatus, reason, message string) Condition
type ConditionStatus ¶
type ConditionStatus string
const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" )
func ToCondition ¶
func ToCondition(value string) ConditionStatus
type Function ¶
type Function struct {
Image string `yaml:"image,omitempty" json:"image,omitempty"`
Exec string `yaml:"exec,omitempty" json:"exec,omitempty"`
ConfigPath string `yaml:"configPath,omitempty" json:"configPath,omitempty"`
ConfigMap map[string]string `yaml:"configMap,omitempty" json:"configMap,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Tag string `yaml:"tag,omitempty" json:"tag,omitempty"`
Selectors []Selector `yaml:"selectors,omitempty" json:"selectors,omitempty"`
Exclusions []Selector `yaml:"exclude,omitempty" json:"exclude,omitempty"`
}
type GenericLock ¶
type Inventory ¶
type Inventory struct {
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
InventoryID string `yaml:"inventoryID,omitempty" json:"inventoryID,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"`
}
type KptFile ¶
type KptFile struct {
yaml.ResourceMeta `yaml:",inline" json:",inline"`
Upstream *Upstream `yaml:"upstream,omitempty" json:"upstream,omitempty"`
UpstreamLock *Locator `yaml:"upstreamLock,omitempty" json:"upstreamLock,omitempty"`
Info *PackageInfo `yaml:"info,omitempty" json:"info,omitempty"`
Pipeline *Pipeline `yaml:"pipeline,omitempty" json:"pipeline,omitempty"`
Inventory *Inventory `yaml:"inventory,omitempty" json:"inventory,omitempty"`
Status *Status `yaml:"status,omitempty" json:"status,omitempty"`
}
KptFile contains information about a package managed with kpt.
type Locator ¶
type Locator struct {
Type OriginType `yaml:"type,omitempty" json:"type,omitempty"`
Git *GitLock `yaml:"git,omitempty" json:"git,omitempty"`
Generic *GenericLock `yaml:"generic,omitempty" json:"generic,omitempty"`
}
type OriginType ¶
type OriginType string
const ( GitOrigin OriginType = "git" GenericOrigin OriginType = "generic" )
type PackageInfo ¶
type PackageInfo struct {
Site string `yaml:"site,omitempty" json:"site,omitempty"`
Emails []string `yaml:"emails,omitempty" json:"emails,omitempty"`
License string `yaml:"license,omitempty" json:"license,omitempty"`
LicenseFile string `yaml:"licenseFile,omitempty" json:"licenseFile,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Keywords []string `yaml:"keywords,omitempty" json:"keywords,omitempty"`
Man string `yaml:"man,omitempty" json:"man,omitempty"`
ReadinessGates []ReadinessGate `yaml:"readinessGates,omitempty" json:"readinessGates,omitempty"`
}
type Pipeline ¶
type PipelineStepResult ¶
type PipelineStepResult struct {
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Image string `yaml:"image,omitempty" json:"image,omitempty"`
ExecPath string `yaml:"exec,omitempty" json:"exec,omitempty"`
ExecutionError string `yaml:"executionError,omitempty" json:"executionError,omitempty"`
Stderr string `yaml:"stderr,omitempty" json:"stderr,omitempty"`
ExitCode int `yaml:"exitCode" json:"exitCode"`
Results []ResultItem `yaml:"results,omitempty" json:"results,omitempty"`
ErrorResults []ResultItem `yaml:"errorResults,omitempty" json:"errorResults,omitempty"`
}
type ReadinessGate ¶
type ReadinessGate struct {
ConditionType string `yaml:"conditionType" json:"conditionType"`
}
type RenderStatus ¶
type RenderStatus struct {
MutationSteps []PipelineStepResult `yaml:"mutationSteps,omitempty" json:"mutationSteps,omitempty"`
ValidationSteps []PipelineStepResult `yaml:"validationSteps,omitempty" json:"validationSteps,omitempty"`
ErrorSummary string `yaml:"errorSummary,omitempty" json:"errorSummary,omitempty"`
}
type ResourceRef ¶
type ResultItem ¶
type ResultItem struct {
Message string `yaml:"message,omitempty" json:"message,omitempty"`
Severity string `yaml:"severity,omitempty" json:"severity,omitempty"`
ResourceRef *ResourceRef `yaml:"resourceRef,omitempty" json:"resourceRef,omitempty"`
Field *FieldRef `yaml:"field,omitempty" json:"field,omitempty"`
File *FileRef `yaml:"file,omitempty" json:"file,omitempty"`
}
type Selector ¶
type Selector struct {
APIVersion string `yaml:"apiVersion,omitempty" json:"apiVersion,omitempty"`
Kind string `yaml:"kind,omitempty" json:"kind,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty"`
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"`
}
type Status ¶
type Status struct {
Conditions []Condition `yaml:"conditions,omitempty" json:"conditions,omitempty"`
RenderStatus *RenderStatus `yaml:"renderStatus,omitempty" json:"renderStatus,omitempty"`
}
type UpdateStrategyType ¶
type UpdateStrategyType string
const ( ResourceMerge UpdateStrategyType = "resource-merge" FastForward UpdateStrategyType = "fast-forward" ForceDeleteReplace UpdateStrategyType = "force-delete-replace" CopyMerge UpdateStrategyType = "copy-merge" )
func ToUpdateStrategy ¶
func ToUpdateStrategy(strategy string) (UpdateStrategyType, error)
type Upstream ¶
type Upstream struct {
Type OriginType `yaml:"type,omitempty" json:"type,omitempty"`
Git *Git `yaml:"git,omitempty" json:"git,omitempty"`
UpdateStrategy UpdateStrategyType `yaml:"updateStrategy,omitempty" json:"updateStrategy,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.