Repository navigation
Conversation
EItanya
left a comment
There was a problem hiding this comment.
🤖 AI-generated review. Comment left by Claude on behalf of @EItanya.
Looks good overall, and helm unittest charts/substrate passes. Two things come from main moving since this branched:
Separate atelet chart. For the S3 role use case, atelet needs the role too, not just ate-api. Its node object-store plugin uploads and downloads snapshots with the pod's ambient credentials (config.LoadDefaultConfig in pkg/objectstorage/env.go). This PR covers atelet in charts/substrate, but main now has charts/substrate-atelet (#126) with its own atelet ServiceAccount (charts/substrate-atelet/templates/atelet.yaml). After rebasing, that chart needs atelet.serviceAccount too. It's also worth saying in the description that atelet needs the role.
Inline comments cover the rest.
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| apps: ate-client | ||
| {{- with .Values.ateClient.serviceAccount.labels }} |
There was a problem hiding this comment.
If a user sets apps here, the key renders twice. For example, --set ateClient.serviceAccount.labels.apps=override renders apps: ate-client and then apps: override. kubectl apply --dry-run=client accepts it without an error, so which value wins depends on the parser. The same applies to ate-controller.yaml (apps) and atenet-router.yaml (app). Merging the maps first avoids it, e.g. merge (dict "apps" "ate-client") .labels. Decide whether the built-in label or the user's should win.
There was a problem hiding this comment.
main now has a precedent for this. substrate.podLabels in _helpers.tpl fails the render when podLabels sets app, because the chart owns that label. Doing the same here for apps / app keeps the two features consistent and settles which value wins. A shared helper for the ServiceAccount metadata would hold that check once instead of in 9 templates.
| metadata: | ||
| name: {{ include "substrate.fullname" (list "ate-api-server" .) }} | ||
| namespace: {{ .Release.Namespace }} | ||
| {{- with .Values.ateApi.serviceAccount.labels }} |
There was a problem hiding this comment.
Optional: this block is repeated in 9 templates. A small helper in _helpers.tpl that takes the component's serviceAccount values plus any built-in labels would replace the copies and fix the duplicate-key issue in one place. The 9 near-identical test cases could then shrink to one or two.
| | `postgres.schema` | `substrate` | Store the Substrate tables in this PostgreSQL schema | | ||
| | `postgres.clientCertificates.enabled` | `false` | Project separate owner and runtime login certificates into the API server | | ||
| | `<component>.resources` | see `values.yaml` | Requests and limits for each container, e.g. `ateApi.resources` and `atenetRouter.agentgateway.resources` | | ||
| | `<component>.serviceAccount.labels` / `<component>.serviceAccount.annotations` | `{}` | Metadata for each component's ServiceAccount, e.g. `ateApi.serviceAccount.annotations` for workload identity. Components: `ateApi`, `ateClient`, `ateController`, `ateIdpServer`, `atelet`, `atenetRouter`, `atenetEgress`, `credentialProvider`, `rustfs` | |
There was a problem hiding this comment.
Minor: workload-identity annotations do nothing on some of these. No pod runs as ate-client, ate-idp-server sets automountServiceAccountToken: false, and rustfs is in-cluster storage. Keeping the knob everywhere for consistency is fine. Just avoid implying that workload identity applies to every component.
iplay88keys
left a comment
There was a problem hiding this comment.
🤖 AI-generated review. I reviewed the findings before posting.
This adds to @EItanya's review, which still applies. Please rebase onto main. Besides the README conflict, the new test suite fails after the rebase. It needs ate-api-server-envvars.yaml in its templates: list.
| limits: | ||
| cpu: "2" | ||
| memory: 1Gi | ||
| # Labels and annotations for the ServiceAccount, e.g. for workload identity. |
There was a problem hiding this comment.
Optional: the EKS webhook reads eks.amazonaws.com/role-arn only when it admits a pod. A helm upgrade that adds the annotation changes only the ServiceAccount, so ate-api and atelet don't roll and run without the role until someone restarts them. A line here or in the README saying to restart the pods after changing the annotation would cover it.
|
Sorry for the delay here. Let me finally clean this up tomorrow. |
…nent serviceaccounts
1314eb7 to
b0b12b9
Compare
|
Alrighty, sorry about that. I think I got all requested fixes. |
Allows labels and annotations on serviceaccounts. Eg, this can now be used to specify
eks.amazonaws.com/role-arnso components can use IAM roles. This is most useful for the ate API, so it can connect to s3 or GCS using a role instead of using rustfs. This also provides a similar option to the atelet, so it can also assume a role and communicate with a storage bucket.