Documentation ¶
Index ¶
Constants ¶
View Source
const ( // labels LabelManagedBy = "pipecd.dev/managed-by" // Always be piped. LabelPiped = "pipecd.dev/piped" // The id of piped handling this application. LabelApplication = "pipecd.dev/application" // The application this resource belongs to. LabelSyncReplace = "pipecd.dev/sync-by-replace" // Use replace instead of apply. LabelForceSyncReplace = "pipecd.dev/force-sync-by-replace" // Use replace --force instead of apply. LabelCommitHash = "pipecd.dev/commit-hash" // Hash value of the deployed commit. LabelResourceKey = "pipecd.dev/resource-key" // The resource key generated by apiVersion, namespace and name. e.g. apps/v1/Deployment/namespace/demo-app LabelOriginalAPIVersion = "pipecd.dev/original-api-version" // The api version defined in git configuration. e.g. apps/v1 // annotations AnnotationOrder = "pipecd.dev/order" // The order number of resource used to sort them before using. // label/annotation values ManagedByPiped = "piped" UseReplaceEnabled = "enabled" )
View Source
const ( KindDeployment = "Deployment" KindSecret = "Secret" KindConfigMap = "ConfigMap" DefaultNamespace = "default" )
Variables ¶
View Source
var (
ErrNotFound = errors.New("not found")
)
Functions ¶
Types ¶
type Helm ¶
type Helm struct {
// contains filtered or unexported fields
}
func (*Helm) TemplateLocalChart ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func (*Loader) LoadManifests ¶
type LoaderInput ¶
type LoaderInput struct { // for annotations to manage the application live state. PipedID string CommitHash string AppID string // for templating manifests AppName string AppDir string ConfigFilename string Manifests []string Namespace string TemplatingMethod TemplatingMethod KustomizeVersion string KustomizeOptions map[string]string HelmVersion string HelmChart *config.InputHelmChart HelmOptions *config.InputHelmOptions Logger *zap.Logger }
type Manifest ¶
type Manifest struct { Key ResourceKey Body *unstructured.Unstructured }
Manifest represents a Kubernetes resource manifest.
func LoadManifestsFromYAMLFile ¶
LoadManifestsFromYAMLFile loads the manifests from the given file.
func LoadPlainYAMLManifests ¶
func ParseManifests ¶
ParseManifests parses the given data and returns a list of Manifest.
func (Manifest) AddAnnotations ¶
func (*Manifest) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type ResourceKey ¶
func MakeResourceKey ¶
func MakeResourceKey(obj *unstructured.Unstructured) ResourceKey
func (ResourceKey) IsConfigMap ¶
func (k ResourceKey) IsConfigMap() bool
func (ResourceKey) IsSecret ¶
func (k ResourceKey) IsSecret() bool
func (ResourceKey) ReadableString ¶
func (k ResourceKey) ReadableString() string
func (ResourceKey) String ¶
func (k ResourceKey) String() string
type TemplatingMethod ¶
type TemplatingMethod string
const ( TemplatingMethodHelm TemplatingMethod = "helm" TemplatingMethodKustomize TemplatingMethod = "kustomize" TemplatingMethodNone TemplatingMethod = "none" )
Click to show internal directories.
Click to hide internal directories.