From a36b24b7ae5718930fae0bd41de2850aece6e717 Mon Sep 17 00:00:00 2001 From: abdulhaseeb2 Date: Wed, 20 Jul 2022 15:06:44 +0500 Subject: [PATCH 1/2] Update change logs --- content/sre/tenant-operator/changelog.md | 17 +++++++++++++- .../sre/tenant-operator/customresources.md | 22 ++++++++++--------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/content/sre/tenant-operator/changelog.md b/content/sre/tenant-operator/changelog.md index 3b2f7211..cb9cb1b8 100644 --- a/content/sre/tenant-operator/changelog.md +++ b/content/sre/tenant-operator/changelog.md @@ -1,5 +1,20 @@ # Changelog +## v0.5.0 + +### Changes + +- feat: Add support for tenant namespaces off-boarding. For more details check out [onDelete](./customresources.html#_2-tenant) +- feat: Add tenant webhook for spec validation + +- fix: TemplateGroupInstance now removes created resources if TGI selector namespace label is updated +- fix: Fixed hibernation sync issue + +- enhance: Update tenant spec for applying common/specific namespace labels/annotations. For more details check out [commonMetadata & SpecificMetadata](./customresources.html#_2-tenant) +- enhance: Add support for multi-pod architecture for Operator-Hub + +- chore: Remove conversion webhook for Quota and Tenant + ## v0.4.7 ### Changes @@ -11,7 +26,7 @@ ### Changes -- fix: Revert v0.4.4 +- fix: Revert v0.4.4 ## v0.4.5 diff --git a/content/sre/tenant-operator/customresources.md b/content/sre/tenant-operator/customresources.md index 23a497e6..314094fd 100644 --- a/content/sre/tenant-operator/customresources.md +++ b/content/sre/tenant-operator/customresources.md @@ -83,8 +83,10 @@ spec: viewers: users: - jose@stakater.com - sandbox: true quota: medium + sandbox: true + onDelete: + cleanNamespaces: true argocd: sourceRepos: - https://github.com/stakater/gitops-config @@ -130,14 +132,17 @@ spec: * Tenant will have a `Quota` to limit resource consumption. -* `argocd` can be used to list `sourceRepos` that point to your gitops repositories. The field is required if you want to create an ArgoCD AppProject for the tenant. - -* `hibernation` can be used to create a schedule during which the namespaces belonging to the tenant will be put to sleep. The values of the `sleepSchedule` and `wakeSchedule` fields must be a string in a cron format. - * Tenant will have an option to create *sandbox namespaces* for owners and editors, when `sandbox` is set to *true*. * Sandbox will follow the following naming convention **{TenantName}**-**{UserName}**-*sandbox*. * In case of groups, the sandbox namespaces will be created for each member of the group. +* `onDelete` is used to tell Tenant-Operator what to do when a Tenant is deleted. + * `cleanNamespaces` if the value is set to **true** *Tenant-Operator* deletes all *tenant namespaces* when a `Tenant` is deleted. Default value is **false**. + +* `argocd` can be used to list `sourceRepos` that point to your gitops repositories. The field is required if you want to create an ArgoCD AppProject for the tenant. + +* `hibernation` can be used to create a schedule during which the namespaces belonging to the tenant will be put to sleep. The values of the `sleepSchedule` and `wakeSchedule` fields must be a string in a cron format. + * Namespaces can also be created via tenant CR by *specifying names* in `namespaces`. * Tenant-Operator will append *tenant name* prefix while creating namespaces, so the format will be **{TenantName}**-**{Name}**. * `stakater.com/kind: {Name}` label will also be added to the namespaces. @@ -151,16 +156,13 @@ spec: * `annotations` distributes given annotations among specific tenant namespaces * `namespaces` consists a list of specific tenant namespaces across which the labels and annotations will be distributed -#### :memo: Note -If same label or annotation key is being applied using different methods provided, then the highest precedence will be given to `specificMetadata` followed by `commonMetadata` and in the end would be the ones applied from `openshift.project.labels`/`openshift.project.annotations` in `IntegrationConfig` - * Tenant automatically deploys `template` resource mentioned in `templateInstances` to matching tenant namespaces. * `Template` resources are created in those `namespaces` which belong to a `tenant` and contain `matching labels`. * `Template` resources are created in all `namespaces` of a `tenant` if `selector` field is empty. -::: warning Warning: +::: warning Note: -* If tenant is deleted, then all namespaces created by tenant will also be deleted(spec.namespaces and sandbox namespaces). +If same label or annotation key is being applied using different methods provided, then the highest precedence will be given to `specificMetadata` followed by `commonMetadata` and in the end would be the ones applied from `openshift.project.labels`/`openshift.project.annotations` in `IntegrationConfig` ::: From c2c8441bc4c278f2f4aa5e10fd4b9ac07306f050 Mon Sep 17 00:00:00 2001 From: Abdul Haseeb Date: Wed, 20 Jul 2022 15:46:48 +0500 Subject: [PATCH 2/2] Update changelog.md --- content/sre/tenant-operator/changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/sre/tenant-operator/changelog.md b/content/sre/tenant-operator/changelog.md index cb9cb1b8..5607d2ad 100644 --- a/content/sre/tenant-operator/changelog.md +++ b/content/sre/tenant-operator/changelog.md @@ -7,7 +7,7 @@ - feat: Add support for tenant namespaces off-boarding. For more details check out [onDelete](./customresources.html#_2-tenant) - feat: Add tenant webhook for spec validation -- fix: TemplateGroupInstance now removes created resources if TGI selector namespace label is updated +- fix: TemplateGroupInstance now cleans up leftover Template resources from namespaces that are no longer part of TGI namespace selector - fix: Fixed hibernation sync issue - enhance: Update tenant spec for applying common/specific namespace labels/annotations. For more details check out [commonMetadata & SpecificMetadata](./customresources.html#_2-tenant)