StatCan / aaw

Documentation for the Advanced Analytics Workspace Platform
https://statcan.github.io/aaw/
Other
69 stars 12 forks source link

Label support for shared namespaces #1385

Open vexingly opened 2 years ago

vexingly commented 2 years ago

Shared namespaces created manually by the AAW team need aggregation labels for kubecost, these will need to be provided by the user for the namespace creation and should be added to the template in https://github.com/StatCan/aaw-kubeflow-profiles

Support in kubecost for these labels already exists: https://gitlab.k8s.cloud.statcan.ca/cloudnative/terraform/modules/terraform-statcan-kubernetes-core-platform/-/blob/main/kubecost.tf

    owner_label: "project.statcan.gc.ca/lead"
    team_label: "project.statcan.gc.ca/team"
    department_label: "project.statcan.gc.ca/division"
    product_label: "finance.statcan.gc.ca/workload-id"
    product_external_label: "wid"
vexingly commented 2 years ago

POC: https://github.com/StatCan/aaw-kubeflow-profiles/blob/main/profile-ledge-test.jsonnet

Recommendation:

local nslabels = {
  'istio-injection': 'enabled',
  'finance.statcan.gc.ca/workload-id': '1234',
  'project.statcan.gc.ca/lead': std.split(owner, '@')[0],
  'project.statcan.gc.ca/division': std.split(owner, '@')[1],
  'project.statcan.gc.ca/team': std.split(name, '-')[0]
  };

workload-id could be changed to FRC/PE, finance can work with both so it should be determined based on what users/projects are able to most easily provide to us... the cloud team uses WID so to integrate with them more easily that should be our preference.