diff --git a/ingestor/README.md b/ingestor/README.md index 56a9e51..0524003 100644 --- a/ingestor/README.md +++ b/ingestor/README.md @@ -58,7 +58,7 @@ When set, the digest must be the full canonical form (`sha256:` + 64 lowercase h | Value | Default | When to override | |---|---|---| -| `jobsManager.endpoint` | `http://jobs-manager.tracebloc.svc.cluster.local:8080` | The parent `tracebloc/client` release isn't in the `tracebloc` namespace, or you're testing against a port-forward. | +| `jobsManager.endpoint` | `http://jobs-manager..svc.cluster.local:8080` (auto-resolved) | The ingestor release and the parent `tracebloc/client` release live in different namespaces, or you're testing against a port-forward. | | `serviceAccount.name` | `ingestor` | The cluster's `ingestionAuthz` policy expects a different SA name. (Default matches the parent chart's default.) | | `image.repository` | `ghcr.io/tracebloc/ingestor` | Air-gapped mirror. | | `idempotencyKey` | `-` | You want strict at-most-once semantics across re-installs under the same release name. | diff --git a/ingestor/templates/post-install-job.yaml b/ingestor/templates/post-install-job.yaml index 11d2c7d..6c650c5 100644 --- a/ingestor/templates/post-install-job.yaml +++ b/ingestor/templates/post-install-job.yaml @@ -54,8 +54,15 @@ spec: resources: {{- toYaml .Values.hookResources | nindent 12 }} env: + # client#127: default to the jobs-manager Service in this + # release's own namespace rather than hardcoding "tracebloc". + # Releases in any other namespace would otherwise hit + # `curl: Could not resolve host` at the hook. Customers + # whose ingestor release sits in a different namespace from + # the tracebloc release set `jobsManager.endpoint` + # explicitly to override. - name: JOBS_MANAGER_ENDPOINT - value: {{ .Values.jobsManager.endpoint | quote }} + value: {{ .Values.jobsManager.endpoint | default (printf "http://jobs-manager.%s.svc.cluster.local:8080" .Release.Namespace) | quote }} - name: SUBMIT_PATH value: {{ .Values.jobsManager.submitPath | quote }} command: ["/bin/sh", "-c"] diff --git a/ingestor/values.yaml b/ingestor/values.yaml index 4c7f238..e5f8e12 100644 --- a/ingestor/values.yaml +++ b/ingestor/values.yaml @@ -38,11 +38,15 @@ image: # is currently rolling". When set must be sha256:<64 lowercase hex>. digest: "" -# -- jobs-manager Service hostname + port to POST to. Defaults assume -# the tracebloc client chart's release name is "tracebloc". Override if -# you've named it differently (e.g., "my-tracebloc..svc..."). +# -- jobs-manager Service hostname + port to POST to. When left empty +# (default), the post-install hook resolves the endpoint to +# `http://jobs-manager..svc.cluster.local:8080`, +# which is correct for the common case where the ingestor release is +# installed in the same namespace as the tracebloc client release. +# Override only when the two releases live in different namespaces, or +# when you need a non-standard port/host (e.g., port-forward testing). jobsManager: - endpoint: http://jobs-manager.tracebloc.svc.cluster.local:8080 + endpoint: "" # The path on jobs-manager that accepts ingestion submissions. Stable # API; only change if you're testing against a forked jobs-manager. submitPath: /internal/submit-ingestion-run