Repository navigation
[02/02] service-k8s: reconcile identity-separated backup and restore Jobs with truthful status - #65
Open
chrischeng-c4 wants to merge 1 commit into
Open
chrischeng-c4 wants to merge 1 commit into
chrischeng-c4 wants to merge 1 commit into
Conversation
… Identity support
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.
Closes #19
Summary of Changes
ServiceAccountIdentityPlanincrates/service-k8s/src/infrastructure/manifest/workload_plan/service_account_identity.rs:new(name, component),with_annotation(key, value),with_workload_identity(gcp_service_account_email), andtry_with_workload_identity.name,component,annotations,automount_service_account_token(fixed tofalse), andworkload_identity.metadata.annotationsonly when at least one annotation is present; otherwise output matchesServiceAccountPlan.<name>@<project>.iam.gserviceaccount.com(rejecting empty or malformed strings withWorkloadPlanError::InvalidWorkloadIdentity).WorkloadPlanincrates/service-k8s/src/infrastructure/manifest/workload_plan.rs:ServiceAccountIdentity(ServiceAccountIdentityPlan)toPlannedObject.add_service_account_identity.WorkloadPlanError::InvalidWorkloadIdentity(String, String).renderto renderPlannedObject::ServiceAccountIdentity.ServiceAccountIdentityPlanandProjectedServiceAccountTokenincrates/service-k8s/src/api/render.rsandcrates/service-k8s/src/api/render::workload_plan.crates/service-k8s/tests/it/workload_plan.rs:typed_plan_renders_identity_separated_backup_and_restore_service_accounts: verifies distinct backup and restore KSAs with Workload Identity annotations, bound to disjoint Roles with disjoint RBAC rules.typed_plan_renders_pod_with_projected_service_account_token_and_no_secret_volume: verifies pod mountingProjectedServiceAccountTokenwith caller audience,expirationSeconds >= 600, and no Secret volume.service_account_identity_without_annotations_omits_annotations_key_and_equals_service_account_plan: verifies absence ofannotationskey when none configured and exact equality toServiceAccountPlan.service_account_identity_rejects_empty_or_invalid_workload_identity_shape: verifies rejection of empty string, missing@, wrong domain, empty name, and empty project acrossrenderand builder.Tests Passed (Local Affected Isolated Unit Tests)
cargo test --locked -p service-k8s --test it workload_plan(9 passed, 0 failed)rustfmt --checkon modified filesTests Not Run Locally (Awaiting Cloud MR CI)