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

Support for Annotation Templating #155

Closed
dfulgham opened this issue Jul 24, 2023 · 3 comments
Closed

Support for Annotation Templating #155

dfulgham opened this issue Jul 24, 2023 · 3 comments

Comments

@dfulgham
Copy link

dfulgham commented Jul 24, 2023

https://github.com/flowforge/helm/blob/f0d1a5cf531c76aba316d221b07ddda9bd47ed1a/helm/flowforge/templates/service-ingress.yaml#L18C40-L18C40

RE: FlowFuse/driver-k8s#95

Need to support the annotation replacement for serviceName, instanceURL, instanceHost, and instancePort if they exist. (i.e. {{ serviceName }} )

@hardillb

@hardillb
Copy link
Contributor

Might have a way

{{- if .Values.ingress.annotations }}
  annotations:
    {{- range $keys, $values := .Values.ingress.annotations }}
    {{ $keys }}: {{ $values | replace "{{ serviceName }}" .Values.forge.entryPoint  }}
    {{- end }}
  {{- end }}

@dfulgham
Copy link
Author

@hardillb Im using this now in our deployment (v 1.10.1 ) working well. I have to manually change service to https and tls unfortunately for editor nodes, but that will get fixed once the tls PR is merged. FlowFuse/driver-k8s#94

One thing that should be added to the docs, is the requirement for space between the "{{" and the variable name, I made the mistake of trying {{serviceName}} (no spaces) and that fails.

Also don't know if this is a side effect, but I can no longer add the annotation

nginx.ingress.kubernetes.io/force-ssl-redirect: 'true'

It fails with a go unmarshalling error related to the boolean string and fails to deploy

@hardillb
Copy link
Contributor

@dfulgham Can you open a new issue for the new problem and supply a sample values.yml file that shows the problem please.

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

No branches or pull requests

2 participants