Update PostgreSQL demo secret connection - #2656
Open
willdavsmith wants to merge 2 commits into
Open
Conversation
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
Signed-off-by: willdavsmith <willdavsmith@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the getting-started PostgreSQL demo to use the newly merged direct
Radius.Security/secretsconnection contract on Kubernetes.postgresql-client-credentials-*Radius Secret containing the same developer-supplied password passed by value to PostgreSQL.postgresqldatabase connection for host, port, database, username, and dependency ordering.postgresqlcredentialsSecret connection, which projectsCONNECTION_POSTGRESQLCREDENTIALS_PASSWORDthrough a KubernetessecretKeyRef.CONNECTION_POSTGRESQL_PASSWORDas an older/mixed-installation fallback; conflicting values fail explicitly.Reason for change
radius-project/radius#12709 and radius-project/resource-types-contrib#300 added direct Secret connection projection. radius-project/resource-types-contrib#298 corrected PostgreSQL secret ownership so the Recipe no longer returns the developer-supplied password as a managed output. The demo now supplies that credential through its own Secret.
This remains backward compatible while installations transition: older PostgreSQL Recipes continue to provide
CONNECTION_POSTGRESQL_PASSWORD, newer Kubernetes Recipes provideCONNECTION_POSTGRESQLCREDENTIALS_PASSWORD, and matching values are accepted when both are present. The new direct Secret projection is Kubernetes-only; Azure ACI connection behavior is unchanged.The repository's
Build samplesworkflow buildsghcr.io/radius-project/samples/demo:latestfor pull requests without pushing it. A push toedgebuilds and publishes thatlatesttag, so no image was manually published for this PR.How to test
npm run buildinsamples/demoBICEP_PATH="$HOME/.rad/bin" python3 ./.github/scripts/validate_bicep.pybicep format samples/demo/app-postgresql.bicep --stdoutdiff checkgit diff --checkThe PR image build and Bicep validation pass. The K3D sample-test matrix currently fails during shared Radius setup before app deployment (
unknown flag: --previewfor preview samples and missingdefaultresource group for legacy samples), unrelated to this change.File change summary
samples/demo/app-postgresql.bicepsamples/demo/src/db/repository.tssamples/demo/README.md