Skip to content

StatefulSet selector and template labels configuration issue in jupyter/rocm/tensorflow #1264

Closed as not planned
@coderabbitai

Description

@coderabbitai

Problem Description

The StatefulSet configuration in jupyter/rocm/tensorflow/ubi9-python-3.12/kustomize/base/statefulset.yaml has empty spec.selector and template.metadata.labels fields. This configuration causes several issues:

  • Kubernetes will reject the manifest with: .spec.selector: Invalid value: {}: field is immutable and must be specified
  • Pods created by the StatefulSet will have no labels
  • The associated Service cannot properly select and route traffic to the pods
  • Rolling update operations will not function correctly
  • Future label updates will be blocked due to selector immutability constraints

Impact

This affects the networking and update functionality of the ROCm TensorFlow Jupyter notebook deployment on the UBI9 Python 3.12 environment.

Suggested Fix

Add a non-empty label set and match it in the selector:

spec:
  selector:
    matchLabels:
      app: notebook
  template:
    metadata:
      labels:
        app: notebook

Also update the Service labels accordingly to maintain consistency.

Context

This issue was identified during code review of the ROCm TensorFlow Python 3.12 image addition.

References:

Reported by: @jiridanek

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions