salrashid123 / envoy_control Goto Github PK
View Code? Open in Web Editor NEWSample Envoy control plane 'hello world'
License: Apache License 2.0
Sample Envoy control plane 'hello world'
License: Apache License 2.0
i run :
curl -H "Host: http.domain.com" \ --resolve http.domain.com:10000:127.0.0.1 \ --cacert certs/tls-ca.crt https://http.domain.com:10000/
got:
curl: (60) SSL certificate problem: unable to get local issuer certificate
curl -k work
I am trying to load multiple certs as below:
certDomains = []string{"www.example.com", "www.hello.com"}
s := []types.Resource{}
for _, cd := range certDomains {
s = append(s, MakeSecret(cd))
}
resources[resource.SecretType] = s
// Secrets
func MakeSecret(vhost string) *envoy_api_v3_auth.Secret {
var secretName = strings.Replace(vhost, ".", "_", -1)
priv, err := ioutil.ReadFile("certs/" + secretName + ".key")
if err != nil {
log.Fatal(err)
}
pub, err := ioutil.ReadFile("certs/" + secretName + ".cert")
if err != nil {
log.Fatal(err)
}
log.Infof(">>>>>>>>>>>>>>>>>>> creating Secret " + secretName)
return &envoy_api_v3_auth.Secret{
Name: secretName,
Type: &envoy_api_v3_auth.Secret_TlsCertificate{
TlsCertificate: &envoy_api_v3_auth.TlsCertificate{
CertificateChain: &core.DataSource{
Specifier: &core.DataSource_InlineBytes{InlineBytes: []byte(pub)},
},
PrivateKey: &core.DataSource{
Specifier: &core.DataSource_InlineBytes{InlineBytes: []byte(priv)},
},
},
},
}
}
With certDomains being one element it works. I am trying to load multiple secrets with adding more elements on the list and it stops working, no error in console. Envoy shows certificate is empty.
Hi. Thanks for your example and excellent documentation!
When I run 'go run src/main.go' I get up to these logs but never past:
INFO[0000] Starting control plane
INFO[0000] gateway listening HTTP/1.1 port=18001
INFO[0000] access log server listening port=18090
INFO[0000] management server listening port=18000
It appears that it is not receiving a signal to proceed with the rest of the file. Any idea of why this could be?
Thanks for the demo
https://github.com/salrashid123/envoy_control/blob/master/src/main.go#L278
should be changed to match
https://github.com/salrashid123/envoy_control/blob/master/bbc.yaml#L29
As is, curl -v localhost:10000/robots.txt
will return a 404 with your dynamic configuration but using bbc.yaml works fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.