Add labels and annotations to Org namespace on control-plane #96

Closed
opened 2025-06-06 07:26:40 +00:00 by tobru · 1 comment
Owner

Stories

As an admin, I want to see additional information about a namespace in the control-plane

We generate the organization namespace to be org-$ID, which lacks information when working directly on the control-plane.

Implementation Notes

When creating a namespace in the control-plane, set the following metadata:

Labels:

  • servala.com/organization_id = $Organization.id
  • servala.com/erp_company_id = $Organization.billing_entity.odoo_company_id
  • servala.com/erp_invoice_id = $Organization.billing_entity.odoo_invoice_id

Annotations:

  • servala.com/organization = $Organization.name
  • servala.com/billing = $Organization.billing_entity.name
  • servala.com/origin = $Organization.OrganizationOrigin.name
  • servala.com/origin = $Organization.sales_order

Refs:

## Stories _As an admin, I want to see additional information about a namespace in the control-plane_ We generate the organization namespace to be `org-$ID`, which lacks information when working directly on the control-plane. ## Implementation Notes When creating a namespace in the control-plane, set the following metadata: Labels: * `servala.com/organization_id = $Organization.id` * `servala.com/erp_company_id = $Organization.billing_entity.odoo_company_id` * `servala.com/erp_invoice_id = $Organization.billing_entity.odoo_invoice_id` Annotations: * `servala.com/organization = $Organization.name` * `servala.com/billing = $Organization.billing_entity.name` * `servala.com/origin = $Organization.OrganizationOrigin.name` * `servala.com/origin = $Organization.sales_order` Refs: - https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
tobru added the
enhancement
label 2025-06-06 07:26:40 +00:00
tobru added this to the Development Planning project 2025-06-06 07:26:40 +00:00
Member

Implemented – Currently part of #66.

You wrote servala.com/origin twice, I changed the latter to servala.com/sales_order – the Servala model field currently is called sale_order (singular), please let me know which you prefer.

Results of the code in #66 atm:

kubectl --kubeconfig kubeconfig-dev-servala-portal describe namespace org-5     
Name:         org-5
Labels:       kubernetes.io/metadata.name=org-5
              servala.com/erp_company_id=7720
              servala.com/erp_invoice_id=7721
              servala.com/organization_id=5
Annotations:  servala.com/billing: Default origin
              servala.com/organization: Servala Test Org 004
              servala.com/origin: Servala Test Org 004
              servala.com/sales_order: 1116
Status:       Active

No resource quota.

No LimitRange resource.
Implemented – Currently part of #66. You wrote `servala.com/origin` twice, I changed the latter to `servala.com/sales_order` – the Servala model field currently is called `sale_order` (singular), please let me know which you prefer. Results of the code in #66 atm: ``` kubectl --kubeconfig kubeconfig-dev-servala-portal describe namespace org-5 Name: org-5 Labels: kubernetes.io/metadata.name=org-5 servala.com/erp_company_id=7720 servala.com/erp_invoice_id=7721 servala.com/organization_id=5 Annotations: servala.com/billing: Default origin servala.com/organization: Servala Test Org 004 servala.com/origin: Servala Test Org 004 servala.com/sales_order: 1116 Status: Active No resource quota. No LimitRange resource. ```
tobru closed this issue 2025-06-23 07:31:41 +00:00
Sign in to join this conversation.
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: servala/servala-portal#96
No description provided.