Documentation
¶
Index ¶
- Constants
- Variables
- func BuildResources(ctx context.Context, deployType common.DeployType, releaseNamespace string, ...) ([]*InstallableResource, []*DeletableResource, error)
- func InstallableResourceSortByWeightHandler(r1, r2 *InstallableResource) bool
- func IsSensitive(groupKind schema.GroupKind, annotations map[string]string) bool
- func KeepOnDelete(meta *spec.ResourceMeta, releaseNamespace string) bool
- func ParseSensitivePaths(value string) []string
- func RedactSensitiveData(unstruct *unstructured.Unstructured, sensitivePaths []string) *unstructured.Unstructured
- func ValidateLocal(ctx context.Context, releaseNamespace string, ...) error
- func ValidateResourcePolicy(meta *spec.ResourceMeta) error
- type BuildResourcesOptions
- type DeletableResource
- type DeletableResourceOptions
- type ExternalDependency
- type InstallableResource
- type InstallableResourceOptions
- type InternalDependency
- type SensitiveInfo
Constants ¶
const (
HideAll = "$$HIDE_ALL$$"
)
Variables ¶
var ErrResourceValidationSourceSanityCheck = errors.New("resource validation source sanity check")
Functions ¶
func BuildResources ¶ added in v1.13.0
func BuildResources(ctx context.Context, deployType common.DeployType, releaseNamespace string, prevRelResSpecs, newRelResSpecs []*spec.ResourceSpec, patchers []spec.ResourcePatcher, clientFactory kube.ClientFactorier, opts BuildResourcesOptions) ([]*InstallableResource, []*DeletableResource, error)
Build Installable/DeletableResources from ResourceSpecs. Resulting Resources can be used to construct Installable/DeletableResourceInfos later. Must never contact the cluster, because this is called even when no cluster access allowed.
func InstallableResourceSortByWeightHandler ¶ added in v1.13.0
func InstallableResourceSortByWeightHandler(r1, r2 *InstallableResource) bool
func KeepOnDelete ¶ added in v1.13.0
func KeepOnDelete(meta *spec.ResourceMeta, releaseNamespace string) bool
func ParseSensitivePaths ¶ added in v1.8.0
func RedactSensitiveData ¶ added in v1.8.0
func RedactSensitiveData(unstruct *unstructured.Unstructured, sensitivePaths []string) *unstructured.Unstructured
func ValidateLocal ¶ added in v1.13.0
func ValidateLocal(ctx context.Context, releaseNamespace string, transformedResources []*InstallableResource, opts common.ResourceValidationOptions, ) error
Can be called even without cluster access.
func ValidateResourcePolicy ¶ added in v1.13.0
func ValidateResourcePolicy(meta *spec.ResourceMeta) error
Types ¶
type BuildResourcesOptions ¶ added in v1.13.0
type BuildResourcesOptions struct {
Remote bool
DefaultDeletePropagation metav1.DeletionPropagation
}
type DeletableResource ¶ added in v1.13.0
type DeletableResource struct {
*spec.ResourceMeta
Ownership common.Ownership
KeepOnDelete bool
DeletePropagation metav1.DeletionPropagation
ManualInternalDependencies []*InternalDependency
AutoInternalDependencies []*InternalDependency
}
Represent a Kubernetes resource that can be deleted. Higher level than ResourceMeta, but lower level than DeletableResourceInfo. If something can be computed on this level instead of doing this on higher levels, it's better to do it here.
func NewDeletableResource ¶ added in v1.13.0
func NewDeletableResource(spec *spec.ResourceSpec, releaseNamespace string, opts DeletableResourceOptions) *DeletableResource
Construct a DeletableResource from a ResourceSpec. Must never contact the cluster, because this is called even when no cluster access allowed.
type DeletableResourceOptions ¶ added in v1.13.0
type DeletableResourceOptions struct {
DefaultDeletePropagation metav1.DeletionPropagation
}
type ExternalDependency ¶ added in v1.13.0
type ExternalDependency struct {
*spec.ResourceMeta
}
Represents a dependency on an external resource outside of the Helm release.
type InstallableResource ¶ added in v1.13.0
type InstallableResource struct {
*spec.ResourceSpec
Ownership common.Ownership
Recreate bool
RecreateOnImmutable bool
DefaultReplicasOnCreation *int
DeleteOnSucceeded bool
DeleteOnFailed bool
KeepOnDelete bool
FailMode multitrack.FailMode
FailuresAllowed int
IgnoreReadinessProbeFailsForContainers map[string]time.Duration
LogRegex *regexp.Regexp
LogRegexesForContainers map[string]*regexp.Regexp
NoActivityTimeout time.Duration
ShowLogsOnlyForContainers []string
ShowServiceMessages bool
ShowLogsOnlyForNumberOfReplicas int
SkipLogs bool
SkipLogsForContainers []string
SkipLogsRegex *regexp.Regexp
SkipLogsRegexForContainers map[string]*regexp.Regexp
TrackTerminationMode multitrack.TrackTerminationMode
Weight *int
ManualInternalDependencies []*InternalDependency
AutoInternalDependencies []*InternalDependency
ExternalDependencies []*ExternalDependency
DeployConditions map[common.On][]common.Stage
DeletePropagation metav1.DeletionPropagation
}
Represent a Kubernetes resource that can be installed. Higher level than ResourceSpec, but lower level than InstallableResourceInfo. If something can be computed on this level instead of doing this on higher levels, it's better to do it here.
func NewInstallableResource ¶ added in v1.13.0
func NewInstallableResource(res *spec.ResourceSpec, releaseNamespace string, clientFactory kube.ClientFactorier, opts InstallableResourceOptions) (*InstallableResource, error)
Construct an InstallableResource from a ResourceSpec. Must never contact the cluster, because this is called even when no cluster access allowed.
type InstallableResourceOptions ¶ added in v1.13.0
type InstallableResourceOptions struct {
Remote bool
DefaultDeletePropagation metav1.DeletionPropagation
}
type InternalDependency ¶ added in v1.13.0
type InternalDependency struct {
*spec.ResourceMatcher
ResourceState common.ResourceState
}
Represents a dependency on a Kubernetes resource in the Helm release.
type SensitiveInfo ¶ added in v1.8.0
func GetSensitiveInfo ¶ added in v1.8.0
func GetSensitiveInfo(groupKind schema.GroupKind, annotations map[string]string) SensitiveInfo
func (*SensitiveInfo) FullySensitive ¶ added in v1.13.0
func (i *SensitiveInfo) FullySensitive() bool