Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zubenkoivan committed Aug 8, 2024
1 parent 21c2081 commit ff4c56b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions charts/platform-storage/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ release: {{ .Release.Name | quote }}
- name: AWS_SECRET_ACCESS_KEY
{{- toYaml .Values.aws.secretAccessKey | nindent 2 }}
{{- end }}
{{- if .Values.aws.s3EndpointUrl }}
- name: AWS_S3_ENDPOINT_URL
value: {{ .Values.aws.s3EndpointUrl }}
{{- end }}
- name: AWS_METRICS_S3_BUCKET_NAME
value: {{ .Values.aws.metricsBucketName }}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/platform-storage/templates/service-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
jobLabel: job
endpoints:
- port: http
path: /metrics
path: /metrics/
honorLabels: true
interval: 15s
relabelings:
Expand Down
1 change: 1 addition & 0 deletions charts/platform-storage/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ aws:
secretKeyRef:
name: minio-gateway
key: root-password
s3EndpointUrl: http://minio-gateway:9000
metricsBucketName: apolo-storage-metrics

storageUsageCollector:
Expand Down
3 changes: 2 additions & 1 deletion charts/platform-storage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ aws: {}
# region:
# accessKeyId: {}
# secretAccessKey: {}
# metricsBucketName: {}
# s3EndpointUrl:
# metricsBucketName:

storageUsageCollector:
schedule: "0 * * * *" # every hour
Expand Down
2 changes: 1 addition & 1 deletion platform_storage_api/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def create_platform(self) -> PlatformConfig:
def create_aws(self) -> AWSConfig:
return AWSConfig(
region=self._environ["AWS_REGION"],
s3_endpoint_url=self._environ.get("AWS_S3_ENDPOINT"),
s3_endpoint_url=self._environ.get("AWS_S3_ENDPOINT_URL"),
metrics_s3_bucket_name=self._environ["AWS_METRICS_S3_BUCKET_NAME"],
)

Expand Down

0 comments on commit ff4c56b

Please sign in to comment.