-
Notifications
You must be signed in to change notification settings - Fork 88
feat(helm): Add S3 storage support for archives, streams, and log inputs. #1825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9a88d1e
d37168c
1479250
ffb7199
0f8c6b4
2ce2999
ea9decb
24ca2dd
715163a
2e35de0
c41c896
2310f22
9ff049f
c9dcb52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,6 +247,31 @@ hostPath: | |
| type: "Directory" | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Creates a volumeMount for the AWS config directory. | ||
|
|
||
| @param {object} . Root template context | ||
| @return {string} YAML-formatted volumeMount definition | ||
| */}} | ||
| {{- define "clp.awsConfigVolumeMount" -}} | ||
| name: "aws-config" | ||
| mountPath: {{ .Values.clpConfig.aws_config_directory | quote }} | ||
| readOnly: true | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Creates a volume for the AWS config directory. | ||
|
|
||
| @param {object} . Root template context | ||
| @return {string} YAML-formatted volume definition | ||
| */}} | ||
| {{- define "clp.awsConfigVolume" -}} | ||
| name: "aws-config" | ||
| hostPath: | ||
| path: {{ .Values.clpConfig.aws_config_directory | quote }} | ||
| type: "Directory" | ||
| {{- end }} | ||
|
Comment on lines
+268
to
+273
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for setup scripts or documentation mentioning AWS config directory
rg -i "aws.?config.?dir" -g "*.md" -g "*.sh" -g "*.yaml" -C3Repository: y-scope/clp Length of output: 16202 🏁 Script executed: #!/bin/bash
# Search for deployment guides and README files with setup instructions
find . -type f -name "README*" -o -name "INSTALL*" -o -name "DEPLOY*" | head -20
# Also search for helm chart documentation
find tools/deployment/package-helm -type f \( -name "*.md" -o -name "README*" \)Repository: y-scope/clp Length of output: 494 🏁 Script executed: #!/bin/bash
# Search for Kubernetes/Helm deployment documentation
find docs -type f -name "*.md" | xargs rg -l "kubernetes\|helm\|deploy" -i
# Check if there's documentation in the helm chart directory
ls -la tools/deployment/package-helm/
# Look for prerequisites or setup documentation
rg "prerequisite\|setup\|initialize\|create.*director" docs -i -A2 | head -50Repository: y-scope/clp Length of output: 464 🏁 Script executed: #!/bin/bash
# Check values.yaml for aws_config_directory documentation
sed -n '1,100p' tools/deployment/package-helm/values.yaml | grep -A5 -B2 "aws_config"
# Search for deployment guides and prerequisites documentation
find docs -type f -name "*.md" | head -20Repository: y-scope/clp Length of output: 976 🏁 Script executed: #!/bin/bash
# Find deployment/installation guides
find docs/src/user-docs -type f -name "*.md" | sort
# Also check for any prerequisite documentation
rg "hostPath\|directory.*exist\|prerequisite" docs -i -B2 -A2Repository: y-scope/clp Length of output: 1602 🏁 Script executed: #!/bin/bash
# Check the object storage config documentation for aws_config_directory setup
cat docs/src/user-docs/guides-using-object-storage/clp-config.md
# Also check if there's any helm/kubernetes specific deployment guide
find docs -type f -name "*.md" | xargs grep -l "helm\|kubernetes" -iRepository: y-scope/clp Length of output: 5960 🏁 Script executed: #!/bin/bash
# Check if there's any helm-specific deployment documentation
find docs -type f -name "*.md" -path "*/user-docs/*" | xargs grep -l "kubernetes\|helm\|deploy" -i
# Check the quick-start guides which might have setup instructions
cat docs/src/user-docs/quick-start/index.mdRepository: y-scope/clp Length of output: 4023 🏁 Script executed: #!/bin/bash
# Check multi-host deployment guide for setup instructions
cat docs/src/user-docs/guides-multi-host.md | head -100
# Check if there's any helm/kubernetes specific deployment documentation
find docs -name "*.md" -type f | xargs grep -l "hostPath" -iRepository: y-scope/clp Length of output: 4012 🏁 Script executed: #!/bin/bash
# Check for Helm-specific deployment documentation
find docs -name "*.md" -type f | xargs grep -l "helm\|values.yaml" -i
# Check Chart.yaml for documentation references
cat tools/deployment/package-helm/Chart.yaml
# Search for any kubernetes prerequisites or setup documentation
rg "kubernetes|k8s|helm" docs/src/user-docs -i -lRepository: y-scope/clp Length of output: 662 🏁 Script executed: #!/bin/bash
# Check for helm hooks or init scripts that might create the aws_config_directory
rg "initContainers\|initContainer" tools/deployment/package-helm/templates -A5
# Search for any helm hooks
rg "hook\|init" tools/deployment/package-helm/templates -i
# Check the full values.yaml for aws_config_directory context
grep -A10 -B5 "aws_config_directory" tools/deployment/package-helm/values.yamlRepository: y-scope/clp Length of output: 496 🏁 Script executed: #!/bin/bash
# Check if there's any documentation about Kubernetes deployment or prerequisites
find docs -name "*.md" -type f | xargs grep -l "prerequisites\|deployment\|install" -i | head -10
# Check the main README for kubernetes/helm instructions
cat README.md | head -100Repository: y-scope/clp Length of output: 6051 Document the hostPath directory prerequisite for AWS config in deployment guides. When 🤖 Prompt for AI Agents |
||
|
|
||
| {{/* | ||
| Creates an initContainer that waits for a Kubernetes resource to be ready. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| {{- if eq .Values.clpConfig.archive_output.storage.type "s3" }} | ||
| {{- include "clp.createLocalPv" (dict | ||
| "root" . | ||
| "component_category" "compression-worker" | ||
| "name" "staged-archives" | ||
| "nodeRole" "worker" | ||
| "capacity" "20Gi" | ||
| "accessModes" (list "ReadWriteOnce") | ||
| "hostPath" .Values.clpConfig.archive_output.storage.staging_directory | ||
| ) }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| {{- if eq .Values.clpConfig.archive_output.storage.type "s3" }} | ||
| {{- include "clp.createPvc" (dict | ||
| "root" . | ||
| "component_category" "compression-worker" | ||
| "name" "staged-archives" | ||
| "capacity" "20Gi" | ||
| "accessModes" (list "ReadWriteOnce") | ||
| ) }} | ||
| {{- end }} |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,9 +19,42 @@ data: | |||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| archive_output: | ||||||||||||||||||||||||||||||||||||||||
| compression_level: {{ .Values.clpConfig.archive_output.compression_level | int }} | ||||||||||||||||||||||||||||||||||||||||
| {{- with .Values.clpConfig.archive_output.storage }} | ||||||||||||||||||||||||||||||||||||||||
| storage: | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .type "fs" }} | ||||||||||||||||||||||||||||||||||||||||
| directory: "/var/data/archives" | ||||||||||||||||||||||||||||||||||||||||
| type: "fs" | ||||||||||||||||||||||||||||||||||||||||
| {{- else if eq .type "s3" }} | ||||||||||||||||||||||||||||||||||||||||
| type: "s3" | ||||||||||||||||||||||||||||||||||||||||
| staging_directory: "/var/data/staged-archives" | ||||||||||||||||||||||||||||||||||||||||
| {{- with .s3_config }} | ||||||||||||||||||||||||||||||||||||||||
| s3_config: | ||||||||||||||||||||||||||||||||||||||||
| {{- if .endpoint_url }} | ||||||||||||||||||||||||||||||||||||||||
| endpoint_url: {{ .endpoint_url | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .region_code }} | ||||||||||||||||||||||||||||||||||||||||
| region_code: {{ .region_code | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| bucket: {{ .bucket | quote }} | ||||||||||||||||||||||||||||||||||||||||
| key_prefix: {{ .key_prefix | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- with .aws_authentication }} | ||||||||||||||||||||||||||||||||||||||||
| aws_authentication: | ||||||||||||||||||||||||||||||||||||||||
| type: {{ .type | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .profile }} | ||||||||||||||||||||||||||||||||||||||||
| profile: {{ .profile | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .credentials }} | ||||||||||||||||||||||||||||||||||||||||
| credentials: | ||||||||||||||||||||||||||||||||||||||||
| access_key_id: {{ .credentials.access_key_id | quote }} | ||||||||||||||||||||||||||||||||||||||||
| secret_access_key: {{ .credentials.secret_access_key | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .credentials.session_token }} | ||||||||||||||||||||||||||||||||||||||||
| session_token: {{ .credentials.session_token | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .aws_authentication */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .s3_config */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* if eq .type "fs" */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .Values.clpConfig.archive_output.storage */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .Values.clpConfig.archive_output.retention_period }} | ||||||||||||||||||||||||||||||||||||||||
| retention_period: {{ .Values.clpConfig.archive_output.retention_period | int }} | ||||||||||||||||||||||||||||||||||||||||
| {{- else }} | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -58,9 +91,30 @@ data: | |||||||||||||||||||||||||||||||||||||||
| ssl_cert: null | ||||||||||||||||||||||||||||||||||||||||
| type: {{ .Values.clpConfig.database.type | quote }} | ||||||||||||||||||||||||||||||||||||||||
| logs_directory: "/var/log" | ||||||||||||||||||||||||||||||||||||||||
| {{- with .Values.clpConfig.logs_input }} | ||||||||||||||||||||||||||||||||||||||||
| logs_input: | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .type "fs" }} | ||||||||||||||||||||||||||||||||||||||||
| directory: "/mnt/logs" | ||||||||||||||||||||||||||||||||||||||||
| type: "fs" | ||||||||||||||||||||||||||||||||||||||||
| {{- else if eq .type "s3" }} | ||||||||||||||||||||||||||||||||||||||||
| type: "s3" | ||||||||||||||||||||||||||||||||||||||||
| {{- with .aws_authentication }} | ||||||||||||||||||||||||||||||||||||||||
| aws_authentication: | ||||||||||||||||||||||||||||||||||||||||
| type: {{ .type | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .profile }} | ||||||||||||||||||||||||||||||||||||||||
| profile: {{ .profile | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .credentials }} | ||||||||||||||||||||||||||||||||||||||||
| credentials: | ||||||||||||||||||||||||||||||||||||||||
| access_key_id: {{ .credentials.access_key_id | quote }} | ||||||||||||||||||||||||||||||||||||||||
| secret_access_key: {{ .credentials.secret_access_key | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .credentials.session_token }} | ||||||||||||||||||||||||||||||||||||||||
| session_token: {{ .credentials.session_token | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+107
to
+114
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding is that credentials and other privileged data should be put in a "Secret" instead of a "ConfigMap" for Kubernetes. I guess this is pretty much the same way we currently treat credentials access, so it's probably fine for now, but it might be worth changing in the future. If we don't have an issue tracking this, it might be worth creating one.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, the plan is to isolate credentials from other clp-config fields so that their lifecycle can be managed more securely. Once this separation is in place, moving those values into Kubernetes Secrets would be more meaningful and appropriate @coderabbitai in case we haven't created an issue for such refactoring, create one to track
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: Length of output: 2 🏁 Script executed: Length of output: 42 @junhaoliao, I've created issue #1844 to track the refactoring of credentials from ConfigMaps to Kubernetes Secrets. The issue includes the proposed approach and references this PR and discussion thread. 🐰📝 🧠 Learnings used |
||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .aws_authentication */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* if eq .type "fs" */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .Values.clpConfig.logs_input */}} | ||||||||||||||||||||||||||||||||||||||||
| package: | ||||||||||||||||||||||||||||||||||||||||
| query_engine: {{ .Values.clpConfig.package.query_engine | quote }} | ||||||||||||||||||||||||||||||||||||||||
| storage_engine: {{ .Values.clpConfig.package.storage_engine | quote }} | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -96,12 +150,50 @@ data: | |||||||||||||||||||||||||||||||||||||||
| retention_period: null | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| stream_collection_name: {{ .Values.clpConfig.results_cache.stream_collection_name | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- with .Values.clpConfig.stream_output }} | ||||||||||||||||||||||||||||||||||||||||
| stream_output: | ||||||||||||||||||||||||||||||||||||||||
| {{- with .storage }} | ||||||||||||||||||||||||||||||||||||||||
| storage: | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .type "fs" }} | ||||||||||||||||||||||||||||||||||||||||
| directory: "/var/data/streams" | ||||||||||||||||||||||||||||||||||||||||
| type: "fs" | ||||||||||||||||||||||||||||||||||||||||
| target_uncompressed_size: {{ .Values.clpConfig.stream_output.target_uncompressed_size | int }} | ||||||||||||||||||||||||||||||||||||||||
| {{- else if eq .type "s3" }} | ||||||||||||||||||||||||||||||||||||||||
| type: "s3" | ||||||||||||||||||||||||||||||||||||||||
| staging_directory: "/var/data/staged-streams" | ||||||||||||||||||||||||||||||||||||||||
| {{- with .s3_config }} | ||||||||||||||||||||||||||||||||||||||||
| s3_config: | ||||||||||||||||||||||||||||||||||||||||
| {{- if .endpoint_url }} | ||||||||||||||||||||||||||||||||||||||||
| endpoint_url: {{ .endpoint_url | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .region_code }} | ||||||||||||||||||||||||||||||||||||||||
| region_code: {{ .region_code | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| bucket: {{ .bucket | quote }} | ||||||||||||||||||||||||||||||||||||||||
| key_prefix: {{ .key_prefix | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- with .aws_authentication }} | ||||||||||||||||||||||||||||||||||||||||
| aws_authentication: | ||||||||||||||||||||||||||||||||||||||||
| type: {{ .type | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .profile }} | ||||||||||||||||||||||||||||||||||||||||
| profile: {{ .profile | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .credentials }} | ||||||||||||||||||||||||||||||||||||||||
| credentials: | ||||||||||||||||||||||||||||||||||||||||
| access_key_id: {{ .credentials.access_key_id | quote }} | ||||||||||||||||||||||||||||||||||||||||
| secret_access_key: {{ .credentials.secret_access_key | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if .credentials.session_token }} | ||||||||||||||||||||||||||||||||||||||||
| session_token: {{ .credentials.session_token | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .aws_authentication */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .s3_config */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* if eq .type "fs" */}} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .storage */}} | ||||||||||||||||||||||||||||||||||||||||
| target_uncompressed_size: {{ .target_uncompressed_size | int }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .Values.clpConfig.stream_output */}} | ||||||||||||||||||||||||||||||||||||||||
| tmp_directory: "/var/tmp" | ||||||||||||||||||||||||||||||||||||||||
| {{- if .Values.clpConfig.aws_config_directory }} | ||||||||||||||||||||||||||||||||||||||||
| aws_config_directory: {{ .Values.clpConfig.aws_config_directory | quote }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| webui: | ||||||||||||||||||||||||||||||||||||||||
| host: "localhost" | ||||||||||||||||||||||||||||||||||||||||
| port: 4000 | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -150,7 +242,11 @@ data: | |||||||||||||||||||||||||||||||||||||||
| "ClpStorageEngine": {{ .Values.clpConfig.package.storage_engine | quote }}, | ||||||||||||||||||||||||||||||||||||||||
| "ClpQueryEngine": {{ .Values.clpConfig.package.query_engine | quote }}, | ||||||||||||||||||||||||||||||||||||||||
| "LogsInputType": {{ .Values.clpConfig.logs_input.type | quote }}, | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .Values.clpConfig.logs_input.type "fs" }} | ||||||||||||||||||||||||||||||||||||||||
| "LogsInputRootDir": "/mnt/logs", | ||||||||||||||||||||||||||||||||||||||||
| {{- else }} | ||||||||||||||||||||||||||||||||||||||||
| "LogsInputRootDir": null, | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In JavaScript/TypeScript, |
||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| "MongoDbSearchResultsMetadataCollectionName": | ||||||||||||||||||||||||||||||||||||||||
| {{ .Values.clpConfig.webui.results_metadata_collection_name | quote }}, | ||||||||||||||||||||||||||||||||||||||||
| "SqlDbClpArchivesTableName": "clp_archives", | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -176,13 +272,33 @@ data: | |||||||||||||||||||||||||||||||||||||||
| {{ .Values.clpConfig.results_cache.stream_collection_name | quote }}, | ||||||||||||||||||||||||||||||||||||||||
| "ClientDir": "/opt/clp/var/www/webui/client", | ||||||||||||||||||||||||||||||||||||||||
| "LogViewerDir": "/opt/clp/var/www/webui/yscope-log-viewer", | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .Values.clpConfig.logs_input.type "fs" }} | ||||||||||||||||||||||||||||||||||||||||
| "LogsInputRootDir": "/mnt/logs", | ||||||||||||||||||||||||||||||||||||||||
| {{- else }} | ||||||||||||||||||||||||||||||||||||||||
| "LogsInputRootDir": null, | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .Values.clpConfig.stream_output.storage.type "fs" }} | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesDir": "/var/data/streams", | ||||||||||||||||||||||||||||||||||||||||
| {{- else }} | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesDir": null, | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| "StreamTargetUncompressedSize": | ||||||||||||||||||||||||||||||||||||||||
| {{ .Values.clpConfig.stream_output.target_uncompressed_size | int }}, | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .Values.clpConfig.stream_output.storage.type "s3" }} | ||||||||||||||||||||||||||||||||||||||||
| {{- with .Values.clpConfig.stream_output.storage.s3_config }} | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesS3Region": {{ .region_code | default "null" | quote }}, | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider using unquoted
🔎 Proposed fix for proper null handling- "StreamFilesS3Region": {{ .region_code | default "null" | quote }},
+ {{- if .region_code }}
+ "StreamFilesS3Region": {{ .region_code | quote }},
+ {{- else }}
+ "StreamFilesS3Region": null,
+ {{- end }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| "StreamFilesS3PathPrefix": {{ printf "%s/%s" .bucket .key_prefix | quote }}, | ||||||||||||||||||||||||||||||||||||||||
| {{- if eq .aws_authentication.type "profile" }} | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesS3Profile": {{ .aws_authentication.profile | quote }}, | ||||||||||||||||||||||||||||||||||||||||
| {{- else }} | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesS3Profile": null, | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| {{- end }}{{/* with .Values.clpConfig.stream_output.storage.s3_config */}} | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+287
to
+296
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential nil pointer dereference when accessing Line 290 accesses 🔎 Proposed fix to add nil check {{- with .Values.clpConfig.stream_output.storage.s3_config }}
"StreamFilesS3Region": {{ .region_code | default "null" | quote }},
"StreamFilesS3PathPrefix": {{ printf "%s/%s" .bucket .key_prefix | quote }},
- {{- if eq .aws_authentication.type "profile" }}
+ {{- if and .aws_authentication (eq .aws_authentication.type "profile") }}
"StreamFilesS3Profile": {{ .aws_authentication.profile | quote }},
{{- else }}
"StreamFilesS3Profile": null,
{{- end }}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| {{- else }} | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesS3Region": null, | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesS3PathPrefix": null, | ||||||||||||||||||||||||||||||||||||||||
| "StreamFilesS3Profile": null, | ||||||||||||||||||||||||||||||||||||||||
| {{- end }} | ||||||||||||||||||||||||||||||||||||||||
| "ArchiveOutputCompressionLevel": {{ .Values.clpConfig.archive_output.compression_level | int }}, | ||||||||||||||||||||||||||||||||||||||||
| "ArchiveOutputTargetArchiveSize": | ||||||||||||||||||||||||||||||||||||||||
| {{ .Values.clpConfig.archive_output.target_archive_size | int }}, | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Document the precondition that
aws_config_directorymust be non-null.The helper assumes
aws_config_directoryis set. While all current callers guard with{{- if .Values.clpConfig.aws_config_directory }}, documenting this precondition in the helper's docstring would prevent future misuse.📝 Suggested documentation enhancement
{{/* Creates a volumeMount for the AWS config directory. +@pre {string} .Values.clpConfig.aws_config_directory must be non-null @param {object} . Root template context @return {string} YAML-formatted volumeMount definition */}}🤖 Prompt for AI Agents