Skip to content

Create ADR for properties that are sometimes secret and sometimes not#5303

Merged
theunrepentantgeek merged 5 commits intomainfrom
doc/secret-config-adr
Apr 14, 2026
Merged

Create ADR for properties that are sometimes secret and sometimes not#5303
theunrepentantgeek merged 5 commits intomainfrom
doc/secret-config-adr

Conversation

@theunrepentantgeek
Copy link
Copy Markdown
Member

What this PR does

Adds a design document discussing the options for handling properties that might sometimes be sensitive, but mostly are not.

How does this PR make you feel?

gif

Checklist

  • this PR contains documentation

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new Architecture Decision Record (ADR) describing how ASO should handle properties that are sometimes sensitive and sometimes not (optional secrets), and updates the design index to list the new ADR and reorganize entries.

Changes:

  • Add a new ADR describing configuration/generation options and the selected approach for optional secrets.
  • Update the design index to include the new ADR and move some prior items into the “Completed Changes” section.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
docs/hugo/content/design/ADR-2026-04-Secrets/_index.html New ADR documenting the problem space, options, and decision for “optional secrets”.
docs/hugo/content/design/_index.md Updates the ADR listing to include the new “Optional Secrets” ADR and reorganize prior entries.

Comment thread docs/hugo/content/design/ADR-2026-04-Secrets/_index.html
Comment thread docs/hugo/content/design/ADR-2026-04-Secrets/_index.html Outdated
Comment thread docs/hugo/content/design/ADR-2026-04-Secrets/_index.html
Comment thread docs/hugo/content/design/ADR-2026-04-Secrets/_index.html
Comment thread docs/hugo/content/design/ADR-2026-04-Secrets/_index.html Outdated
theunrepentantgeek and others added 2 commits April 10, 2026 12:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@matthchr matthchr left a comment

Choose a reason for hiding this comment

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

Approved, though I have notes about specifics (see comments)

Comment thread docs/hugo/content/design/ADR-2026-04-Secrets/_index.html

## Decision

Configuration Option 4: Change to new Enum, with backward compatibility.
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.

I'm not sold that we really need the back-compat complexity. It seems like it might be easier to just make a one-shot change? The number of outstanding PRs that would be impacted is not huge, and probably it's mostly us. I'd honestly rather do a bit more work now to ensure that we have a limited/more understandable number of options in azure-arm.yaml at the end of the day.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm only thinking of having back-compat for the very short term - removing it before v2.20 is released, and mostly to avoid us having to rework PRs that are otherwise completed. It also provides a window for external PRs to pop up without problems.

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.

Fine with that too as long as the end result is the simpler variant (not both in perpetuity)


## Configuration Option 4: Change to new Enum, with backward compatibility

Replace the existing `$isSecret` boolean with a new enum property, say `$secret` with values `always`, `never`, and
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.

Should we just match importConfigMapMode?

(From our azure-arm.yaml):

# $importConfigMapMode: <optional|required>
#     Specifies that the property can be imported from a config map.
#     Optional: The property may be specified as string or imported from a config map.
#               To achieve this in a non-breaking way, a new property is added to the object living alongside
#               the existing property. The new property is called <propName>FromConfig.
#     Required: The property must be specified from a config map, it cannot be given as a raw string.

Maybe with an added never if you want the 3 states explicitly (I think w/ importConfigMapMode we treat the absence of the field as an implied 3rd state == never. I don't love that but am fine with it if we wanted to do it for this secret field too)

Mostly I think the names and values should match as much as possible for consistency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We have a bunch of examples of $isSecret: false - used to turn off our heuristics, so we will definitely need never as a possible value. ConfigMaps don't have heuristics popping up, so they don't need the third value.

Copy link
Copy Markdown
Member Author

@theunrepentantgeek theunrepentantgeek Apr 13, 2026

Choose a reason for hiding this comment

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

I don't love the name $importConfigMapMode but going with $importSecretMode for consistency would be good. Changed.

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.

TBH I'd be fine changing them both to something else too. Just feels like they should be consistent between them is all.

@theunrepentantgeek theunrepentantgeek added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit 663b1d1 Apr 14, 2026
10 checks passed
@theunrepentantgeek theunrepentantgeek deleted the doc/secret-config-adr branch April 14, 2026 00:18
@github-project-automation github-project-automation Bot moved this from In Progress to Recently Completed in Azure Service Operator Roadmap Apr 14, 2026
@matthchr matthchr moved this from Recently Completed to Ready for Release in Azure Service Operator Roadmap Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants