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

Use trustedProxies values as arrays #31

Closed

Conversation

mgrzybek
Copy link

Description

This PR uses array instead of string to manage trustedProxies.

Why is this needed

Fixes: #29

How Has This Been Tested?

I managed to deploy the services using the charts without error. A comma-separated list of proxies appears using kubectl get pods -o yaml -n tink-system <pod-name>

spec:
  containers:
  - args:
    - --backend=kubernetes
    - --http-port=50061
    env:
    - name: HEGEL_TRUSTED_PROXIES
      value: 10.244.3.0/24,10.244.2.0/24,10.244.5.0/24,10.244.0.0/24,10.244.1.0/24,10.244.4.0/24
    image: quay.io/tinkerbell/hegel:v0.10.1

How are existing users impacted? What migration steps/scripts do we need?

N.A.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests (N.A.)
  • provided instructions on how to upgrade (N.A.)

@@ -33,7 +33,7 @@ spec:
{{- end }}
env:
- name: HEGEL_TRUSTED_PROXIES
value: {{ required "missing trustedProxies" .Values.trustedProxies | quote }}
value: {{ join "," .Values.trustedProxies }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
value: {{ join "," .Values.trustedProxies }}
value: {{ required "missing trustedProxies" (join "," .Values.trustedProxies | quote) }}

@@ -37,7 +37,7 @@ spec:
{{- end }}
env:
- name: TRUSTED_PROXIES
value: {{ required "missing trustedProxies" .Values.trustedProxies | quote }}
value: {{ join "," .Values.trustedProxies }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
value: {{ join "," .Values.trustedProxies }}
value: {{ required "missing trustedProxies" (join "," .Values.trustedProxies | quote) }}

@chrisdoherty4
Copy link
Member

Closing in favor of a holistic refactor in #32 that will address the underlying issue.

@mgrzybek mgrzybek deleted the trusted-proxies-values-array branch January 24, 2023 15:22
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.

Installing the stack using helm fails: ’,’ should be escaped
3 participants