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

add env tpl #43

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

add env tpl #43

wants to merge 3 commits into from

Conversation

hupling
Copy link

@hupling hupling commented Sep 19, 2024

Description

Variable in Varialbe

@hupling hupling requested a review from a team as a code owner September 19, 2024 11:47
@hupling
Copy link
Author

hupling commented Sep 19, 2024

eigentlich gehört das auch in der config map gefixt, aber ich weiß nicht wie das geht.

@simonhir
Copy link
Member

Shouldn't the variable in variable resolution be done by Spring and isn't needed here?

@hupling
Copy link
Author

hupling commented Sep 19, 2024

refarch-gateway:
  a: "b"
  env:
    - name: SPRING_PROFILES_ACTIVE
      value: no-security
    - name: SSO_ISSUER_URL
      value: https://sso.muenchen.de/auth/realms/muenchen.de

    - name: SPRING_CLOUD_GATEWAY_ROUTES_0_ID
      value: backend
    - name: SPRING_CLOUD_GATEWAY_ROUTES_0_URI
      value: "http://{{ .Values.a }}-backend:8080/"

so irgendwie.

@hupling
Copy link
Author

hupling commented Sep 19, 2024

Das mit dem ist auch nicht so gut. Falls dann die Leute etwas überschreiben wollen, muss man alles erneut angeben. So kann man keine Standardvariablen wie Zeitzone setzen

env:
  - name: abc
    value: def

Besser :

env:
  Abc: def

@simonhir
Copy link
Member

I think the additional complexity by allowing usage of helm var and also env vars via Spring is not worth the benefits.
In my opinion the gateway and in general all helm charts should stay as near as possible to the default helm or kubernetes config and not introduce custom logic. Also introducing this logic here makes this chart in general different than any of the others as far as i saw.

@hupling
Copy link
Author

hupling commented Sep 20, 2024

Ich möchte wenn ich ein Chart installiere, dass möglichst alles out of the box funktioniert. Wenn ich jetzt den Namen Beispielsweise ändere, will ich jetzt nicht an 5 Stellen alles ändern.

hier muss jetzt z. B. Jeder helm install a . machen, sonst würde es nicht funktionieren. Das ist für mich jetzt einfach zu wissen, aber für den Endanwender sehr kompliziert
https://github.com/it-at-m/helm-charts/blob/refarch-template/charts/sps-sample/values.yaml#L11

@simonhir
Copy link
Member

simonhir commented Sep 20, 2024

But you don't know which services a application has and therefore can't provide default config for routes.
I.e. a application can have only webcomponents.

@hupling
Copy link
Author

hupling commented Sep 20, 2024

Ich rede hier nicht von Routen. Es geht nur um die Config von ApiGateway zum Backend.

Wie kann die z. B. Standardmäßig die Zeitzone und die Java-HeapSize angegeben werden?

@simonhir
Copy link
Member

I.e. by putting it in the env in the gateway values file
Than a user can overwrite the value by providing the same var in his own values file.

@hupling
Copy link
Author

hupling commented Sep 20, 2024

DigiWf hat folgendes

  env:
    # auth
    - name: AUTH_OAUTH2_CLIENT_KEYCLOAK_CLIENTID
      valueFrom:
        secretKeyRef:
          name: digitalwf-sso-secret
          key: username

@hupling
Copy link
Author

hupling commented Sep 24, 2024

😥 Es hat jetzt alles nicht funktioniert. Ich bekomme Values in Subcharts und in Parent-Charts. Ich bekomme aber die Values nicht vom Subchart wieder in ein anderes Subchart.

value: "http://{{ include \"frontend.fullname\" .Subcharts.frontend }}:8080/"

Theoretisch könnte man eine Configmap im Parentchart definieren und im Apigateway einhängen

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

Successfully merging this pull request may close these issues.

2 participants