Documentation
¶
Index ¶
- Constants
- Variables
- func AddFinalizerToManifest(ctx context.Context, clnt client.Client, ...) error
- func AddFinalizerToModuleCR(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured, ...) error
- func AllModuleTemplatesExists(ctx context.Context, clnt client.Client, kyma *v1beta2.Kyma) error
- func AppendExternalCRDs(path string, files ...string) ([]*apiextensionsv1.CustomResourceDefinition, error)
- func ApplyYAML(ctx context.Context, clnt client.Client, yamlFilePath string) error
- func CRExists(obj apimetav1.Object, clientError error) error
- func CRIsInState(ctx context.Context, group, version, kind, name, namespace string, ...) error
- func CheckManifestIsInState(ctx context.Context, kymaName, kymaNamespace, moduleName string, ...) error
- func CheckModuleState(ctx context.Context, clnt client.Client, ...) error
- func ConditionExists(ctx context.Context, clnt client.Client, ...) error
- func ContainsKymaManagerField(ctx context.Context, clnt client.Client, ...) (bool, error)
- func ContainsModuleInSpec(ctx context.Context, clnt client.Client, ...) error
- func CreateCR(ctx context.Context, clnt client.Client, obj client.Object) error
- func CreateImageSpecLayer(manifestFilePath string) (containerregistryv1.Layer, error)
- func CreateModuleTemplate(ctx context.Context, clnt client.Client, ...) error
- func CreateNamespace(ctx context.Context, clnt client.Client, name string) error
- func CreateOCIImageSpecFromFile(name, repo, manifestFilePath string, enableCredSecretSelector bool) (v1beta2.ImageSpec, error)
- func CreateOCIImageSpecFromTar(name, repo, manifestTarPath string, enableCredSecretSelector bool) (v1beta2.ImageSpec, error)
- func CredSecretLabelSelector(labelValue string) *apimetav1.LabelSelector
- func DeleteCR(ctx context.Context, clnt client.Client, obj client.Object) error
- func DeleteCRWithGVK(ctx context.Context, clnt client.Client, ...) error
- func DeleteKyma(ctx context.Context, clnt client.Client, kyma *v1beta2.Kyma, ...) error
- func DeleteKymaByForceRemovePurgeFinalizer(ctx context.Context, clnt client.Client, kyma *v1beta2.Kyma) error
- func DeleteManifest(ctx context.Context, clnt client.Client, ...) error
- func DeleteManifestAndVerify(ctx context.Context, clnt client.Client, manifest *v1beta2.Manifest) func() error
- func DeleteModule(ctx context.Context, clnt client.Client, kyma *v1beta2.Kyma, moduleName string) error
- func DeleteModuleReleaseMeta(ctx context.Context, moduleName, namespace string, clnt client.Client) error
- func DeleteModuleTemplate(ctx context.Context, clnt client.Client, module v1beta2.Module, ...) error
- func DeletionTimeStampExists(ctx context.Context, group, version, kind, name, namespace string, ...) (bool, error)
- func DisableModule(ctx context.Context, clnt client.Client, ...) error
- func EnableModule(ctx context.Context, clnt client.Client, kymaName, kymaNamespace string, ...) error
- func ExpectManifestLastOperationMessageContains(ctx context.Context, clnt client.Client, manifestName, message string) error
- func ExpectManifestStateIn(ctx context.Context, clnt client.Client, state shared.State) func(manifestName string) error
- func ExpectOCISyncRefAnnotationExists(ctx context.Context, clnt client.Client, mustExist bool) func(manifestName string) error
- func FinalizerIsRemoved(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured, ...) error
- func GetCR(ctx context.Context, clnt client.Client, objectKey client.ObjectKey, ...) (*unstructured.Unstructured, error)
- func GetKyma(ctx context.Context, clnt client.Client, name, namespace string) (*v1beta2.Kyma, error)
- func GetManifest(ctx context.Context, clnt client.Client, ...) (*v1beta2.Manifest, error)
- func GetManifestResource(ctx context.Context, clnt client.Client, ...) (*unstructured.Unstructured, error)
- func GetManifestSpecRemote(ctx context.Context, clnt client.Client, ...) (bool, error)
- func GetManifestStatus(ctx context.Context, clnt client.Client, manifestName string) (shared.Status, error)
- func GetManifestWithMetadata(ctx context.Context, clnt client.Client, ...) (*v1beta2.Manifest, error)
- func GetManifestWithName(ctx context.Context, clnt client.Client, manifestName string) (*v1beta2.Manifest, error)
- func GetModuleReleaseMeta(ctx context.Context, moduleName, namespace string, clnt client.Client) (*v1beta2.ModuleReleaseMeta, error)
- func GetModuleTemplate(ctx context.Context, clnt client.Client, module v1beta2.Module, ...) (*v1beta2.ModuleTemplate, error)
- func HasExpectedLabel(ctx context.Context, clnt client.Client, objectKey client.ObjectKey, ...) error
- func ImmediatelyRequeueKyma(ctx context.Context, clnt client.Client, kymaName, kymaNamespace string) error
- func InstallManifest(ctx context.Context, clnt client.Client, manifest *v1beta2.Manifest, ...) error
- func IsResourceVersionSame(ctx context.Context, clnt client.Client, objectKey client.ObjectKey, ...) (bool, error)
- func KymaDeleted(ctx context.Context, kymaName string, kymaNamespace string, ...) error
- func KymaExists(ctx context.Context, clnt client.Client, name, namespace string) error
- func KymaHasDeletionTimestamp(ctx context.Context, clnt client.Client, kymaName string, kymaNamespace string) bool
- func KymaIsInState(ctx context.Context, name, namespace string, clnt client.Client, ...) error
- func MandatoryManifestExistsWithLabelAndAnnotation(ctx context.Context, clnt client.Client, annotationKey, annotationValue string) error
- func MandatoryModuleManifestExistWithCorrectVersion(ctx context.Context, clnt client.Client, moduleName, expectedVersion string) error
- func MandatoryModuleTemplateHasExpectedLabel(ctx context.Context, clnt client.Client, moduleName, key, value string) error
- func ManifestExists(ctx context.Context, clnt client.Client, ...) error
- func ManifestExistsByMetadata(ctx context.Context, clnt client.Client, ...) error
- func ManifestNoDeletionTimeStampSet(ctx context.Context, kymaName, kymaNamespace, moduleName string, ...) error
- func ManifestStatusLastUpdateTimeIsNotChanged(ctx context.Context, clnt client.Client, ...) error
- func ManifestStatusOperationContainsMessage(ctx context.Context, clnt client.Client, ...) error
- func ManifestVersionIsCorrect(ctx context.Context, clnt client.Client, ...) error
- func ModuleCRExists(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured) error
- func ModuleCRIsInExpectedState(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured, ...) bool
- func ModuleMessageInKymaStatusIsCorrect(ctx context.Context, clnt client.Client, ...) error
- func ModuleReleaseMetaBetaValueIsCorrect(ctx context.Context, client client.Client, namespace, name string, ...) error
- func ModuleReleaseMetaContainsCorrectChannelVersion(ctx context.Context, moduleName, namespace, channel, version string, ...) error
- func ModuleReleaseMetaExists(ctx context.Context, moduleName, namespace string, clnt client.Client) error
- func ModuleReleaseMetaInternalValueIsCorrect(ctx context.Context, client client.Client, namespace, name string, ...) error
- func ModuleTemplateExists(ctx context.Context, clnt client.Client, module v1beta2.Module, ...) error
- func ModuleTemplateExistsByName(ctx context.Context, clnt client.Client, moduleName string, namespace string) error
- func ModuleVersionInKymaStatusIsCorrect(ctx context.Context, clnt client.Client, ...) error
- func NewKymaWithSyncLabel(name, namespace, channel string) *v1beta2.Kyma
- func NewTemplateOperator(channel string) v1beta2.Module
- func NewTemplateOperatorWithVersion(version string) v1beta2.Module
- func NewTestIssuer(namespace string) *certmanagerv1.Issuer
- func NewTestKyma(name string) *v1beta2.Kyma
- func NewTestManifest(prefix string) *v1beta2.Manifest
- func NewTestModule(name, channel string) v1beta2.Module
- func NewTestModuleCR(namespace string) *unstructured.Unstructured
- func NewTestModuleWithChannelVersion(name, channel, version string) v1beta2.Module
- func NewTestModuleWithFixName(name, channel, version string) v1beta2.Module
- func NewTestNamespace(namespace string) *apicorev1.Namespace
- func NoManifestExist(ctx context.Context, clnt client.Client) error
- func NotContainsModuleInSpec(ctx context.Context, clnt client.Client, ...) error
- func PatchServiceToTypeLoadBalancer(ctx context.Context, clnt client.Client, serviceName, namespace string) error
- func PushToRemoteOCIRegistry(server *httptest.Server, manifestFilePath, layerName string) error
- func ReadModuleVersionFromModuleTemplate(ctx context.Context, clnt client.Client, module v1beta2.Module, ...) (string, error)
- func SampleCRDeletionTimeStampSet(ctx context.Context, name, namespace string, clnt client.Client) error
- func SampleCRNoDeletionTimeStampSet(ctx context.Context, name, namespace string, clnt client.Client) error
- func SetKymaState(ctx context.Context, kyma *v1beta2.Kyma, clnt client.Client, ...) error
- func SetModuleManaged(ctx context.Context, clnt client.Client, ...) error
- func SetModuleReleaseMetaBeta(ctx context.Context, beta bool, moduleName, namespace string, ...) error
- func SetModuleReleaseMetaInternal(ctx context.Context, internal bool, moduleName, namespace string, ...) error
- func SetSkipLabelToMandatoryManifests(ctx context.Context, clnt client.Client, ifSkip bool) error
- func SetSkipLabelToManifest(ctx context.Context, clnt client.Client, ...) error
- func SkipLabelExistsInManifest(ctx context.Context, clnt client.Client, ...) bool
- func SyncKyma(ctx context.Context, clnt client.Client, kyma *v1beta2.Kyma) error
- func UpdateAllModuleReleaseMetaChannelVersions(ctx context.Context, client client.Client, namespace, name, version string) error
- func UpdateChannelVersionInModuleReleaseMeta(ctx context.Context, clnt client.Client, ...) error
- func UpdateKymaLabel(ctx context.Context, clnt client.Client, ...) error
- func UpdateKymaModuleChannel(ctx context.Context, clnt client.Client, ...) error
- func UpdateManifestSpec(cxt context.Context, clnt client.Client, manifestName string, ...) error
- func UpdateManifestState(ctx context.Context, clnt client.Client, ...) error
- func UpdateModuleTemplateSpec(ctx context.Context, clnt client.Client, module v1beta2.Module, ...) error
- func WithInvalidInstallImageSpec(ctx context.Context, clnt client.Client, enableResource bool, ...) func(manifest *v1beta2.Manifest) error
- func WithValidInstallImageSpecFromFile(ctx context.Context, clnt client.Client, ...) func(manifest *v1beta2.Manifest) error
- func WithValidInstallImageSpecFromTar(ctx context.Context, clnt client.Client, ...) func(manifest *v1beta2.Manifest) error
Constants ¶
View Source
const ( TestModuleCRName = "sample-yaml" TestModuleName = "template-operator" TestModuleResourceNamespace = "template-operator-system" ModuleResourceName = "template-operator-controller-manager" ModuleServiceAccountName = "template-operator-controller-manager" ModuleManagedCRName = "template-operator-managed-resource" ModuleDeploymentNameInNewerVersion = "template-operator-v2-controller-manager" ModuleDeploymentNameInOlderVersion = "template-operator-v1-controller-manager" )
View Source
const ( RemoteNamespace = shared.DefaultRemoteNamespace ControlPlaneNamespace = "kcp-system" IstioNamespace = "istio-system" )
View Source
const ( Timeout = time.Second * 10 ConsistentCheckTimeout = time.Second * 10 Interval = time.Millisecond * 250 )
View Source
const DefaultFQDN = "kyma-project.io/module/template-operator"
View Source
const (
FastChannel = "fast"
)
View Source
const (
OCIRegistryCredLabelKeyForTest = shared.OperatorGroup + shared.Separator + "oci-registry-cred"
)
Variables ¶
View Source
var ( ErrStatusModuleStateMismatch = errors.New("status.modules.state not match") ErrContainsUnexpectedModules = errors.New("kyma CR contains unexpected modules") ErrNotContainsExpectedModules = errors.New("kyma CR not contains expected modules") ErrModuleVersionInStatusIsIncorrect = errors.New("status.modules.version is incorrect") ErrModuleMessageInStatusIsIncorrect = errors.New("status.modules.message is incorrect") )
View Source
var ( ErrManifestResourceIsNil = errors.New("manifest spec.resource is nil") ErrManifestsExist = errors.New("cluster contains manifest CRs") )
View Source
var ( ErrNotExpectedChannelVersion = errors.New("channel-version pair not found") ErrBetaValueNotCorrect = errors.New("beta value not correct") ErrInternalValueNotCorrect = errors.New("internal value not correct") )
View Source
var ( ErrLabelNotFound = errors.New("label is not found") ErrLabelValueNotCorrect = errors.New("label value is not as expected") )
View Source
var ( ErrNotFound = errors.New("resource does not exist") ErrNotDeleted = errors.New("resource has not been deleted") ErrDeletionTimestampFound = errors.New("deletion timestamp not nil") ErrSampleCrNotInExpectedState = errors.New("resource not in expected state") ErrFetchingStatus = errors.New("could not fetch status from resource") )
View Source
var ErrManifestStateMisMatch = errors.New("ManifestState mismatch")
Functions ¶
func AddFinalizerToManifest ¶
func AddFinalizerToModuleCR ¶
func AddFinalizerToModuleCR(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured, finalizer string, ) error
func AppendExternalCRDs ¶
func AppendExternalCRDs(path string, files ...string) ([]*apiextensionsv1.CustomResourceDefinition, error)
func CRIsInState ¶
func CheckManifestIsInState ¶
func CheckModuleState ¶
func ConditionExists ¶
func ContainsModuleInSpec ¶
func CreateImageSpecLayer ¶
func CreateImageSpecLayer(manifestFilePath string) (containerregistryv1.Layer, error)
func CreateModuleTemplate ¶
func CreateNamespace ¶
func CredSecretLabelSelector ¶
func CredSecretLabelSelector(labelValue string) *apimetav1.LabelSelector
func DeleteCRWithGVK ¶
func DeleteKyma ¶
func DeleteManifest ¶
func DeleteManifestAndVerify ¶
func DeleteModule ¶
func DeleteModuleReleaseMeta ¶
func DeleteModuleTemplate ¶
func DeletionTimeStampExists ¶
func DisableModule ¶
func EnableModule ¶
func ExpectManifestStateIn ¶
func FinalizerIsRemoved ¶
func FinalizerIsRemoved(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured, finalizer string, ) error
func GetCR ¶
func GetCR(ctx context.Context, clnt client.Client, objectKey client.ObjectKey, gvk schema.GroupVersionKind, ) (*unstructured.Unstructured, error)
func GetManifest ¶
func GetManifest(ctx context.Context, clnt client.Client, kymaName, kymaNamespace, moduleName string, ) (*v1beta2.Manifest, error)
GetManifest should be only used when manifest still been tracked in kyma.status.
func GetManifestResource ¶
func GetManifestResource(ctx context.Context, clnt client.Client, kymaName, kymaNamespace, moduleName string, ) (*unstructured.Unstructured, error)
func GetManifestSpecRemote ¶
func GetManifestStatus ¶
func GetManifestWithMetadata ¶
func GetManifestWithName ¶
func GetModuleReleaseMeta ¶
func GetModuleTemplate ¶
func HasExpectedLabel ¶
func ImmediatelyRequeueKyma ¶
func ImmediatelyRequeueKyma( ctx context.Context, clnt client.Client, kymaName, kymaNamespace string, ) error
ImmediatelyRequeueKyma adds a dummy label to the Kyma CR to trigger a requeue.
func InstallManifest ¶
func IsResourceVersionSame ¶
func KymaDeleted ¶
func KymaExists ¶
func KymaIsInState ¶
func ManifestExists ¶
func ModuleCRExists ¶
func ModuleCRExists(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured) error
func ModuleCRIsInExpectedState ¶
func ModuleCRIsInExpectedState(ctx context.Context, clnt client.Client, moduleCR *unstructured.Unstructured, expectedState shared.State, ) bool
func ModuleReleaseMetaExists ¶
func ModuleTemplateExists ¶
func NewKymaWithSyncLabel ¶
NewKymaWithSyncLabel use this function to initialize kyma CR with SyncStrategyLocalSecret are typically used in e2e test, which expect related access secret provided.
func NewTemplateOperator ¶
func NewTestIssuer ¶
func NewTestIssuer(namespace string) *certmanagerv1.Issuer
func NewTestKyma ¶
func NewTestManifest ¶
func NewTestModule ¶
func NewTestModuleCR ¶
func NewTestModuleCR(namespace string) *unstructured.Unstructured
NewTestModuleCR init one module cr used by template-operator.
func NewTestNamespace ¶
func NotContainsModuleInSpec ¶
func PushToRemoteOCIRegistry ¶
func SetKymaState ¶
func SetModuleManaged ¶
func SetSkipLabelToManifest ¶
func UpdateKymaLabel ¶
func UpdateKymaModuleChannel ¶
func UpdateManifestSpec ¶
func UpdateManifestState ¶
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.