Skip to content

fix: Don't crash on Secret/ConfigMap names with more than 63 charaters - #443

Open
sbernauer wants to merge 2 commits into
mainfrom
test/use-long-secret-name
Open

fix: Don't crash on Secret/ConfigMap names with more than 63 charaters#443
sbernauer wants to merge 2 commits into
mainfrom
test/use-long-secret-name

Conversation

@sbernauer

@sbernauer sbernauer commented Aug 5, 2026

Copy link
Copy Markdown
Member

Description

Needs stackabletech/operator-rs#1260

Fixes the bug report from https://discord.com/channels/796665978481803304/1078279230925848598/1534440172802932776

Thanks, you were right: I retested it and the ignore-secret annotation does not work around the issue.

We are running SDP 26.7.0. The referenced Secret name is 72 characters long. (automatically created by zalando postgres operator)

The SupersetCluster contains:
restarter.stackable.tech/ignore-secret.postgres: <72-character-secret-name>

StatefulSet creation still fails with:

ERROR stackableoperator::logging::controller: Failed to reconcile object controller.name="statefulset.restarter.commons.stackable.tech" error=reconciler for object StatefulSet.v1.apps/xxx failed error.sources=[failed to patch object StatefulSet.v1.apps/xxx, ApiError: StatefulSet.apps "xxx" is invalid: spec.template.annotations: Invalid value: "secret.restarter.stackable.tech/hiverest-owner-user.stackable-postgres-cluster.credentials.postgresql.acid.zalan.do": name part must be no more than 63 characters: Invalid (Status { status: Some(Failure), code: 422, message: "StatefulSet.apps "xxx" is invalid: spec.template.annotations: Invalid value: "secret.restarter.stackable.tech/hiverest-owner-user.stackable-postgres-cluster.credentials.postgresql.acid.zalan.do": name part must be no more than 63 characters", metadata: Some(ListMeta { continue: None, remaining_item_count: None, resource_version: None, self_link: None, shard_info: None }), reason: "Invalid", details: Some(StatusDetails { name: "xxx", group: "apps", kind: "StatefulSet", uid: "", causes: [StatusCause { reason: "FieldValueInvalid", message: "Invalid value: "secret.restarter.stackable.tech/hiverest-owner-user.stackable-postgres-cluster.credentials.postgresql.acid.zalan.do": name part must be no more than 63 characters", field: "spec.template.annotations" }], retry_after_seconds: 0 }) }), StatefulSet.apps "xxx" is invalid: spec.template.annotations: Invalid value: "secret.restarter.stackable.tech/xxx.postgresql.acid.zalan.do": name part must be no more than 63 characters: Invalid]

The StatefulSet is therefore not created.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

@sbernauer sbernauer changed the title test: Use long Secret name fix: Don't crash on Secret/ConfigMap names with more than 63 charaters Aug 5, 2026
@sbernauer sbernauer self-assigned this Aug 5, 2026
@sbernauer sbernauer moved this to Development: Waiting for Review in Stackable Engineering Aug 5, 2026
@siegfriedweber siegfriedweber moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Aug 5, 2026

@siegfriedweber siegfriedweber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general approach looks okay. That said, some changes may be needed depending on how stackabletech/operator-rs#1260 turns out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Development: In Review

Development

Successfully merging this pull request may close these issues.

2 participants