Documentation
¶
Index ¶
- Constants
- func AddDeletionProtection(instance metav1.Object)
- func AddTenantLabel(meta *metav1.ObjectMeta, tenant string)
- func CreateOrUpdateGitRepo(obj metav1.Object, scheme *runtime.Scheme, ...) (controllerutil.OperationResult, error)
- func GetDeletionPolicy() synv1alpha1.DeletionPolicy
- func GetGitRepoURLAndHostKeys(obj metav1.Object, client client.Client) (string, string, error)
- func RenderTemplate(tmpl string, data interface{}) (string, error)
- func SliceContainsString(list []string, s string) bool
- type DeletionState
- type SecretSortList
Constants ¶
const (
// DeleteProtectionAnnotation defines the delete protection annotation name
DeleteProtectionAnnotation = "syn.tools/protected-delete"
)
Variables ¶
This section is empty.
Functions ¶
func AddDeletionProtection ¶ added in v0.2.0
AddDeletionProtection annotations to the instance
func AddTenantLabel ¶
func AddTenantLabel(meta *metav1.ObjectMeta, tenant string)
AddTenantLabel adds the tenant label to an object.
func CreateOrUpdateGitRepo ¶
func CreateOrUpdateGitRepo(obj metav1.Object, scheme *runtime.Scheme, template *synv1alpha1.GitRepoTemplate, client client.Client, tenantRef corev1.LocalObjectReference) (controllerutil.OperationResult, error)
CreateOrUpdateGitRepo will create the gitRepo object if it doesn't already exist. If the owner object itself is a tenant tenantRef can be set nil.
func GetDeletionPolicy ¶ added in v0.2.0
func GetDeletionPolicy() synv1alpha1.DeletionPolicy
GetDeletionPolicy gets the configured default deletion policy
func GetGitRepoURLAndHostKeys ¶
GetGitRepoURLAndHostKeys for an instance
func RenderTemplate ¶ added in v0.3.0
RenderTemplate renders a given template with the given data
func SliceContainsString ¶ added in v0.2.0
SliceContainsString checks if the slice of strings contains a specific string
Types ¶
type DeletionState ¶ added in v0.2.0
DeletionState of the instance
func HandleDeletion ¶ added in v0.2.0
func HandleDeletion(instance metav1.Object, finalizerName string, client client.Client) DeletionState
HandleDeletion will handle the finalizers if the object was deleted. It will return true, if the finalizer was removed. If the object was removed the reconcile can be returned.
type SecretSortList ¶
type SecretSortList corev1.SecretList
SecretSortList to sort secrets
func (SecretSortList) Len ¶
func (s SecretSortList) Len() int
func (SecretSortList) Less ¶
func (s SecretSortList) Less(i, j int) bool
func (SecretSortList) Swap ¶
func (s SecretSortList) Swap(i, j int)