Oracle Object Storage not working
I can not get Oracle Object Storage working. When I try, I get the following error.
panic: can not create client, bad configuration: did not find a proper configuration for tenancy
goroutine 1 [running]:
github.com/chartmuseum/storage.NewOracleCSBackend({0x4000052046, 0xd}, {0x4000052076, 0xb}, {0x0, 0x0}, {0x400005a01d, 0x53})
/home/runner/work/chartmuseum/chartmuseum/vendor/github.com/chartmuseum/storage/oracle.go:68 +0x57c
main.oracleBackendFromConfig(0x40003d31e8)
/home/runner/work/chartmuseum/chartmuseum/cmd/chartmuseum/main.go:199 +0x170
main.backendFromConfig(0x40003d31e8)
/home/runner/work/chartmuseum/chartmuseum/cmd/chartmuseum/main.go:145 +0x1f4
main.cliHandler(0x400090c420)
/home/runner/work/chartmuseum/chartmuseum/cmd/chartmuseum/main.go:74 +0x1e0
github.com/urfave/cli.HandleAction({0x1969420, 0x1e5bbf0}, 0x400090c420)
/home/runner/work/chartmuseum/chartmuseum/vendor/github.com/urfave/cli/app.go:526 +0x60
github.com/urfave/cli.(*App).Run(0x40001b9500, {0x400004c040, 0x2, 0x2})
/home/runner/work/chartmuseum/chartmuseum/vendor/github.com/urfave/cli/app.go:286 +0x560
main.main()
/home/runner/work/chartmuseum/chartmuseum/cmd/chartmuseum/main.go:54 +0x228
I am setting the following helm values, as instructed in the docs (with redactions).
helm:
parameters:
- name: env.secret.BASIC_AUTH_PASS
value: [redacted]
- name: env.secret.BASIC_AUTH_USER
value: [redacted]
- name: env.open.DISABLE_API
value: 'false'
- name: env.open.AUTH_ANONYMOUS_GET
value: 'true'
- name: env.open.STORAGE
value: oracle
- name: env.open.STORAGE_ORACLE_BUCKET
value: [redacted]
- name: env.open.STORAGE_ORACLE_PREFIX
value: chartmuseum
- name: env.open.STORAGE_ORACLE_COMPARTMENTID
value: >-
ocid1.compartment.oc1..aaaaaaaa[redacted]...
- name: oracle.secret.enabled
value: 'true'
- name: oracle.secret.name
value: chartmuseum-secret
I've created the secret called chartmuseum-secret where the config data looks like the following and the key_file is the private key.
[DEFAULT]
user=ocid1.user.oc1..aaaaaaaa[redacted]...
fingerprint=b0:53:[redacted]...
tenancy=ocid1.tenancy.oc1..aaaaaaaa[redacted]...
region=us-ashburn-1
key_file=/home/chartmuseum/.oci/oci.key
I can create a new bucket in the compartment with the credentials provided no problem using the oci cli. Am I doing something wrong with the chart configuration, or is this just busted?
Is this issue still open. I am running into this problem too. I can take a look if there is bandwidth issue. @cbuto
@debarshibasak that would be really helpful if you wanted to take a look! Let me know if you need any pointers or talk through what you find.
Hi @debarshibasak/ @cbuto , i am also getting the same issue. can you help please. Thanks
@dushyants I did some testing and i think the problem here is that the $HOME variable isn't resolving to the directory where the OCI config file is mounted into the pod.
As a workaround, can you try setting the $HOME env var when installing the chart?
i.e.
--set env.open.HOME=/home/chartmuseum
Thank you @cbuto It really help.
- for others, if someone using helm chart with OCI storage as backend, they can add below value in custom values file
env:
open:
HOME: /home/chartmuseum
.......
@cbuto currently we are using OCI config for oci object storage access which is an extra step to do for chartmuseum, are you guys working on adding instance principal (using dynamic group) as storage access mechanism. or may in roadmap.
np, i also tested using the env var OCI_CONFIG_FILE and that worked, i'll document that.
Using an instance principal auth method might work according to this, aka setting ORACLE_AUTH_METHOD: InstancePrincipal:
https://github.com/chartmuseum/storage/blob/d1b394bad8ee67c7f2c2f35277a36f39299e0cc0/oracle.go#L50-L57
though there are no docs on it right now, if you want to test it out and add some docs in https://github.com/chartmuseum/charts I'd be happy to check it out!