Documentation ¶
Index ¶
- Constants
- func IsResourceChangeBlockedErr(err error) bool
- type APIGroupKindMatcher
- type APIVersionKindMatcher
- type AllAndMatchingOpts
- type AllMatcher
- type AllOpts
- type AndMatcher
- type AnyMatcher
- type AssociationLabel
- type BoolFilter
- type BytesSource
- type CustomResourceMatcher
- type EmptyFieldMatcher
- type ExistsOpts
- type FieldCopyMod
- type FieldCopyModSource
- type FieldRemoveMod
- type FileResource
- type FileSource
- type FilteringPodWatcher
- type GKResourceRef
- type HTTPFileSource
- type HasAnnotationMatcher
- type HasNamespaceMatcher
- type IdentifiedResources
- func (r IdentifiedResources) ConfigMapResources(labelSelector labels.Selector) ([]corev1.ConfigMap, error)
- func (r IdentifiedResources) Create(resource Resource) (Resource, error)
- func (r IdentifiedResources) Delete(resource Resource) error
- func (r IdentifiedResources) Exists(resource Resource, existsOpts ExistsOpts) (Resource, bool, error)
- func (r IdentifiedResources) Get(resource Resource) (Resource, error)
- func (r IdentifiedResources) List(labelSelector labels.Selector, resRefs []ResourceRef, ...) ([]Resource, error)
- func (r IdentifiedResources) Patch(resource Resource, patchType types.PatchType, data []byte) (Resource, error)
- func (r IdentifiedResources) PodResources(labelSelector labels.Selector) UniquePodWatcher
- func (r IdentifiedResources) Update(resource Resource) (Resource, error)
- type IdentifiedResourcesListOpts
- type IdentityAnnotation
- type KindNamespaceNameMatcher
- type LabelScopingModsFunc
- type LabeledResources
- func (a *LabeledResources) All(listOpts IdentifiedResourcesListOpts) ([]Resource, error)
- func (a *LabeledResources) AllAndMatching(newResources []Resource, opts AllAndMatchingOpts) ([]Resource, error)
- func (a *LabeledResources) GetAssociated(resource Resource, resRefs []ResourceRef) ([]Resource, error)
- func (a *LabeledResources) Prepare(resources []Resource, olmFunc OwnershipLabelModsFunc, ...) error
- type LocalFileSource
- type NotMatcher
- type ObjectRefSetMod
- type OwnershipLabelModsFunc
- type PartialResourceRef
- type Path
- type PathPart
- type PathPartArrayIndex
- type PodWatcher
- type PodWatcherI
- type Resource
- type ResourceFilter
- type ResourceImpl
- func (r *ResourceImpl) APIGroup() string
- func (r *ResourceImpl) APIVersion() string
- func (r *ResourceImpl) Annotations() map[string]string
- func (r *ResourceImpl) AsCompactBytes() ([]byte, error)
- func (r *ResourceImpl) AsTypedObj(obj interface{}) error
- func (r *ResourceImpl) AsUncheckedTypedObj(obj interface{}) error
- func (r *ResourceImpl) AsYAMLBytes() ([]byte, error)
- func (r *ResourceImpl) CreatedAt() time.Time
- func (r *ResourceImpl) Debug(title string)
- func (r *ResourceImpl) DeepCopy() Resource
- func (r *ResourceImpl) DeepCopyIntoFrom(res Resource)
- func (r *ResourceImpl) DeepCopyRaw() map[string]interface{}
- func (r *ResourceImpl) Description() string
- func (r *ResourceImpl) Equal(res Resource) bool
- func (r *ResourceImpl) Finalizers() []string
- func (r *ResourceImpl) GroupKind() schema.GroupKind
- func (r *ResourceImpl) GroupVersion() schema.GroupVersion
- func (r *ResourceImpl) GroupVersionResource() schema.GroupVersionResource
- func (r *ResourceImpl) IsDeleting() bool
- func (r *ResourceImpl) IsProvisioned() bool
- func (r *ResourceImpl) Kind() string
- func (r *ResourceImpl) Labels() map[string]string
- func (r *ResourceImpl) MarkTransient(transient bool)
- func (r *ResourceImpl) Name() string
- func (r *ResourceImpl) Namespace() string
- func (r *ResourceImpl) Origin() string
- func (r *ResourceImpl) OwnerRefs() []metav1.OwnerReference
- func (r *ResourceImpl) RemoveNamespace()
- func (r *ResourceImpl) SetName(name string)
- func (r *ResourceImpl) SetNamespace(name string)
- func (r *ResourceImpl) SetOrigin(origin string)
- func (r *ResourceImpl) Status() map[string]interface{}
- func (r *ResourceImpl) Transient() bool
- func (r *ResourceImpl) UID() string
- type ResourceMatcher
- type ResourceMod
- type ResourceModWithMultiple
- type ResourceRef
- type ResourceType
- func Listable(in []ResourceType) []ResourceType
- func Matching(in []ResourceType, ref ResourceRef) []ResourceType
- func MatchingAny(in []ResourceType, refs []ResourceRef) []ResourceType
- func MatchingAnyGK(in []ResourceType, gks []schema.GroupKind) []ResourceType
- func NonMatching(in []ResourceType, ref ResourceRef) []ResourceType
- type ResourceTypes
- type ResourceTypesImpl
- type ResourceTypesImplOpts
- type ResourceTypesUnknownTypeErr
- type ResourceWithManagedFields
- type Resources
- type ResourcesImpl
- func (c *ResourcesImpl) All(resTypes []ResourceType, opts AllOpts) ([]Resource, error)
- func (c *ResourcesImpl) Create(resource Resource) (Resource, error)
- func (c *ResourcesImpl) Delete(resource Resource) error
- func (c *ResourcesImpl) Exists(resource Resource, existsOpts ExistsOpts) (Resource, bool, error)
- func (c *ResourcesImpl) Get(resource Resource) (Resource, error)
- func (c *ResourcesImpl) Patch(resource Resource, patchType types.PatchType, data []byte) (Resource, error)
- func (c *ResourcesImpl) Update(resource Resource) (Resource, error)
- type ResourcesImplOpts
- type SimpleLabel
- type StdinSource
- type StringMapAppendMod
- type UniquePodWatcher
- type UniqueResourceKey
- type UniqueResources
- type YAMLFile
Constants ¶
View Source
const ( ExistsAnnKey = "kapp.k14s.io/exists" // Value is ignored NoopAnnKey = "kapp.k14s.io/noop" // value is ignored )
Variables ¶
This section is empty.
Functions ¶
func IsResourceChangeBlockedErr ¶ added in v0.31.0
Types ¶
type APIGroupKindMatcher ¶
func (APIGroupKindMatcher) Matches ¶
func (m APIGroupKindMatcher) Matches(res Resource) bool
type APIVersionKindMatcher ¶
func (APIVersionKindMatcher) Matches ¶
func (m APIVersionKindMatcher) Matches(res Resource) bool
type AllAndMatchingOpts ¶ added in v0.8.0
type AllAndMatchingOpts struct { ExistingNonLabeledResourcesCheck bool ExistingNonLabeledResourcesCheckConcurrency int SkipResourceOwnershipCheck bool DisallowedResourcesByLabelKeys []string LabelErrorResolutionFunc func(string, string) string IdentifiedResourcesListOpts IdentifiedResourcesListOpts }
type AllMatcher ¶ added in v0.25.0
type AllMatcher struct{}
func (AllMatcher) Matches ¶ added in v0.25.0
func (AllMatcher) Matches(Resource) bool
type AllOpts ¶ added in v0.36.0
type AllOpts struct {
ListOpts *metav1.ListOptions
}
type AndMatcher ¶ added in v0.25.0
type AndMatcher struct {
Matchers []ResourceMatcher
}
func (AndMatcher) Matches ¶ added in v0.25.0
func (m AndMatcher) Matches(res Resource) bool
type AnyMatcher ¶
type AnyMatcher struct {
Matchers []ResourceMatcher
}
func (AnyMatcher) Matches ¶
func (m AnyMatcher) Matches(res Resource) bool
type AssociationLabel ¶
type AssociationLabel struct {
// contains filtered or unexported fields
}
func NewAssociationLabel ¶
func NewAssociationLabel(resource Resource) AssociationLabel
func (AssociationLabel) AsSelector ¶
func (a AssociationLabel) AsSelector() labels.Selector
func (AssociationLabel) Key ¶
func (a AssociationLabel) Key() string
func (AssociationLabel) Value ¶
func (a AssociationLabel) Value() string
type BoolFilter ¶
type BoolFilter struct { And []BoolFilter Or []BoolFilter Not *BoolFilter Resource *ResourceFilter }
func NewBoolFilterFromString ¶
func NewBoolFilterFromString(data string) (*BoolFilter, error)
func (BoolFilter) Matches ¶
func (m BoolFilter) Matches(res Resource) bool
type BytesSource ¶ added in v0.10.0
type BytesSource struct {
// contains filtered or unexported fields
}
func NewBytesSource ¶ added in v0.10.0
func NewBytesSource(bytes []byte) BytesSource
func (BytesSource) Bytes ¶ added in v0.10.0
func (s BytesSource) Bytes() ([]byte, error)
func (BytesSource) Description ¶ added in v0.10.0
func (s BytesSource) Description() string
type CustomResourceMatcher ¶ added in v0.25.0
type CustomResourceMatcher struct{}
func (CustomResourceMatcher) Matches ¶ added in v0.25.0
func (m CustomResourceMatcher) Matches(res Resource) bool
type EmptyFieldMatcher ¶ added in v0.34.0
type EmptyFieldMatcher struct {
Path Path
}
func (EmptyFieldMatcher) Matches ¶ added in v0.34.0
func (m EmptyFieldMatcher) Matches(res Resource) bool
type ExistsOpts ¶ added in v0.40.0
type ExistsOpts struct {
SameUID bool
}
type FieldCopyMod ¶
type FieldCopyMod struct { ResourceMatcher ResourceMatcher Path Path Sources []FieldCopyModSource // first preferred }
func (FieldCopyMod) ApplyFromMultiple ¶
func (t FieldCopyMod) ApplyFromMultiple(res Resource, srcs map[FieldCopyModSource]Resource) error
type FieldCopyModSource ¶
type FieldCopyModSource string
const ( FieldCopyModSourceNew FieldCopyModSource = "new" FieldCopyModSourceExisting = "existing" )
type FieldRemoveMod ¶
type FieldRemoveMod struct { ResourceMatcher ResourceMatcher Path Path }
func (FieldRemoveMod) Apply ¶
func (t FieldRemoveMod) Apply(res Resource) error
func (FieldRemoveMod) ApplyFromMultiple ¶ added in v0.6.0
func (t FieldRemoveMod) ApplyFromMultiple(res Resource, _ map[FieldCopyModSource]Resource) error
type FileResource ¶
type FileResource struct {
// contains filtered or unexported fields
}
func NewFileResource ¶ added in v0.10.0
func NewFileResource(fileSrc FileSource) FileResource
func NewFileResources ¶
func NewFileResources(file string) ([]FileResource, error)
func (FileResource) Description ¶
func (r FileResource) Description() string
func (FileResource) Resources ¶
func (r FileResource) Resources() ([]Resource, error)
type FileSource ¶
type FilteringPodWatcher ¶
type FilteringPodWatcher struct { MatcherFunc func(*corev1.Pod) bool Watcher PodWatcherI }
type GKResourceRef ¶ added in v0.46.0
func (GKResourceRef) Matches ¶ added in v0.46.0
func (r GKResourceRef) Matches(other ResourceType) bool
type HTTPFileSource ¶
func NewHTTPFileSource ¶
func NewHTTPFileSource(path string) HTTPFileSource
func (HTTPFileSource) Bytes ¶
func (s HTTPFileSource) Bytes() ([]byte, error)
func (HTTPFileSource) Description ¶
func (s HTTPFileSource) Description() string
type HasAnnotationMatcher ¶ added in v0.25.0
type HasAnnotationMatcher struct {
Keys []string
}
func (HasAnnotationMatcher) Matches ¶ added in v0.25.0
func (m HasAnnotationMatcher) Matches(res Resource) bool
type HasNamespaceMatcher ¶ added in v0.25.0
type HasNamespaceMatcher struct {
Names []string
}
func (HasNamespaceMatcher) Matches ¶ added in v0.25.0
func (m HasNamespaceMatcher) Matches(res Resource) bool
type IdentifiedResources ¶
type IdentifiedResources struct {
// contains filtered or unexported fields
}
func NewIdentifiedResources ¶
func NewIdentifiedResources(coreClient kubernetes.Interface, resourceTypes ResourceTypes, resources Resources, fallbackAllowedNamespaces []string, logger logger.Logger) IdentifiedResources
func (IdentifiedResources) ConfigMapResources ¶
func (IdentifiedResources) Create ¶
func (r IdentifiedResources) Create(resource Resource) (Resource, error)
func (IdentifiedResources) Delete ¶
func (r IdentifiedResources) Delete(resource Resource) error
func (IdentifiedResources) Exists ¶
func (r IdentifiedResources) Exists(resource Resource, existsOpts ExistsOpts) (Resource, bool, error)
func (IdentifiedResources) Get ¶
func (r IdentifiedResources) Get(resource Resource) (Resource, error)
func (IdentifiedResources) List ¶
func (r IdentifiedResources) List(labelSelector labels.Selector, resRefs []ResourceRef, opts IdentifiedResourcesListOpts) ([]Resource, error)
func (IdentifiedResources) PodResources ¶
func (r IdentifiedResources) PodResources(labelSelector labels.Selector) UniquePodWatcher
type IdentifiedResourcesListOpts ¶ added in v0.45.0
type IdentityAnnotation ¶
type IdentityAnnotation struct {
// contains filtered or unexported fields
}
func NewIdentityAnnotation ¶
func NewIdentityAnnotation(resource Resource) IdentityAnnotation
func (IdentityAnnotation) AddMod ¶
func (a IdentityAnnotation) AddMod() StringMapAppendMod
func (IdentityAnnotation) MatchesVersion ¶
func (a IdentityAnnotation) MatchesVersion() bool
MatchesVersion returns true if annotation is valid and it matches version
func (IdentityAnnotation) RemoveMod ¶
func (a IdentityAnnotation) RemoveMod() FieldRemoveMod
func (IdentityAnnotation) Valid ¶
func (a IdentityAnnotation) Valid() bool
Valid returns true if signature matches resource itself
type KindNamespaceNameMatcher ¶
type KindNamespaceNameMatcher struct {
Kind, Namespace, Name string
}
func (KindNamespaceNameMatcher) Matches ¶
func (m KindNamespaceNameMatcher) Matches(res Resource) bool
type LabelScopingModsFunc ¶
type LabelScopingModsFunc func(kvs map[string]string) []StringMapAppendMod
type LabeledResources ¶
type LabeledResources struct {
// contains filtered or unexported fields
}
func NewLabeledResources ¶
func NewLabeledResources(labelSelector labels.Selector, identifiedResources IdentifiedResources, logger logger.Logger) *LabeledResources
func (*LabeledResources) All ¶
func (a *LabeledResources) All(listOpts IdentifiedResourcesListOpts) ([]Resource, error)
func (*LabeledResources) AllAndMatching ¶
func (a *LabeledResources) AllAndMatching(newResources []Resource, opts AllAndMatchingOpts) ([]Resource, error)
AllAndMatching returns set of all labeled resources plus resources that match newResources. Returns errors if non-labeled resources were labeled with a different value.
func (*LabeledResources) GetAssociated ¶
func (a *LabeledResources) GetAssociated(resource Resource, resRefs []ResourceRef) ([]Resource, error)
func (*LabeledResources) Prepare ¶
func (a *LabeledResources) Prepare(resources []Resource, olmFunc OwnershipLabelModsFunc, lsmFunc LabelScopingModsFunc, additionalLabels map[string]string) error
Modifies passed resources for labels and ownership
type LocalFileSource ¶
type LocalFileSource struct {
// contains filtered or unexported fields
}
func NewLocalFileSource ¶
func NewLocalFileSource(path string) LocalFileSource
func (LocalFileSource) Bytes ¶
func (s LocalFileSource) Bytes() ([]byte, error)
func (LocalFileSource) Description ¶
func (s LocalFileSource) Description() string
type NotMatcher ¶ added in v0.25.0
type NotMatcher struct {
Matcher ResourceMatcher
}
func (NotMatcher) Matches ¶ added in v0.25.0
func (m NotMatcher) Matches(res Resource) bool
type ObjectRefSetMod ¶
type ObjectRefSetMod struct { ResourceMatcher ResourceMatcher Path Path ReplacementFunc func(map[string]interface{}) error }
func (ObjectRefSetMod) Apply ¶
func (t ObjectRefSetMod) Apply(res Resource) error
type OwnershipLabelModsFunc ¶
type OwnershipLabelModsFunc func(kvs map[string]string) []StringMapAppendMod
type PartialResourceRef ¶
type PartialResourceRef struct {
schema.GroupVersionResource
}
func (PartialResourceRef) Matches ¶
func (r PartialResourceRef) Matches(other schema.GroupVersionResource) bool
type Path ¶
type Path []*PathPart
func NewPathFromInterfaces ¶
func NewPathFromInterfaces(parts []interface{}) Path
func NewPathFromStrings ¶
func (Path) ContainsNonMapKeys ¶
type PathPart ¶
type PathPart struct { MapKey *string ArrayIndex *PathPartArrayIndex }
func NewPathPartFromIndex ¶
func NewPathPartFromIndexAll ¶
func NewPathPartFromIndexAll() *PathPart
func NewPathPartFromString ¶
func (*PathPart) UnmarshalJSON ¶
type PathPartArrayIndex ¶
type PodWatcher ¶
type PodWatcher struct {
// contains filtered or unexported fields
}
func NewPodWatcher ¶
func NewPodWatcher( podsClient typedcorev1.PodInterface, listOpts metav1.ListOptions, ) PodWatcher
type PodWatcherI ¶
type Resource ¶
type Resource interface { GroupVersionResource() schema.GroupVersionResource GroupVersion() schema.GroupVersion GroupKind() schema.GroupKind Kind() string APIVersion() string APIGroup() string Namespace() string SetNamespace(name string) RemoveNamespace() Name() string SetName(name string) Description() string Annotations() map[string]string Labels() map[string]string Finalizers() []string OwnerRefs() []metav1.OwnerReference Status() map[string]interface{} CreatedAt() time.Time IsProvisioned() bool IsDeleting() bool UID() string Equal(res Resource) bool DeepCopy() Resource DeepCopyRaw() map[string]interface{} DeepCopyIntoFrom(res Resource) AsYAMLBytes() ([]byte, error) AsCompactBytes() ([]byte, error) AsTypedObj(obj interface{}) error AsUncheckedTypedObj(obj interface{}) error Debug(string) SetOrigin(string) Origin() string MarkTransient(bool) Transient() bool // contains filtered or unexported methods }
func NewResourcesFromBytes ¶
type ResourceFilter ¶
type ResourceFilter struct { CreatedAtBeforeTime *time.Time CreatedAtAfterTime *time.Time Kinds []string Namespaces []string Names []string KindNames []string KindNamespaces []string KindNsNames []string Labels []string BoolFilter *BoolFilter `json:"-"` }
func (ResourceFilter) Apply ¶
func (f ResourceFilter) Apply(resources []Resource) []Resource
func (ResourceFilter) Matches ¶
func (f ResourceFilter) Matches(resource Resource) bool
type ResourceImpl ¶
type ResourceImpl struct {
// contains filtered or unexported fields
}
func MustNewResourceFromBytes ¶
func MustNewResourceFromBytes(data []byte) *ResourceImpl
func NewResourceFromBytes ¶
func NewResourceFromBytes(data []byte) (*ResourceImpl, error)
func NewResourceUnstructured ¶
func NewResourceUnstructured(un unstructured.Unstructured, resType ResourceType) *ResourceImpl
func (*ResourceImpl) APIGroup ¶
func (r *ResourceImpl) APIGroup() string
func (*ResourceImpl) APIVersion ¶
func (r *ResourceImpl) APIVersion() string
func (*ResourceImpl) Annotations ¶
func (r *ResourceImpl) Annotations() map[string]string
func (*ResourceImpl) AsCompactBytes ¶ added in v0.15.0
func (r *ResourceImpl) AsCompactBytes() ([]byte, error)
func (*ResourceImpl) AsTypedObj ¶
func (r *ResourceImpl) AsTypedObj(obj interface{}) error
func (*ResourceImpl) AsUncheckedTypedObj ¶ added in v0.10.0
func (r *ResourceImpl) AsUncheckedTypedObj(obj interface{}) error
func (*ResourceImpl) AsYAMLBytes ¶
func (r *ResourceImpl) AsYAMLBytes() ([]byte, error)
func (*ResourceImpl) CreatedAt ¶
func (r *ResourceImpl) CreatedAt() time.Time
func (*ResourceImpl) Debug ¶ added in v0.6.0
func (r *ResourceImpl) Debug(title string)
func (*ResourceImpl) DeepCopy ¶
func (r *ResourceImpl) DeepCopy() Resource
func (*ResourceImpl) DeepCopyIntoFrom ¶ added in v0.38.0
func (r *ResourceImpl) DeepCopyIntoFrom(res Resource)
func (*ResourceImpl) DeepCopyRaw ¶
func (r *ResourceImpl) DeepCopyRaw() map[string]interface{}
func (*ResourceImpl) Description ¶
func (r *ResourceImpl) Description() string
func (*ResourceImpl) Equal ¶
func (r *ResourceImpl) Equal(res Resource) bool
func (*ResourceImpl) Finalizers ¶ added in v0.46.0
func (r *ResourceImpl) Finalizers() []string
func (*ResourceImpl) GroupKind ¶ added in v0.46.0
func (r *ResourceImpl) GroupKind() schema.GroupKind
func (*ResourceImpl) GroupVersion ¶ added in v0.18.0
func (r *ResourceImpl) GroupVersion() schema.GroupVersion
func (*ResourceImpl) GroupVersionResource ¶
func (r *ResourceImpl) GroupVersionResource() schema.GroupVersionResource
func (*ResourceImpl) IsDeleting ¶
func (r *ResourceImpl) IsDeleting() bool
func (*ResourceImpl) IsProvisioned ¶
func (r *ResourceImpl) IsProvisioned() bool
func (*ResourceImpl) Kind ¶
func (r *ResourceImpl) Kind() string
func (*ResourceImpl) Labels ¶
func (r *ResourceImpl) Labels() map[string]string
func (*ResourceImpl) MarkTransient ¶ added in v0.12.0
func (r *ResourceImpl) MarkTransient(transient bool)
func (*ResourceImpl) Name ¶
func (r *ResourceImpl) Name() string
func (*ResourceImpl) Namespace ¶
func (r *ResourceImpl) Namespace() string
func (*ResourceImpl) Origin ¶ added in v0.14.0
func (r *ResourceImpl) Origin() string
func (*ResourceImpl) OwnerRefs ¶
func (r *ResourceImpl) OwnerRefs() []metav1.OwnerReference
func (*ResourceImpl) RemoveNamespace ¶ added in v0.2.0
func (r *ResourceImpl) RemoveNamespace()
func (*ResourceImpl) SetName ¶
func (r *ResourceImpl) SetName(name string)
func (*ResourceImpl) SetNamespace ¶
func (r *ResourceImpl) SetNamespace(name string)
func (*ResourceImpl) SetOrigin ¶ added in v0.14.0
func (r *ResourceImpl) SetOrigin(origin string)
func (*ResourceImpl) Status ¶
func (r *ResourceImpl) Status() map[string]interface{}
func (*ResourceImpl) Transient ¶
func (r *ResourceImpl) Transient() bool
func (*ResourceImpl) UID ¶
func (r *ResourceImpl) UID() string
type ResourceMatcher ¶
type ResourceMod ¶
type ResourceModWithMultiple ¶ added in v0.6.0
type ResourceModWithMultiple interface {
ApplyFromMultiple(Resource, map[FieldCopyModSource]Resource) error
}
type ResourceRef ¶
type ResourceRef struct {
schema.GroupVersionResource
}
type ResourceType ¶
type ResourceType struct { schema.GroupVersionResource metav1.APIResource }
func Listable ¶
func Listable(in []ResourceType) []ResourceType
func Matching ¶
func Matching(in []ResourceType, ref ResourceRef) []ResourceType
func MatchingAny ¶ added in v0.29.0
func MatchingAny(in []ResourceType, refs []ResourceRef) []ResourceType
func MatchingAnyGK ¶ added in v0.46.0
func MatchingAnyGK(in []ResourceType, gks []schema.GroupKind) []ResourceType
TODO: Extend ResourceRef and PartialResourceRefd to allow GVK matching
func NonMatching ¶
func NonMatching(in []ResourceType, ref ResourceRef) []ResourceType
func (ResourceType) Deletable ¶
func (p ResourceType) Deletable() bool
func (ResourceType) Listable ¶
func (p ResourceType) Listable() bool
func (ResourceType) Namespaced ¶
func (p ResourceType) Namespaced() bool
type ResourceTypes ¶
type ResourceTypes interface { All(ignoreCachedResTypes bool) ([]ResourceType, error) Find(Resource) (ResourceType, error) CanIgnoreFailingGroupVersion(schema.GroupVersion) bool }
type ResourceTypesImpl ¶
type ResourceTypesImpl struct {
// contains filtered or unexported fields
}
func NewResourceTypesImpl ¶
func NewResourceTypesImpl(coreClient kubernetes.Interface, opts ResourceTypesImplOpts) *ResourceTypesImpl
func (*ResourceTypesImpl) All ¶
func (g *ResourceTypesImpl) All(ignoreCachedResTypes bool) ([]ResourceType, error)
func (*ResourceTypesImpl) CanIgnoreFailingGroupVersion ¶ added in v0.29.0
func (g *ResourceTypesImpl) CanIgnoreFailingGroupVersion(groupVer schema.GroupVersion) bool
func (*ResourceTypesImpl) Find ¶
func (g *ResourceTypesImpl) Find(resource Resource) (ResourceType, error)
type ResourceTypesImplOpts ¶ added in v0.15.0
type ResourceTypesImplOpts struct { IgnoreFailingAPIServices bool CanIgnoreFailingAPIService func(schema.GroupVersion) bool }
type ResourceTypesUnknownTypeErr ¶
type ResourceTypesUnknownTypeErr struct {
// contains filtered or unexported fields
}
func (ResourceTypesUnknownTypeErr) Error ¶
func (e ResourceTypesUnknownTypeErr) Error() string
type ResourceWithManagedFields ¶ added in v0.50.0
type ResourceWithManagedFields struct {
// contains filtered or unexported fields
}
func NewResourceWithManagedFields ¶ added in v0.50.0
func NewResourceWithManagedFields(res Resource, managedFields bool) ResourceWithManagedFields
func (ResourceWithManagedFields) Resource ¶ added in v0.50.0
func (r ResourceWithManagedFields) Resource() (Resource, error)
type Resources ¶
type Resources interface { All([]ResourceType, AllOpts) ([]Resource, error) Delete(Resource) error Exists(Resource, ExistsOpts) (Resource, bool, error) Get(Resource) (Resource, error) Patch(Resource, types.PatchType, []byte) (Resource, error) Update(Resource) (Resource, error) Create(resource Resource) (Resource, error) }
type ResourcesImpl ¶ added in v0.36.0
type ResourcesImpl struct {
// contains filtered or unexported fields
}
func NewResourcesImpl ¶ added in v0.36.0
func NewResourcesImpl(resourceTypes ResourceTypes, coreClient kubernetes.Interface, dynamicClient dynamic.Interface, mutedDynamicClient dynamic.Interface, opts ResourcesImplOpts, logger logger.Logger) *ResourcesImpl
func (*ResourcesImpl) All ¶ added in v0.36.0
func (c *ResourcesImpl) All(resTypes []ResourceType, opts AllOpts) ([]Resource, error)
func (*ResourcesImpl) Create ¶ added in v0.36.0
func (c *ResourcesImpl) Create(resource Resource) (Resource, error)
func (*ResourcesImpl) Delete ¶ added in v0.36.0
func (c *ResourcesImpl) Delete(resource Resource) error
func (*ResourcesImpl) Exists ¶ added in v0.36.0
func (c *ResourcesImpl) Exists(resource Resource, existsOpts ExistsOpts) (Resource, bool, error)
func (*ResourcesImpl) Get ¶ added in v0.36.0
func (c *ResourcesImpl) Get(resource Resource) (Resource, error)
type ResourcesImplOpts ¶ added in v0.41.0
type SimpleLabel ¶
type SimpleLabel struct {
// contains filtered or unexported fields
}
func NewSimpleLabel ¶
func NewSimpleLabel(labelSelector labels.Selector) SimpleLabel
type StdinSource ¶
type StdinSource struct{}
func NewStdinSource ¶
func NewStdinSource() StdinSource
func (StdinSource) Bytes ¶
func (s StdinSource) Bytes() ([]byte, error)
func (StdinSource) Description ¶
func (s StdinSource) Description() string
type StringMapAppendMod ¶
type StringMapAppendMod struct { // For example applies to Deployment, ReplicaSet, StatefulSet // TODO should there be an opt-out way? ResourceMatcher ResourceMatcher Path Path SkipIfNotFound bool KVs map[string]string }
func (StringMapAppendMod) Apply ¶
func (t StringMapAppendMod) Apply(res Resource) error
type UniquePodWatcher ¶
type UniquePodWatcher struct {
// contains filtered or unexported fields
}
type UniqueResourceKey ¶
type UniqueResourceKey struct {
// contains filtered or unexported fields
}
func NewUniqueResourceKey ¶
func NewUniqueResourceKey(res Resource) UniqueResourceKey
func NewUniqueResourceKeyWithCustomName ¶
func NewUniqueResourceKeyWithCustomName(res Resource, name string) UniqueResourceKey
func (UniqueResourceKey) String ¶
func (k UniqueResourceKey) String() string
type UniqueResources ¶
type UniqueResources struct {
// contains filtered or unexported fields
}
func NewUniqueResources ¶
func NewUniqueResources(resources []Resource) UniqueResources
func (UniqueResources) Match ¶
func (r UniqueResources) Match(newResources []Resource) ([]Resource, error)
func (UniqueResources) Resources ¶
func (r UniqueResources) Resources() ([]Resource, error)
Source Files ¶
- association_label.go
- file_resources.go
- file_sources.go
- identified_resource_config_maps.go
- identified_resources.go
- identified_resources_list.go
- identified_resources_pods.go
- identity_annotation.go
- label.go
- labeled_resources.go
- matcher_empty_field.go
- matchers.go
- mod_field_copy.go
- mod_field_remove.go
- mod_object_ref_set.go
- mod_path.go
- mod_string_map_append.go
- pod_watcher.go
- refs.go
- resource.go
- resource_filter.go
- resource_types.go
- resource_with_managed_fields.go
- resources.go
- unique_resources.go
- yaml_doc.go
Click to show internal directories.
Click to hide internal directories.