Add loadbalancersourceranges to ssh service #105

Merged
JPRbrs merged 7 commits from master into master 2021-02-04 20:42:42 +00:00
JPRbrs commented 2021-01-22 11:59:23 +00:00 (Migrated from gitea.com)

SSH service might want to limit the a range of source IPs. LoadBalancerSourceRanges
enables to limit them just passing a list of CIDR addresses to whitelist

SSH service might want to limit the a range of source IPs. LoadBalancerSourceRanges enables to limit them just passing a list of CIDR addresses to whitelist
techknowlogick (Migrated from gitea.com) reviewed 2021-01-25 02:47:11 +00:00
JPRbrs commented 2021-01-25 10:40:37 +00:00 (Migrated from gitea.com)

Thanks for your feedback @techknowlogick, I've just pushed a commit with the changes

Thanks for your feedback @techknowlogick, I've just pushed a commit with the changes
luhahn (Migrated from gitea.com) reviewed 2021-01-25 16:49:54 +00:00
luhahn (Migrated from gitea.com) reviewed 2021-01-26 17:38:53 +00:00
techknowlogick (Migrated from gitea.com) reviewed 2021-01-27 16:23:36 +00:00
luhahn (Migrated from gitea.com) reviewed 2021-01-27 16:23:41 +00:00
luhahn (Migrated from gitea.com) reviewed 2021-01-28 08:13:20 +00:00
luhahn (Migrated from gitea.com) left a comment

Still not correct.

your current change:

{{- if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "LoadBalancer") }}
  loadBalancerIP: {{ .Values.service.ssh.loadBalancerIP }}
{{- end -}}
{{- if .Values.service.ssh.loadBalancerSourceRanges }}
  loadBalancerSourceRanges:
  {{- range .Values.service.ssh.loadBalancerSourceRanges }}
    - {{ . }}
  {{- end }}
{{- end }}

But you still got if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "loadBalancer")

It needs to be this (without the comments of course):

{{- if eq .Values.service.ssh.type "LoadBalancer" }} # loadBalancer
  {{- if .Values.service.ssh.loadBalancerIP }} # loadBalancerIP
  loadBalancerIP: {{ .Values.service.ssh.loadBalancerIP }}
  {{- end -}} # end loadBalancerIP
  {{- if .Values.service.ssh.loadBalancerSourceRanges }} # loadBalancerSourceRanges
  loadBalancerSourceRanges:
  {{- range .Values.service.ssh.loadBalancerSourceRanges }} # loop
    - {{ . }}
  {{- end }} # end loop
  {{- end }} # end loadBalancerSourceRanges
{{- end }} # end loadBalancer
Still not correct. your current change: ```yaml {{- if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "LoadBalancer") }} loadBalancerIP: {{ .Values.service.ssh.loadBalancerIP }} {{- end -}} {{- if .Values.service.ssh.loadBalancerSourceRanges }} loadBalancerSourceRanges: {{- range .Values.service.ssh.loadBalancerSourceRanges }} - {{ . }} {{- end }} {{- end }} ``` But you still got if and .Values.service.ssh.loadBalancerIP (eq .Values.service.ssh.type "loadBalancer") It needs to be this (without the comments of course): ```yaml {{- if eq .Values.service.ssh.type "LoadBalancer" }} # loadBalancer {{- if .Values.service.ssh.loadBalancerIP }} # loadBalancerIP loadBalancerIP: {{ .Values.service.ssh.loadBalancerIP }} {{- end -}} # end loadBalancerIP {{- if .Values.service.ssh.loadBalancerSourceRanges }} # loadBalancerSourceRanges loadBalancerSourceRanges: {{- range .Values.service.ssh.loadBalancerSourceRanges }} # loop - {{ . }} {{- end }} # end loop {{- end }} # end loadBalancerSourceRanges {{- end }} # end loadBalancer ```
JPRbrs commented 2021-01-28 09:19:52 +00:00 (Migrated from gitea.com)

Many thanks for your patience @luhahn, I've just uploaded the change slightly changing the indentation as running tests locally rendered some lines slighly off.

Many thanks for your patience @luhahn, I've just uploaded the change slightly changing the indentation as running tests locally rendered some lines slighly off.
luhahn (Migrated from gitea.com) approved these changes 2021-01-28 13:38:56 +00:00
luhahn (Migrated from gitea.com) left a comment

looks good to me now :)

looks good to me now :)
JPRbrs commented 2021-02-02 05:53:08 +00:00 (Migrated from gitea.com)

@techknowlogick can you please take a look and see if it looks good to you?
thanks in advance!

@techknowlogick can you please take a look and see if it looks good to you? thanks in advance!
techknowlogick (Migrated from gitea.com) approved these changes 2021-02-04 20:41:41 +00:00
Sign in to join this conversation.
No description provided.