Repository navigation
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/featureType feature: a new functionvalue/highValue High: the delivery of the item matters much
Description
Friction
- Stack names appear in three places, so a new stack can be left out of
allor out of a help text. - The cluster secret push table cannot build a value from other values of the same push, and every pushed Secret has the type
Opaque. A database Secret with a connection string of typekubernetes.io/basic-auththerefore cannot come from the table. The Mattermost database of feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 and the integrations of feat(k8s): alertmanager posts critical and warning alerts to mattermost's alerts channel, and a roadmap service repository whose rounds all fail for an hour alerts #1392 and feat(k8s): argo cd's notifications controller posts the devops application's deploys and every failed sync to mattermost's deploys channel #1393 need both features.
Evidence
Checked at main a752a14.
VALID_STACKSis declared insrc/devops_cli/commands/k8s/networking.py:65and again insrc/devops_cli/commands/k8s/stack_lifecycle.py:251._resolve_stacks(networking.py:67-77) repeats the names as literals.HELP.k8s.stacksays "Stack to operate on: infra | llm | all." (src/devops_cli/lang/en/help.py:403), which leaves outlogginganddevops.src/devops_cli/k8s/secret_push.py:566writes"type": "Opaque"for every Secret.src/devops_cli/k8s/cluster_secrets.pyhas no derived entry.- The post-Helm table
_POST_HELM_BY_STACKalready exists (stack_lifecycle.py:246-249, since v0.2.38), so this change does not add it. - feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 lists this change as its PR 1. After the split, feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 only tracks its child issues, and no pull request closes feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 itself. So this candidate asks for a change that no other issue holds.
Existing tool considered
- A Kubernetes Secret has a
typefield.kubernetes.io/basic-authis a built-in type with the keysusernameandpassword. urllib.parse.quote(..., safe="")quotes the credentials of a derived connection string. No new library is necessary.
Proposed remedy
- Declare the stack names once, in one tuple in
networking.py. Deriveall, the valid names and every help text that lists stacks from it. - Add derived entries to the push table: a value built from other values of the same push and never stored on its own.
- Let a row name its Secret type, with the default
Opaque. - Add the in-cluster Mattermost base URL as one constant in
src/devops_cli/config/constants.py. - Change no manifest under
k8s/.
Acceptance criteria
- Stack names live in one tuple in
networking.py._resolve_stacksderivesalland the valid names from that tuple, andstack_lifecycle.pykeeps no copy. - Every help text that lists stacks takes the names from that tuple: the
--stackhelp of deploy-stack and teardown-stack (HELP.k8s.stack), the deploy-stack summary and thepush_stackhelp. - A derived entry's value is built from other values of the same push, and never stored on its own.
--planshows it asderived, and--dry-runas<placeholder>. - A row may name its Secret type. It defaults to
Opaque. A test asserts that a pushed manifest carries the type of its row. - The in-cluster base URL
http://mattermost.mattermost.svc.cluster.local:8065is one constant insrc/devops_cli/config/constants.py. - No manifest under
k8s/changes. - Tests run offline over the keyring and cluster fakes.
uv run devops cipasses.
Source: #1391
Proposed design
Problem statement
Stack names appear in three places. A new stack can be left out of all or a help text. The cluster secret push table cannot build a value from other values of the same push. Every pushed Secret has the type Opaque. A database Secret of type kubernetes.io/basic-auth cannot come from the table.
Acceptance criteria
- Criterion 1: Stack names live in one tuple.
_resolve_stacksderivesalland the valid names from that tuple.stack_lifecycle.pykeeps no copy.
Verification: Rungrep -rn 'VALID_STACKS\|valid_stacks' src/devops_cli/commands/k8s/. Only one declaration exists.networking.pyandstack_lifecycle.pyimport it from the single source. - Criterion 2: Every help text that lists stacks takes the names from the tuple. The
--stackhelp, the deploy-stack summary, and thepush_stackhelp all list every valid stack.
Verification: Rundevops k8s deploy-stack --help. The--stackoption lists all valid stacks. Rundevops k8s push-secrets --help. The help lists all valid stacks. No help text omits a valid stack. - Criterion 3: A derived entry builds its value from other values of the same push. It never stores on its own.
--planshows it asderived.--dry-runshows it as. Verification: Run `devops k8s push-secrets --plan` with a derived entry present. The output shows `derived`. Run `devops k8s push-secrets --dry-run`. The output shows. No keyring write occurs for the derived entry. - Criterion 4: A row may name its Secret type. The default is
Opaque. A test asserts that a pushed manifest carries the type of its row.
Verification: Run the test suite. A test creates aClusterSecretwithsecret_type="kubernetes.io/basic-auth". The pushed manifest carries that type. A row with no explicit type carriesOpaque. - Criterion 5: The in-cluster base URL
http://mattermost.mattermost.svc.cluster.local:8065is one constant insrc/devops_cli/config/constants.py.
Verification: Rungrep -c 'mattermost.mattermost.svc.cluster.local' src/devops_cli/config/constants.py. The count is 1. No other file insrc/defines the same literal. - Criterion 6: No manifest under
k8s/changes.
Verification: Rungit diff --name-only. No path starts withk8s/. - Criterion 7: Tests run offline over the keyring and cluster fakes.
uv run devops cipasses.
Verification: Runuv run devops ci. The exit code is 0.
Key questions
- Where does the single stack tuple live?: The tuple lives in
src/devops_cli/config/constants.pyasCONST_K8S_VALID_STACKS.networking.pyandstack_lifecycle.pyimport it from there. This refines the issue's proposal ofnetworking.pybecause the constant already exists inconstants.py. (proposed) [sources: src/devops_cli/config/constants.py] - Does
CONST_K8S_VALID_STACKSalready exist inconstants.py?: Yes. It is declared insrc/devops_cli/config/constants.pywith the valuesinfra,llm,logging,devops,gitea,all. [sources: src/devops_cli/config/constants.py] - Does
cluster_secrets.pyalready have a derived entry type?: No. TheSecretEntrydataclass has no derived field. TheSecretSourceunion has no derived member. A new source type or field must be added. [sources: src/devops_cli/k8s/cluster_secrets.py] - What is the structure of a derived entry?: A derived entry is a new source type in
cluster_secrets.py. It references other keys of the same push by name. A builder function constructs the value from those keys usingurllib.parse.quote(..., safe=""). The entry never stores on its own. (proposed) [sources: src/devops_cli/k8s/cluster_secrets.py] - Where does the Secret type field live?: The
ClusterSecretdataclass gains asecret_typefield. It defaults toOpaque.secret_push.pyreads it when building the manifest. This is a row-level field, not an entry-level field. (proposed) [sources: src/devops_cli/k8s/cluster_secrets.py, src/devops_cli/k8s/secret_push.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
effort/mediumEffort Mediumpriority/p2-mediumPriority P2: standard worksource/agentFiled by an agenttype/featureType feature: a new functionvalue/highValue High: the delivery of the item matters much
Type
Projects
- StatusShow more project fieldsReady
- StatusShow more project fieldsNew
Activity
dan-petty commentedon Oct 23, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate adds new functionality for stack names and secret types.The change improves usability and supports new secret types.Users benefit from less error-prone stack management and better secret support.The change requires updates in multiple files and adds derived entry logic.dan-petty commentedon Oct 28, 2026
Status set to Ready at bb46660 (see proposed design in issue body).
chore(main): release 0.15.0 (#2623)