Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ helm delete hyperfleet-adapter
| `config.adapterYaml` | Adapter YAML config content | `""` |

When `config.adapterYaml` is set:

- Creates `adapter.yaml` key in ConfigMap
- Mounts at `/etc/adapter/adapter.yaml`
- Sets `ADAPTER_CONFIG_PATH=/etc/adapter/adapter.yaml`
Comment on lines 55 to 59
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Explore chart structure
find charts -type f -name "*.yaml" -o -name "*.yml" -o -name "*.tpl" | head -20

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 350


🏁 Script executed:

# Search for the relevant template logic
rg -l "adapter\.yaml|ADAPTER_CONFIG_PATH" charts --type yaml

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 166


🏁 Script executed:

# Look at the main deployment/pod template
find charts -name "deployment.yaml" -o -name "statefulset.yaml" -o -name "_*.tpl" | head -10

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 145


🏁 Script executed:

# Check configmap.yaml for adapter.yaml handling
cat -n charts/templates/configmap.yaml

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 1018


🏁 Script executed:

# Check broker-configmap.yaml for broker.yaml handling
cat -n charts/templates/broker-configmap.yaml

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 1333


🏁 Script executed:

# Check deployment.yaml for env var wiring and conditions
cat -n charts/templates/deployment.yaml | head -100

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 4447


🏁 Script executed:

# Get the rest of deployment.yaml focusing on volumeMounts and volumes sections
cat -n charts/templates/deployment.yaml | tail -100

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 4672


🏁 Script executed:

# Search for ADAPTER_CONFIG_PATH and BROKER_CONFIG_FILE in deployment template
rg "ADAPTER_CONFIG_PATH|BROKER_CONFIG_FILE" charts/templates/deployment.yaml

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 161


🏁 Script executed:

# Get context around those env var names in deployment.yaml
rg -B2 -A2 "ADAPTER_CONFIG_PATH|BROKER_CONFIG_FILE" charts/templates/deployment.yaml

Repository: openshift-hyperfleet/hyperfleet-adapter

Length of output: 453


Add required gating conditions to clarify ConfigMap/ENV behavior.

The bullets at lines 55-59 and 75-79 omit that these behaviors require additional conditions. The adapter.yaml ConfigMap key and mount only exist when both config.enabled: true and config.adapterYaml is set. Similarly, broker.yaml ConfigMap key and mount only exist when both broker.create: true and broker.yaml is set.

Update the text to clarify:

Suggested fix
-When `config.adapterYaml` is set:
+When `config.enabled: true` and `config.adapterYaml` is set:

-When `broker.yaml` is set:
+When `broker.create: true` and `broker.yaml` is set:
🤖 Prompt for AI Agents
In `@charts/README.md` around lines 55 - 59, Update the README bullets to state
the gating conditions: clarify that the adapter.yaml ConfigMap key, mount at
/etc/adapter/adapter.yaml, and ADAPTER_CONFIG_PATH are created only when both
config.enabled: true and config.adapterYaml are set (reference config.enabled
and config.adapterYaml); likewise clarify the broker.yaml ConfigMap key and
mount exist only when both broker.create: true and broker.yaml are set
(reference broker.create and broker.yaml). Make the wording for adapter.yaml and
broker.yaml symmetrical and unambiguous so readers know both flags/values must
be present for the ConfigMap keys/mounts/env vars to be created.

Expand All @@ -72,6 +73,7 @@ When `config.adapterYaml` is set:
| `broker.envKeys` | Specific keys to mount (empty = all via envFrom) | `[]` |

When `broker.yaml` is set:

- Creates `broker.yaml` key in ConfigMap
- Mounts at `/etc/broker/broker.yaml`
- Sets `BROKER_CONFIG_FILE=/etc/broker/broker.yaml`
Expand Down Expand Up @@ -163,8 +165,7 @@ helm install hyperfleet-adapter ./charts/ \
--set broker.create=true \
--set broker.type=googlepubsub \
--set broker.subscriptionId=my-subscription \
--set broker.topic=my-topic \
--set 'serviceAccount.annotations.iam\.gke\.io/gcp-service-account=adapter@PROJECT.iam.gserviceaccount.com'
--set broker.topic=my-topic
```

### Using Existing ServiceAccount
Expand All @@ -191,8 +192,7 @@ replicaCount: 2

serviceAccount:
create: true
annotations:
iam.gke.io/gcp-service-account: adapter@my-project.iam.gserviceaccount.com
name: my-adapter

hyperfleetApi:
baseUrl: https://api.hyperfleet.example.com
Expand Down
2 changes: 0 additions & 2 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
# For GCP Workload Identity Federation (WIF), add:
# iam.gke.io/gcp-service-account: GSA_NAME@PROJECT_ID.iam.gserviceaccount.com
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
Expand Down