Skip to content
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

App Framework: Add option to use path style s3 URLs #1291

Open
paheath opened this issue Feb 22, 2024 · 6 comments
Open

App Framework: Add option to use path style s3 URLs #1291

paheath opened this issue Feb 22, 2024 · 6 comments
Assignees
Labels
app framework New App Framework enhancement New feature or request Q2

Comments

@paheath
Copy link

paheath commented Feb 22, 2024

Please select the type of request

Enhancement

Tell us more

Describe the request
I am deploying the operator in an on-prem environment with a storage solution that only supports path style s3 URLs. As far as I can tell, the operator defaults to using virtual host style s3 URLs to download apps. I propose making the current behavior remain the default, and provide an option in the AppFramework spec to explicitly set the s3 URLs to path style. I rebuilt the operator with S3ForcePathStyle: aws.Bool(true) added here and the app framework worked as expected.

Smartstore offers a similar option to specify the url version, and defaults to path style. See remote.s3.url_version here.

Expected behavior
Force the s3 client to use path style URLs when downloading apps, when set as such in the AppFramework spec.

Splunk setup on K8S
SearchHeadCluster, IndexerCluster, ClusterManager, LicenseManager, MonitoringConsole, and Standalone heavy forwarder.

Reproduction/Testing steps
Enable path style s3 URLs via the AppFramework spec. Verify that apps are correctly downloaded and installed.

K8s environment
On-prem k8s cluster with on-prem s3-compatible NAS.

@paheath paheath added the app framework New App Framework label Feb 22, 2024
@yaroslav-nakonechnikov
Copy link

i guess this is related: #1030 (comment)

@vivekr-splunk
Copy link
Collaborator

vivekr-splunk commented Mar 29, 2024

Hello @yaroslav-nakonechnikov @paheath we will work on this change and get back to you

@vivekr-splunk vivekr-splunk added enhancement New feature or request Q2 labels Apr 24, 2024
@akondur
Copy link
Collaborator

akondur commented Apr 30, 2024

Hello @paheath , we are exploring possible solutions to the path style S3 URLs. Meanwhile, can you please provide an example of the working(with the modified Splunk operator image) appFramework configurations for the path style URLs?

Also, path style URLs will be discontinued per AWS documentation.

Currently, Amazon S3 supports both virtual-hosted–style and path-style URL access in all AWS Regions. However, path-style URLs will be discontinued in the future. For more information, see the following Important note.

@paheath
Copy link
Author

paheath commented Apr 30, 2024

This is an excerpt from my helm chart, and the underlying operator image is modified as indicated in the original bug description. I don't think any of the value substitutions necessarily impact the functionality. I've defined it in the yaml as documented here https://splunk.github.io/splunk-operator/AppFramework.html

appRepo:
  appsRepoPollIntervalSeconds: {{ .Values.configPollInterval }}
  defaults:
    volumeName: {{ .Values.volumeName }}
  appSources:
  - name: node
    location: node/
    scope: local
  volumes:
  - name: {{ .Values.volumeName }}
    storageType: s3
    path: {{ .Values.bucketPath }}/
    provider: aws
    region: {{ .Values.bucketRegion }}
    endpoint: {{ .Values.bucketEndpoint }}
    secretRef: {{ .Values.secretRef }}

@akondur
Copy link
Collaborator

akondur commented Apr 30, 2024

Hi @paheath , thanks for the example above. To further test our solution, are you able to let us know the storage provider being used to test path style S3 URLs? Currently, by default AWS S3 buckets support both path style as well as virtual hosted. I was able to test path style specifically on S3 buckets.

@paheath
Copy link
Author

paheath commented Apr 30, 2024

I'm testing against an on-prem s3-compatible NAS. I think testing against any s3-compatible storage might be sufficient, as long as you can confirm the outbound request is hitting the path-style endpoint when configured to do so. Maybe even locally block outbound traffic to the virtual endpoint. Testing might be similar to how the smartstore path-style config is tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app framework New App Framework enhancement New feature or request Q2
Projects
None yet
Development

No branches or pull requests

7 participants