{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes/issues/299","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes/issues/299/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes/issues/299/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes/issues/299/events","html_url":"https://github.com/spring-cloud/spring-cloud-kubernetes/issues/299","id":392071366,"node_id":"MDU6SXNzdWUzOTIwNzEzNjY=","number":299,"title":"Help request: wiring sql secrets","user":{"login":"TomasRup","id":4675007,"node_id":"MDQ6VXNlcjQ2NzUwMDc=","avatar_url":"https://avatars3.githubusercontent.com/u/4675007?v=4","gravatar_id":"","url":"https://api.github.com/users/TomasRup","html_url":"https://github.com/TomasRup","followers_url":"https://api.github.com/users/TomasRup/followers","following_url":"https://api.github.com/users/TomasRup/following{/other_user}","gists_url":"https://api.github.com/users/TomasRup/gists{/gist_id}","starred_url":"https://api.github.com/users/TomasRup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomasRup/subscriptions","organizations_url":"https://api.github.com/users/TomasRup/orgs","repos_url":"https://api.github.com/users/TomasRup/repos","events_url":"https://api.github.com/users/TomasRup/events{/privacy}","received_events_url":"https://api.github.com/users/TomasRup/received_events","type":"User","site_admin":false},"labels":[{"id":1076008098,"node_id":"MDU6TGFiZWwxMDc2MDA4MDk4","url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes/labels/waiting-for-triage","name":"waiting-for-triage","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-18T09:42:26Z","updated_at":"2018-12-18T10:18:06Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm having a hard time wiring secrets.\r\n\r\nThese are from my deployments.yaml:\r\n```yml\r\nvolumes:\r\n        - name: \"my-api-secrets\"\r\n          secret:\r\n            secretName: \"my-api\"\r\n...\r\nvolumeMounts:\r\n            - name: my-api-secrets\r\n              mountPath: /secrets\r\n\r\n```\r\n\r\nThis is what I get in secrets:\r\n```sh\r\n➜  ~ kubectl get secret my-api -o yaml\r\n\r\n\r\napiVersion: v1\r\ndata:\r\n  spring.datasource.password: hidden-encoded==\r\n  spring.datasource.username: hidden-encoded==\r\nkind: Secret\r\nmetadata:\r\n  creationTimestamp: 2018-12-08T18:49:06Z\r\n  name: my-api\r\n  namespace: default\r\n  resourceVersion: \"hidden\"\r\n  selfLink: /api/v1/namespaces/default/secrets/my-api\r\n  uid: hidden\r\ntype: Opaque\r\n```\r\n\r\nThis is my bootstrap yml:\r\n```yml\r\nspring:\r\n  application:\r\n    name: my-api\r\n  cloud:\r\n    gcp:\r\n      sql:\r\n        instanceConnectionName: hidden:hidden:hidden\r\n        databaseName: hidden\r\n    kubernetes:\r\n      reload:\r\n        enabled: true\r\n        mode: polling\r\n        period: 5000\r\n      secrets:\r\n        enabled: true\r\n        name: my-api\r\n```\r\n\r\n\r\nBut I end up getting this error:\r\n```\r\nCaused by: java.lang.RuntimeException: Unable to retrieve information about Cloud SQL instance [hidden:hidden:hidden]\r\n\tat com.google.cloud.sql.core.SslSocketFactory.obtainInstanceMetadata(SslSocketFactory.java:459) ~[jdbc-socket-factory-core-1.0.11.jar!/:na]\r\n\tat com.google.cloud.sql.core.SslSocketFactory.fetchInstanceSslInfo(SslSocketFactory.java:333) ~[jdbc-socket-factory-core-1.0.11.jar!/:na]\r\n\tat com.google.cloud.sql.core.SslSocketFactory.getInstanceSslInfo(SslSocketFactory.java:313) ~[jdbc-socket-factory-core-1.0.11.jar!/:na]\r\n\tat com.google.cloud.sql.core.SslSocketFactory.createAndConfigureSocket(SslSocketFactory.java:194) ~[jdbc-socket-factory-core-1.0.11.jar!/:na]\r\n\tat com.google.cloud.sql.core.SslSocketFactory.create(SslSocketFactory.java:160) ~[jdbc-socket-factory-core-1.0.11.jar!/:na]\r\n\tat com.google.cloud.sql.mysql.SocketFactory.connect(SocketFactory.java:72) ~[mysql-socket-factory-1.0.11.jar!/:na]\r\n\tat com.mysql.jdbc.SocketFactoryWrapper.connect(SocketFactoryWrapper.java:57) ~[mysql-connector-java-8.0.13.jar!/:8.0.13]\r\n\tat com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) ~[mysql-connector-java-8.0.13.jar!/:8.0.13]\r\n\tat com.mysql.cj.NativeSession.connect(NativeSession.java:152) ~[mysql-connector-java-8.0.13.jar!/:8.0.13]\r\n\tat com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:955) ~[mysql-connector-java-8.0.13.jar!/:8.0.13]\r\n\t... 75 common frames omitted\r\nCaused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden\r\n{\r\n  \"code\" : 403,\r\n  \"errors\" : [ {\r\n    \"domain\" : \"global\",\r\n    \"message\" : \"Insufficient Permission\",\r\n    \"reason\" : \"insufficientPermissions\"\r\n  } ],\r\n  \"message\" : \"Insufficient Permission\"\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes/issues/comments/448169732","html_url":"https://github.com/spring-cloud/spring-cloud-kubernetes/issues/299#issuecomment-448169732","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-kubernetes/issues/299","id":448169732,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODE2OTczMg==","user":{"login":"geoand","id":4374975,"node_id":"MDQ6VXNlcjQzNzQ5NzU=","avatar_url":"https://avatars2.githubusercontent.com/u/4374975?v=4","gravatar_id":"","url":"https://api.github.com/users/geoand","html_url":"https://github.com/geoand","followers_url":"https://api.github.com/users/geoand/followers","following_url":"https://api.github.com/users/geoand/following{/other_user}","gists_url":"https://api.github.com/users/geoand/gists{/gist_id}","starred_url":"https://api.github.com/users/geoand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geoand/subscriptions","organizations_url":"https://api.github.com/users/geoand/orgs","repos_url":"https://api.github.com/users/geoand/repos","events_url":"https://api.github.com/users/geoand/events{/privacy}","received_events_url":"https://api.github.com/users/geoand/received_events","type":"User","site_admin":false},"created_at":"2018-12-18T10:18:06Z","updated_at":"2018-12-18T10:18:06Z","author_association":"COLLABORATOR","body":"Can you please post more of the stacktrace?"}}
{"actor":{"display_login":"geoand"}}