Closed affansyed closed 2 years ago
While trying to deploy the DPPs my copy-paste of the code snippet was failiing.
` kuma-dp run --cp-address=https://localhost:5678/ --dns-enabled=false --dataplane="type: Dataplane mesh: default name: redis networking: address: 0.0.0.0 inbound:
Looking at error it felt an indentation issues so I copied the quoted YAML into redis.yaml, and line 2 was of whack, which I then fixed.
Now when I passed the redis.yaml file it gave me the following error.
kuma-dp run --cp-address=https://localhost:5678/ --dns-enabled=false -d redis.yaml --dataplane-token-file=kuma-token-redis 2022-03-05T10:31:24.162+0500 INFO Skipping reading config from file 2022-03-05T10:31:24.163+0500 INFO kuma-dp.run effective configuration {"config": "{\"controlPlane\":{\"caCert\":\"\",\"caCertFile\":\"\",\"retry\":{\"backoff\":\"3s\",\"maxDuration\":\"5m0s\"},\"url\":\"https://localhost:5678/\"},\"dataplane\":{\"drainTime\":\"30s\",\"proxyType\":\"dataplane\"},\"dataplaneRuntime\":{\"binaryPath\":\"envoy\",\"dataplaneTokenPath\":\"kuma-token-redis\",\"resourcePath\":\"redis.yaml\"},\"dns\":{\"coreDnsBinaryPath\":\"coredns\",\"coreDnsEmptyPort\":15055,\"coreDnsPort\":15053,\"envoyDnsPort\":15054,\"prometheusPort\":19153}}"} 2022-03-05T10:31:24.163+0500 INFO kuma-dp.run rendered resource {"resource": " type: Dataplane\n mesh: default\n name: redis\n networking: \n address: 0.0.0.0\n inbound: \n - port: 16379\n servicePort: 26379\n serviceAddress: 127.0.0.1\n tags: \n kuma.io/service: redis\n kuma.io/protocol: tcp\n"} 2022-03-05T10:31:24.163+0500 ERROR kuma-dp.run failed to read policy {"proxyType": "dataplane", "error": "invalid meta type: error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator", "errorVerbose": "error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator\ninvalid meta type\ngithub.com/kumahq/kuma/pkg/core/resources/model/rest.Unmarshall\n\t/home/circleci/project/pkg/core/resources/model/rest/unmarshaller.go:23\ngithub.com/kumahq/kuma/pkg/core/resources/model/rest.UnmarshallToCore\n\t/home/circleci/project/pkg/core/resources/model/rest/unmarshaller.go:13\ngithub.com/kumahq/kuma/app/kuma-dp/cmd.readResource\n\t/home/circleci/project/app/kuma-dp/cmd/dataplane.go:44\ngithub.com/kumahq/kuma/app/kuma-dp/cmd.newRunCmd.func2\n\t/home/circleci/project/app/kuma-dp/cmd/run.go:75\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/circleci/.go_workspace/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:845\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/circleci/.go_workspace/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/circleci/.go_workspace/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902\ngithub.com/kumahq/kuma/app/kuma-dp/cmd.Execute\n\t/home/circleci/project/app/kuma-dp/cmd/root.go:83\nmain.main\n\t/home/circleci/project/app/kuma-dp/main.go:6\nruntime.main\n\t/home/circleci/go/src/runtime/proc.go:255\nruntime.goexit\n\t/home/circleci/go/src/runtime/asm_amd64.s:1581"} Error: invalid meta type: error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator
Just to be clear, I am doing a Universal deployment, on an ubuntu 20.04 image over wsl2.
@affansyed indeed the README was wrong please see the PR which corrects this
What happened?
While trying to deploy the DPPs my copy-paste of the code snippet was failiing.
` kuma-dp run --cp-address=https://localhost:5678/ --dns-enabled=false --dataplane="type: Dataplane mesh: default name: redis networking: address: 0.0.0.0 inbound:
Looking at error it felt an indentation issues so I copied the quoted YAML into redis.yaml, and line 2 was of whack, which I then fixed.
Now when I passed the redis.yaml file it gave me the following error.
kuma-dp run --cp-address=https://localhost:5678/ --dns-enabled=false -d redis.yaml --dataplane-token-file=kuma-token-redis 2022-03-05T10:31:24.162+0500 INFO Skipping reading config from file 2022-03-05T10:31:24.163+0500 INFO kuma-dp.run effective configuration {"config": "{\"controlPlane\":{\"caCert\":\"\",\"caCertFile\":\"\",\"retry\":{\"backoff\":\"3s\",\"maxDuration\":\"5m0s\"},\"url\":\"https://localhost:5678/\"},\"dataplane\":{\"drainTime\":\"30s\",\"proxyType\":\"dataplane\"},\"dataplaneRuntime\":{\"binaryPath\":\"envoy\",\"dataplaneTokenPath\":\"kuma-token-redis\",\"resourcePath\":\"redis.yaml\"},\"dns\":{\"coreDnsBinaryPath\":\"coredns\",\"coreDnsEmptyPort\":15055,\"coreDnsPort\":15053,\"envoyDnsPort\":15054,\"prometheusPort\":19153}}"} 2022-03-05T10:31:24.163+0500 INFO kuma-dp.run rendered resource {"resource": " type: Dataplane\n mesh: default\n name: redis\n networking: \n address: 0.0.0.0\n inbound: \n - port: 16379\n servicePort: 26379\n serviceAddress: 127.0.0.1\n tags: \n kuma.io/service: redis\n kuma.io/protocol: tcp\n"} 2022-03-05T10:31:24.163+0500 ERROR kuma-dp.run failed to read policy {"proxyType": "dataplane", "error": "invalid meta type: error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator", "errorVerbose": "error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator\ninvalid meta type\ngithub.com/kumahq/kuma/pkg/core/resources/model/rest.Unmarshall\n\t/home/circleci/project/pkg/core/resources/model/rest/unmarshaller.go:23\ngithub.com/kumahq/kuma/pkg/core/resources/model/rest.UnmarshallToCore\n\t/home/circleci/project/pkg/core/resources/model/rest/unmarshaller.go:13\ngithub.com/kumahq/kuma/app/kuma-dp/cmd.readResource\n\t/home/circleci/project/app/kuma-dp/cmd/dataplane.go:44\ngithub.com/kumahq/kuma/app/kuma-dp/cmd.newRunCmd.func2\n\t/home/circleci/project/app/kuma-dp/cmd/run.go:75\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/circleci/.go_workspace/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:845\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/circleci/.go_workspace/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/circleci/.go_workspace/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902\ngithub.com/kumahq/kuma/app/kuma-dp/cmd.Execute\n\t/home/circleci/project/app/kuma-dp/cmd/root.go:83\nmain.main\n\t/home/circleci/project/app/kuma-dp/main.go:6\nruntime.main\n\t/home/circleci/go/src/runtime/proc.go:255\nruntime.goexit\n\t/home/circleci/go/src/runtime/asm_amd64.s:1581"} Error: invalid meta type: error converting YAML to JSON: yaml: line 7: did not find expected '-' indicator
Just to be clear, I am doing a Universal deployment, on an ubuntu 20.04 image over wsl2.