Skip to content

Update kustomize manifests to follow best practices of Notebooks WG #180

@andyatmiami

Description

@andyatmiami

Description

The Kubeflow Notebooks WG has been actively working on the Notebooks 2.0 application and one of the efforts they invested in was modernizing the kustomize manifests to follow current best practices.

As the kubeflow/dashboard repository is also under the purview of the Notebooks WG - we want to align the manifest structure in this repo with the notebooks-v2 branch of kubeflow/notebooks.

At a high level - this boils down to 2 concepts:

  1. consistently and meaningfully applying app.kubernetes.io/xxxx labels to all resources
  2. structuring the kustomize folder hierarchy to highlight the following concepts:
    • base
    • components
    • overlays

The following PRs for the kubeflow/notebooks repo tackled these areas and can be used for inspiration:

Implementation Details

app.kubernetes.io/* labels

  • app.kubernetes.io/part-of: kubeflow-dashboard
    • static label that can be applied to everything in repo
  • app.kubernetes.io/managed-by: kustomize
    • static label that can be applied to any/all manifests defined in repo under kustomize directory
  • app.kubernetes.io/name: ***
    • ex: app.kubernetes.io/name: profile-controller
    • name of an application within the repo
    • ℹ️ confusingly, this concept probably maps to the components/ directory of the repo
  • app.kubernetes.io/component: ***
    • name of a related group of resources within the application.
      • ex: app.kubernetes.io/component: manager

kustomize directory structure

manifests
└── kustomize
    ├── base
    │   ├── kustomization.yaml
    │   ├── ...
    ├── components
    │   ├── example-comp-1
    │   │   └── kustomization.yaml
    │   └── example-comp-2
    │       ├── kustomization.yaml
    │       └── ...
    └── overlays
        └── example-overlay-1
            └── kustomization.yaml

Acceptance Criteria

  • Common app.kubernetes.io/* labels applied to all resources in manifests/kustomize
  • Respective kustomize-related folders under each components/ directory follows aforementioned hierarchy
  • minimal (ideally no) changes to rendered manifests with exception of app.kubernetes.io/* related changes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions