Giter Site home page Giter Site logo

krakend-helm's Introduction

krakend-helm

An helm chart to deploy krakend in a kubernetes cluster

  • Installs the api-gateway system KrakenD

TL;DR;

$ helm install krakend-helm

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release krakend-helm

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Upgrading an existing Release to a new major version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

Configuration

Parameter Description Default
replicas Number of nodes 1
securityContext Deployment securityContext {}
image.repository Image repository devopsfaith/krakend
image.tag Image tag latest
image.pullPolicy Image pull policy IfNotPresent
imagePullSecrets Image pull secrets {}
service.type Kubernetes service type ClusterIP
service.port Kubernetes port where service is exposed 80
ingress.enabled Enables Ingress false
ingress.annotations Ingress annotations (values are templated) {}
ingress.hosts Ingress accepted hostnames []
ingress.tls Ingress TLS configuration []
resources CPU/Memory resource requests/limits {}
nodeSelector Node labels for pod assignment {}
tolerations Toleration labels for pod assignment []
affinity Affinity settings for pod assignment {}
annotations Deployment annotations {}
serviceAccount.annotations ServiceAccount annotations
serviceAccount.create Create service account true
serviceAccount.name Service account name to use, when empty will be set to created account if serviceAccount.create is set else to default ``
podAnnotations Deployment {}
namespaceOverride Override the deployment namespace "" (Release.Namespace)

krakend-helm's People

Contributors

justincmoy avatar mikescandy avatar rogras avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

krakend-helm's Issues

Error installing the chart

Getting the following when trying to install the chart:

ERROR parsing the configuration file: '/etc/krakend/krakend.json': 1 error(s) decoding:

* cannot parse 'port' as int: strconv.ParseInt: parsing "tcp://10.43.126.100:80": invalid syntax

I found this which seems to be similar: mattermost-community/focalboard#363

The solution proposed is to add: enableServiceLinks: false to the pod template spec to get around this. Will give this a try but FYI to anyone else that encounters this and to the helm chart author.

Release pods in state of CrashLoopBackOff

I've launched this helm chart using the following values:

  replicas: 1
    service:
      type: NodePort
    ingress.enabled: true
    ingress.annotations:
      kubernetes.io/ingress.class: alb
    krakendJson: |
      {
        "version": 2,
        "name": "My lovely gateway",
        "port": 8080,
        "cache_ttl": "3600s",
        "timeout": "3s",
        "extra_config": {
          "github_com/devopsfaith/krakend-gologging": {
            "level":  "DEBUG",
            "prefix": "[KRAKEND]",
            "syslog": false,
            "stdout": true
          }
        },
        "endpoints": [
            {
                "endpoint": "/health",
                "method": "GET",
                "backend": [
                    {
                        "host": [
                            "https://jsonplaceholder.typicode.com"
                        ],
                  "mapping": {
                "body": "output"
                  },
            "whitelist": [
                "id",
                "body"
                  ],
                        "url_pattern": "/posts/1",
                        "extra_config": {
                            "github.com/devopsfaith/krakend-circuitbreaker/gobreaker": {
                                "interval": 60,
                                "timeout": 10,
                                "maxErrors": 1
                            }
                        }
                    }
                ],
          "extra_config": {
            "github.com/devopsfaith/krakend/proxy": {
                "static": {
                      "strategy": "success",
                      "data": {
                            "name": "IDEART",
              "env": "pre",
              "status": "pass"
                      }
                }
            }
          }
            }
        ]
      }

and this is what I get when I run kubectl describe -n krakend pod/<krakend-release-pod-name>:

Name:                 krakend-release-6b6cf89667-7jmth
Namespace:            krakend
Priority:             2000001000
Priority Class Name:  system-node-critical
Node:                 fargate-ip-192-168-120-142.us-east-2.compute.internal/192.168.120.142
Start Time:           Wed, 09 Jun 2021 19:02:13 -0500
Labels:               app.kubernetes.io/instance=krakend-release
                      app.kubernetes.io/name=krakend
                      eks.amazonaws.com/fargate-profile=fp-krakend
                      pod-template-hash=6b6cf89667
Annotations:          CapacityProvisioned: 0.25vCPU 0.5GB
                      Logging: LoggingDisabled: LOGGING_CONFIGMAP_NOT_FOUND
                      kubernetes.io/psp: eks.privileged
Status:               Running
IP:                   192.168.120.142
IPs:
  IP:           192.168.120.142
Controlled By:  ReplicaSet/krakend-release-6b6cf89667
Containers:
  krakend:
    Container ID:   containerd://132dd220f9344a46072eadc3507e08c32c0406b50ab7f14bde91b1d45311b262
    Image:          devopsfaith/krakend:latest
    Image ID:       docker.io/devopsfaith/krakend@sha256:dacb3b9878fd890d6c8c933132202553e3f34fcf3e500ca329c5f704ebf9b35a
    Port:           8080/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Wed, 09 Jun 2021 19:04:11 -0500
      Finished:     Wed, 09 Jun 2021 19:04:41 -0500
    Ready:          False
    Restart Count:  4
    Liveness:       http-get http://:http/ delay=0s timeout=1s period=10s #success=1 #failure=3
    Readiness:      http-get http://:http/ delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:    <none>
    Mounts:
      /etc/krakend/ from config (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from krakend-release-token-88mrd (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      krakend-release-configmap
    Optional:  false
  krakend-release-token-88mrd:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  krakend-release-token-88mrd
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason           Age                   From               Message
  ----     ------           ----                  ----               -------
  Warning  LoggingDisabled  3m38s                 fargate-scheduler  Disabled logging because aws-logging configmap was not found. configmap "aws-logging" not found
  Normal   Scheduled        2m38s                 fargate-scheduler  Successfully assigned krakend/krakend-release-6b6cf89667-7jmth to fargate-ip-192-168-120-142.us-east-2.compute.internal
  Normal   Pulling          2m38s                 kubelet            Pulling image "devopsfaith/krakend:latest"
  Normal   Pulled           2m32s                 kubelet            Successfully pulled image "devopsfaith/krakend:latest"
  Normal   Killing          101s (x2 over 2m11s)  kubelet            Container krakend failed liveness probe, will be restarted
  Normal   Created          100s (x3 over 2m32s)  kubelet            Created container krakend
  Normal   Started          100s (x3 over 2m32s)  kubelet            Started container krakend
  Normal   Pulled           100s (x2 over 2m10s)  kubelet            Container image "devopsfaith/krakend:latest" already present on machine
  Warning  Unhealthy        95s (x6 over 2m25s)   kubelet            Readiness probe failed: HTTP probe failed with statuscode: 404
  Warning  Unhealthy        90s (x7 over 2m30s)   kubelet            Liveness probe failed: HTTP probe failed with statuscode: 404

These are the logs of the pod itself (kubectl logs -n krakend pod/<krakend-release-pod-name>):

Parsing configuration file: /etc/krakend/krakend.json
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ ERROR unable to create the GELF writer: getting the extra config for the krakend-gelf module
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ INFO Listening on port: 8080
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG creating a new influxdb client
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG no config for the influxdb client. Aborting
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ WARNIN influxdb: unable to load custom config
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ WARNIN opencensus: no extra config defined for the opencensus module
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG no config for the bloomfilter
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ WARNIN bloomFilter: no config for the bloomfilter
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ WARNIN no config present for the httpsecure module
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG lua: no extra config
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG botdetector middleware:  no config defined for the module
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG AMQP: https://jsonplaceholder.typicode.com: no amqp consumer defined
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG AMQP: https://jsonplaceholder.typicode.com: no amqp producer defined
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG pubsub: subscriber (https://jsonplaceholder.typicode.com): github.com/devopsfaith/krakend-pubsub/subscriber not found in the extra config
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG pubsub: publisher (https://jsonplaceholder.typicode.com): github.com/devopsfaith/krakend-pubsub/publisher not found in the extra config
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG http-request-executor: no extra config for backend /posts/1
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG CEL: no extra config detected for backend /posts/1
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG lua: no extra config
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG CEL: no extra config detected for pipe /health
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ DEBUG lua: no extra config
[KRAKEND] 2021/06/10 - 00:06:02.191 ▶ INFO JOSE: signer disabled for the endpoint /health
[KRAKEND] 2021/06/10 - 00:06:02.192 ▶ DEBUG lua: no extra config
[KRAKEND] 2021/06/10 - 00:06:02.192 ▶ INFO JOSE: validator disabled for the endpoint /health
[KRAKEND] 2021/06/10 - 00:06:02.192 ▶ DEBUG botdetector:  no config defined for the module
[KRAKEND] 2021/06/10 - 00:06:02.192 ▶ DEBUG http-server-handler: no extra config
[KRAKEND] 2021/06/10 - 00:06:02.192 ▶ INFO registering usage stats for cluster ID 'Y60hvHSWoVblNvSdPlDr6Ko2h8uzp9zU8oPuSC6FeMo='
[GIN] 2021/06/10 - 00:06:06 | 404 |       2.304µs | 169.254.175.250 | GET      "/"
[GIN] 2021/06/10 - 00:06:10 | 404 |       3.149µs | 169.254.175.250 | GET      "/"
[GIN] 2021/06/10 - 00:06:16 | 404 |       3.016µs | 169.254.175.250 | GET      "/"
[GIN] 2021/06/10 - 00:06:20 | 404 |       2.997µs | 169.254.175.250 | GET      "/"
[GIN] 2021/06/10 - 00:06:26 | 404 |       2.852µs | 169.254.175.250 | GET      "/"
[GIN] 2021/06/10 - 00:06:30 | 404 |       2.629µs | 169.254.175.250 | GET      "/"
2021/06/10 00:06:31 Signal intercepted: terminated
[KRAKEND] 2021/06/10 - 00:06:31.516 ▶ INFO Router execution ended

It seems it's stuck in CrashLoopBackOff state as the actual container is terminating for unknown reason. Any ideas?

Add to a Helm Repository

it seems that this package is not registered in any Helm Repo, and the git should be cloned to use this chart.
Please add it to a repo and index it in artifacthub.io to make installation process easier.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.