Documentation
¶
Index ¶
- Variables
- func AllKnownFeatureSets(payloadFeatureGatePath string) (sets.Set[string], error)
- func AllKnownVersions(payloadFeatureGatePath string) ([]uint64, error)
- func NewGenerator(opts Options) generation.Generator
- type AllFeatureGates
- type AndCRDFilter
- type AndManifestFilter
- type CRDFilter
- type ClusterProfileFilter
- type CustomNoUpgrade
- type EqualData
- type Everything
- type FeatureSetFilter
- type ForFeatureGates
- type HasData
- type ManifestFilter
- type Options
- type VersionFilter
- type VersionRange
- type VersionedFeatureSet
Constants ¶
This section is empty.
Variables ¶
var (
DefaultPayloadFeatureGatePath = filepath.Join("payload-manifests", "featuregates")
)
Functions ¶
func AllKnownFeatureSets ¶
func AllKnownVersions ¶
AllKnownVersions returns all versions found in versioned feature sets
func NewGenerator ¶
func NewGenerator(opts Options) generation.Generator
NewGenerator builds a new schemapatch generator.
Types ¶
type AllFeatureGates ¶
type AllFeatureGates struct{}
func (*AllFeatureGates) UseManifest ¶
func (*AllFeatureGates) UseManifest([]byte) (bool, error)
type AndCRDFilter ¶
type AndCRDFilter struct {
// contains filtered or unexported fields
}
func (*AndCRDFilter) String ¶
func (f *AndCRDFilter) String() string
func (*AndCRDFilter) UseCRD ¶
func (f *AndCRDFilter) UseCRD(metadata crdForFeatureSet) bool
type AndManifestFilter ¶
type AndManifestFilter struct {
// contains filtered or unexported fields
}
func (*AndManifestFilter) String ¶
func (f *AndManifestFilter) String() string
func (*AndManifestFilter) UseManifest ¶
func (f *AndManifestFilter) UseManifest(data []byte) (bool, error)
type ClusterProfileFilter ¶
type ClusterProfileFilter struct {
// contains filtered or unexported fields
}
func (*ClusterProfileFilter) String ¶
func (f *ClusterProfileFilter) String() string
func (*ClusterProfileFilter) UseCRD ¶
func (f *ClusterProfileFilter) UseCRD(metadata crdForFeatureSet) bool
func (*ClusterProfileFilter) UseManifest ¶
func (f *ClusterProfileFilter) UseManifest(data []byte) (bool, error)
type CustomNoUpgrade ¶
type CustomNoUpgrade struct{}
func (*CustomNoUpgrade) String ¶
func (f *CustomNoUpgrade) String() string
func (*CustomNoUpgrade) UseManifest ¶
func (*CustomNoUpgrade) UseManifest([]byte) (bool, error)
type Everything ¶
type Everything struct {
}
func (*Everything) String ¶
func (f *Everything) String() string
func (*Everything) UseCRD ¶
func (f *Everything) UseCRD(metadata crdForFeatureSet) bool
func (*Everything) UseManifest ¶
func (f *Everything) UseManifest(data []byte) (bool, error)
type FeatureSetFilter ¶
type FeatureSetFilter struct {
// contains filtered or unexported fields
}
func (*FeatureSetFilter) String ¶
func (f *FeatureSetFilter) String() string
func (*FeatureSetFilter) UseCRD ¶
func (f *FeatureSetFilter) UseCRD(metadata crdForFeatureSet) bool
func (*FeatureSetFilter) UseManifest ¶
func (f *FeatureSetFilter) UseManifest(data []byte) (bool, error)
type ForFeatureGates ¶
type ForFeatureGates struct {
// contains filtered or unexported fields
}
func (*ForFeatureGates) String ¶
func (f *ForFeatureGates) String() string
func (*ForFeatureGates) UseManifest ¶
func (f *ForFeatureGates) UseManifest(data []byte) (bool, error)
type ManifestFilter ¶
func FilterForFeatureSet ¶
func FilterForFeatureSet(payloadFeatureGatePath, clusterProfile, featureSetName string) (ManifestFilter, error)
func FilterForVersionedFeatureSet ¶
func FilterForVersionedFeatureSet(payloadFeatureGatePath, clusterProfile, featureSetName string, targetVersion uint64) (ManifestFilter, error)
FilterForVersionedFeatureSet returns a filter for a specific version, cluster profile, and feature set
type Options ¶
type Options struct {
// Disabled indicates whether the schemapatch generator is disabled or not.
// This default to false as the schemapatch generator is enabled by default.
Disabled bool
// Verify determines whether the generator should verify the content instead
// of updating the generated file.
Verify bool
// PayloadFeatureGatePath is a specified path for the featuregate CRD to inform whether particular
// gates are off or on.
// If not set, the default "payload-manifests/featuregates" is used.
PayloadFeatureGatePath string
}
Options contains the configuration required for the schemapatch generator.
type VersionFilter ¶
type VersionFilter struct {
// contains filtered or unexported fields
}
func (*VersionFilter) String ¶
func (f *VersionFilter) String() string
func (*VersionFilter) UseCRD ¶
func (f *VersionFilter) UseCRD(metadata crdForFeatureSet) bool
func (*VersionFilter) UseManifest ¶
func (f *VersionFilter) UseManifest(data []byte) (bool, error)
type VersionRange ¶
type VersionRange []uint64
VersionRange represents a list of major versions (may not be consecutive)
func (VersionRange) Contains ¶
func (vr VersionRange) Contains(version uint64) bool
Contains checks if a version is within this range
func (VersionRange) EndVersion ¶
func (vr VersionRange) EndVersion() uint64
EndVersion returns the highest version in the range
func (VersionRange) StartVersion ¶
func (vr VersionRange) StartVersion() uint64
StartVersion returns the lowest version in the range
func (VersionRange) String ¶
func (vr VersionRange) String() string
String returns a string representation of the version range
type VersionedFeatureSet ¶
type VersionedFeatureSet struct {
FeatureSet string
ClusterProfile string
VersionRange VersionRange
FeatureGateFile string
}
VersionedFeatureSet represents a feature set with its version information
func AllVersionedFeatureSets ¶
func AllVersionedFeatureSets(payloadFeatureGatePath string) ([]VersionedFeatureSet, error)
AllVersionedFeatureSets returns all versioned feature sets found in the payload directory
func GetVersionedFeatureSets ¶
func GetVersionedFeatureSets(payloadFeatureGatePath string, targetVersion uint64) ([]VersionedFeatureSet, error)
GetVersionedFeatureSets returns versioned feature sets for a specific version