Skip to content

bob build --local: isolate PVCs per user to avoid collisions on shared clusters #22

@vtz

Description

@vtz

Problem

When multiple developers use bob build <name> --local on the same cluster, they all share the default PVC source-code in the bob-builds namespace. This means one developer's sync overwrites another's source, and concurrent local builds can read partially-overwritten content.

Proposed Solution

Auto-derive a per-user PVC name so each developer gets their own PVC without needing to manually pass --pvc. For example:

  • Use oc whoami / kube client identity to get the username
  • Default PVC name becomes source-code-<username> instead of source-code

The --pvc flag would remain as an explicit override.

Alternatives Considered

  • Per-user namespace (bob-builds-<user>): full isolation of PVCs, BuildJobs, and PipelineRuns, but heavier to set up and requires namespace provisioning.
  • Keep as-is: works fine for single-developer clusters; the --pvc flag provides manual isolation.

Acceptance Criteria

  • bob build --local and bob sync default to a user-specific PVC name
  • No manual --pvc flag needed for multi-developer isolation
  • --pvc flag still works as an explicit override
  • PVC auto-creation (ensurePVC) works with the derived name

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions