Automount volumes#6698
Conversation
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
845c439 to
b0e01b6
Compare
51841d0 to
8234ce4
Compare
|
/hold until consensus on label/annotation names |
|
/hold cancel |
|
/override windows-integration-test/Windows-test |
|
@feloy: Overrode contexts on behalf of feloy: windows-integration-test/Windows-test DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/override OpenShift-Integration-tests/OpenShift-Integration-tests Errors on files test cleanup |
|
@feloy: Overrode contexts on behalf of feloy: OpenShift-Integration-tests/OpenShift-Integration-tests DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/hold need to change labels / annotations |
|
Kudos, SonarCloud Quality Gate passed!
|
|
/unhold I changed the labels /annotations with the new ones |
There was a problem hiding this comment.
LGTM, but I quickly wanted to check how this would behave with Service Binding, which, I remembered might also alter the Pod spec to inject envFrom using a secret:
odo init --devfile nodejs --starter nodejs-starter --name automount-volumes-nodejs
odo add binding --service edb-cloud-native-postgresql.Cluster.postgresql.k8s.enterprisedb.io \
--name automount-volumes-nodejs-edb-cloud-native-postgresql \
--service-namespace shared-services \
--bind-as-files=falseIf I don't have any automounting configmap/secret, it works as expected:
$ kubectl get pod automount-volumes-nodejs-app-68d4c554b-kldjk -o yaml
[...]
envFrom:
- secretRef:
name: automount-volumes-nodejs-edb-cloud-native-postgresql-fb57c24f
$ kubectl exec -it automount-volumes-nodejs-app-68d4c554b-kldjk -- /bin/sh -c 'env | grep CLUSTER | sort'
Alias tip: k exec -it automount-volumes-nodejs-app-68d4c554b-kldjk -- /bin/sh -c 'env | grep CLUSTER | sort'
CLUSTER_CA.CRT=-----BEGIN CERTIFICATE-----
CLUSTER_CA.KEY=-----BEGIN EC PRIVATE KEY-----
CLUSTER_CLUSTERIP=10.96.151.42
CLUSTER_DATABASE=app
CLUSTER_HOST=edb-cloud-native-postgresql-rw
CLUSTER_PASSWORD=3IxAlTt9AUeVNvPS1TVrptKCUxUMXWIkE37cQgq3orNfZcbKHX4JJOHV8pqD0xK6
CLUSTER_PGPASS=edb-cloud-native-postgresql-rw:5432:*:postgres:3IxAlTt9AUeVNvPS1TVrptKCUxUMXWIkE37cQgq3orNfZcbKHX4JJOHV8pqD0xK6
CLUSTER_PROVIDER=enterprisedb
CLUSTER_TLS.CRT=-----BEGIN CERTIFICATE-----
CLUSTER_TLS.KEY=-----BEGIN EC PRIVATE KEY-----
CLUSTER_TYPE=postgresql
CLUSTER_USERNAME=postgres
If I stop the previous Dev session and apply some automounting configmap/secret (I applied the resources you used in the tests of this PR), it looks like the environment variables expected from the ServiceBinding are no longer injected.
$ kubectl apply -f /path/to/odo/tests/examples/manifests/config-automount/
$ odo dev
$ kubectl get pod automount-volumes-nodejs-app-67f467566c-gjwxx -o yaml
[...]
envFrom:
- secretRef:
name: automount-env-secret
- configMapRef:
name: automount-env-configmap
$ kubectl exec -it automount-volumes-nodejs-app-67f467566c-gjwxx -- /bin/sh -c 'env | grep CLUSTER | sort'
$
Do you have the same issue? Or is that intended? Or I might have missed something too.
It works as expected when binding as files (
|
I'm pretty sure the service binding operator is using an @rm3l I think it would be better to create a separate issue to track this problem. I don't think I would be able to fix it as part of thir PR |
Just to make sure I understand - is this an issue in
Sure anyway - let's track this in a separate issue. |
|
/override windows-integration-test/Windows-test Flaky tests |
I think the problem is in SBO side, which should use Server-Side Apply insteof of an Update. |
|
/lgtm |
|
/override windows-integration-test/Windows-test |
1 similar comment
|
/override windows-integration-test/Windows-test |
|
@feloy: Overrode contexts on behalf of feloy: windows-integration-test/Windows-test DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/lgtm |








What type of PR is this:
/kind feature
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes partially #6549
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: