Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing the chart #8

Open
bab5470 opened this issue Mar 3, 2022 · 4 comments
Open

Error installing the chart #8

bab5470 opened this issue Mar 3, 2022 · 4 comments

Comments

@bab5470
Copy link

bab5470 commented Mar 3, 2022

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.

@bab5470
Copy link
Author

bab5470 commented Mar 3, 2022

Actually maybe that's not such a good idea. Just found this:

According to the source code:

We always want to add environment variabled for master services from the master service namespace, even if enableServiceLinks is false.

Which basically means that you will and should not prevent those specific environment variables from being injected to the pods.

@bab5470
Copy link
Author

bab5470 commented Mar 3, 2022

Any other ideas or suggestions on how we solve the above issue?

@reytech-dev
Copy link

Hey there,
I did the following:

I added a new attribute here: https://github.com/mikescandy/krakend-helm/blob/master/values.yaml#L41

Something like that:

...
service:
  type: ClusterIP
  port: 80
  name: krakend-svc
...

I updated https://github.com/mikescandy/krakend-helm/blob/master/templates/service.yaml#L4

...
apiVersion: v1
kind: Service
metadata:
  name: {{ .Values.service.name }}
  labels:
    {{- include "krakend.labels" . | nindent 4 }}
...

And I updated https://github.com/mikescandy/krakend-helm/blob/master/templates/ingress.yaml#L2

{{- if .Values.ingress.enabled -}}
{{- $fullName := Values.service.name . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
...

Like that there is no name collision anymore.
Since krakend ist usually directly connected to the ingress resource, you don't have to change anything except the mentioned configurations.
Not a perfect solution but keeps the changes very small and works.

@ksylvan
Copy link

ksylvan commented Mar 5, 2023

@bab5470 there is a newer maintained repo here for the Helm chart: https://github.com/equinixmetal-helm/krakend
Maybe you can try that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants