Skip to content

Instantly share code, notes, and snippets.

@rajesh2k3
Forked from mateobur/l5d-daemonset.yml
Created February 7, 2019 08:59
Show Gist options
  • Save rajesh2k3/0174966db5b6b84a63ca05ff00212561 to your computer and use it in GitHub Desktop.
Save rajesh2k3/0174966db5b6b84a63ca05ff00212561 to your computer and use it in GitHub Desktop.

Revisions

  1. @mateobur mateobur revised this gist May 10, 2017. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions l5d-daemonset.yml
    Original file line number Diff line number Diff line change
    @@ -35,15 +35,14 @@ data:
    - protocol: http
    label: outgoing
    dtab: |
    /srv => /#/io.l5d.k8s/default/http;
    /srv => /#/io.l5d.k8s/production/http;
    /host => /srv;
    /svc => /host;
    /host/world => /srv/world-v1;
    interpreter:
    kind: default
    transformers:
    - kind: io.l5d.k8s.daemonset
    namespace: default
    namespace: production
    port: incoming
    service: l5d
    servers:
    @@ -60,10 +59,11 @@ data:
    - protocol: http
    label: incoming
    dtab: |
    /srv => /#/io.l5d.k8s/default/http;
    /srv => /#/io.l5d.k8s/production/http;
    /host => /srv;
    /svc => /host;
    /host/world => /srv/world-v1;
    failFast: true
    timeoutMs: 300
    interpreter:
    kind: default
    transformers:
  2. @mateobur mateobur revised this gist May 8, 2017. 1 changed file with 121 additions and 17 deletions.
    138 changes: 121 additions & 17 deletions l5d-daemonset.yml
    Original file line number Diff line number Diff line change
    @@ -1,24 +1,128 @@
    <script src="https://gist.github.com/1d99b7bf411f78cd3dbe696ff3c555e2.js"></script>
    # runs linkerd in a daemonset, in linker-to-linker mode, with TLS for all calls
    # from linkerd to linkerd
    ---
    apiVersion: v1
    kind: ConfigMap
    metadata:
    name: l5d-config
    data:
    config.yaml: |-
    admin:
    port: 9990
    namers:
    - kind: io.l5d.k8s
    experimental: true
    host: localhost
    port: 8001
    telemetry:
    - kind: io.l5d.prometheus
    - kind: io.l5d.recentRequests
    sampleRate: 0.25
    - kind: io.l5d.statsd
    experimental: true
    prefix: linkerd
    hostname: 127.0.0.1
    port: 8125
    gaugeIntervalMs: 10000
    sampleRate: 0.01
    <noscript><pre><code>
    File: l5d-service.yml
    ---------------------
    usage:
    orgId: linkerd-examples-daemonset-tls
    routers:
    - protocol: http
    label: outgoing
    dtab: |
    /srv => /#/io.l5d.k8s/default/http;
    /host => /srv;
    /svc => /host;
    /host/world => /srv/world-v1;
    interpreter:
    kind: default
    transformers:
    - kind: io.l5d.k8s.daemonset
    namespace: default
    port: incoming
    service: l5d
    servers:
    - port: 4140
    ip: 0.0.0.0
    client:
    tls:
    kind: io.l5d.static
    caCertPath: /io.buoyant/linkerd/certs/cacertificate.pem
    commonName: linkerd
    responseClassifier:
    kind: io.l5d.retryableRead5XX
    - protocol: http
    label: incoming
    dtab: |
    /srv => /#/io.l5d.k8s/default/http;
    /host => /srv;
    /svc => /host;
    /host/world => /srv/world-v1;
    interpreter:
    kind: default
    transformers:
    - kind: io.l5d.k8s.localnode
    servers:
    - port: 4141
    ip: 0.0.0.0
    tls:
    certPath: /io.buoyant/linkerd/certs/certificate.pem
    keyPath: /io.buoyant/linkerd/certs/key.pem
    ---
    apiVersion: v1
    kind: Service
    apiVersion: extensions/v1beta1
    kind: DaemonSet
    metadata:
    labels:
    app: l5d
    name: l5d
    spec:
    selector:
    app: l5d
    type: LoadBalancer
    ports:
    - name: outgoing
    port: 4140
    - name: incoming
    port: 4141
    - name: admin
    port: 9990
    template:
    metadata:
    labels:
    app: l5d
    spec:
    volumes:
    - name: l5d-config
    configMap:
    name: "l5d-config"
    - name: certificates
    secret:
    secretName: certificates
    containers:
    - name: l5d
    image: buoyantio/linkerd:0.9.1
    env:
    - name: POD_IP
    valueFrom:
    fieldRef:
    fieldPath: status.podIP
    args:
    - /io.buoyant/linkerd/config/config.yaml
    ports:
    - name: outgoing
    containerPort: 4140
    hostPort: 4140
    - name: incoming
    containerPort: 4141
    - name: admin
    containerPort: 9990
    volumeMounts:
    - name: "l5d-config"
    mountPath: "/io.buoyant/linkerd/config"
    readOnly: true
    - name: "certificates"
    mountPath: "/io.buoyant/linkerd/certs"
    readOnly: true

    </code></pre></noscript>
    - name: kubectl
    image: buoyantio/kubectl:v1.4.0
    args:
    - "proxy"
    - "-p"
    - "8001"
  3. @mateobur mateobur created this gist May 8, 2017.
    24 changes: 24 additions & 0 deletions l5d-daemonset.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    <script src="https://gist.github.com/1d99b7bf411f78cd3dbe696ff3c555e2.js"></script>

    <noscript><pre><code>
    File: l5d-service.yml
    ---------------------

    ---
    apiVersion: v1
    kind: Service
    metadata:
    name: l5d
    spec:
    selector:
    app: l5d
    type: LoadBalancer
    ports:
    - name: outgoing
    port: 4140
    - name: incoming
    port: 4141
    - name: admin
    port: 9990

    </code></pre></noscript>