How to use sidecar - 1 common examples

To help you get started, we’ve selected a few sidecar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github concur / skipper / api / controllers / deploy / process.js View on Github external
"apiVersion": "extensions/v1beta1",
                  "kind": "Ingress",
                  "metadata": {
                    "annotations": reqdata.annotations,
                    "name": reqdata.name
                  },
                  "spec": {
                    "rules": [ 
                      {"host": configLocation.serviceDNS, 
                       "http": {"paths": [{"path": "/", "backend": {"serviceName": reqdata.name, "servicePort": reqdata.targetPort}}]}}
                    ],
                    "tls": [{"hosts": [configLocation.serviceDNS]}]
                  }
                };
                
                if (reqdata.annotations["sidecar.istio.io/inject"] == "true") {
                  console.log(reqdata.key, "Adding istio annotation to ingress");
                  kubeingress.metadata.annotations["kubernetes.io/ingress.class"] = "istio";
                  kubeingress.spec.rules[0].http.paths[0].path = "/.*";
                  delete kubeingress.spec.tls;
                }

                k8sHelper.k8sCRUD.ensureObject(kubeingress, kubeapiParams, 'ingresses', reqdata, function (err, data) {
                  if (err) {
                    console.log(reqdata.key, "error updating ingress:", data);
                    return callback(err, "error updating ingress:" + reqdata.key);
                  } else {
                    data.location = configLocation.location;
                    data.context = configLocation.context;
                    reqdata.deployClusters.push(data);
                    return callback(null, data.message);
                  }

sidecar

Sidecar is for easy hook/call in-process functions with TypeScript annotations.

Apache-2.0
Latest version published 2 years ago

Package Health Score

42 / 100
Full package analysis

Popular sidecar functions