Conversation
This reverts commit a9bb945.
Comment on lines
+158
to
+160
| name = "acmesmith-autorenew-${each.key}" | ||
| namespace = "default" | ||
| } |
There was a problem hiding this comment.
Bug: Critical one-time setup jobs are configured with wait_for_completion = false, which can lead to silent failures and leave the system in a non-functional state without any operator warning.
Severity: HIGH
Suggested Fix
Set wait_for_completion = true for the new-account and order-resolver-rubykaigi-net kubernetes_job_v1 resources. This will ensure that the Terraform apply process waits for these critical setup jobs to complete successfully and will fail if they do not, providing immediate feedback to the operator.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: tf/acmesmith/acmesmith.tf#L158-L160
Potential issue: The `kubernetes_job_v1` resources for `new-account` and
`order-resolver-rubykaigi-net` are configured with `wait_for_completion = false`. These
are critical one-time setup jobs that provision ACME account keys and order
certificates. If these jobs fail due to network issues, API errors from Let's Encrypt,
or configuration problems, Terraform will still report a successful `apply` and exit.
This silent failure leaves the infrastructure in a broken state, as dependent production
services will lack the necessary certificates to function, and the issue will only be
discoverable by manually inspecting Kubernetes job statuses.
Did we get this right? 👍 / 👎 to inform future reviews.
sorah
approved these changes
Apr 16, 2026
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.
次回はcert-managerにします