diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index d93773dc..44163122 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -58,8 +58,8 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | global.image.imagePullPolicy | If defined, a imagePullPolicy applied to all ArgoCD deployments. | `"IfNotPresent"` | | global.image.repository | If defined, a repository applied to all ArgoCD deployments. | `"argoproj/argocd"` | | global.image.tag | If defined, a tag applied to all ArgoCD deployments. | `"v1.5.1"` | -| global.securityContext | Toggle and define securityContext | See [values.yaml](values.yaml) |  -| global.imagePullSecrets | If defined, uses a Secret to pull an image from a private Docker registry or repository. | `[]` |  +| global.securityContext | Toggle and define securityContext | See [values.yaml](values.yaml) | +| global.imagePullSecrets | If defined, uses a Secret to pull an image from a private Docker registry or repository. | `[]` | | global.hostAliases | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files | `[]` | | nameOverride | Provide a name in place of `argocd` | `"argocd"` | | installCRDs | bool | `true` | Install CRDs if you are using Helm2. | @@ -224,6 +224,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | server.service.labels | Server service labels | `{}` | | server.service.servicePortHttp | Server service http port | `80` | | server.service.servicePortHttps | Server service https port | `443` | +| server.service.loadBalancerSourceRanges | Source IP ranges to allow access to service from. | `[]` | | server.service.type | Server service type | `"ClusterIP"` | | server.serviceAccount.create | Create server service account | `true` | | server.serviceAccount.name | Server service account name | `"argocd-server"` | diff --git a/charts/argo-cd/templates/argocd-server/service.yaml b/charts/argo-cd/templates/argocd-server/service.yaml index 031d0b62..673461b2 100644 --- a/charts/argo-cd/templates/argocd-server/service.yaml +++ b/charts/argo-cd/templates/argocd-server/service.yaml @@ -28,4 +28,8 @@ spec: targetPort: {{ .Values.server.name }} selector: app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.server.name }} \ No newline at end of file + app.kubernetes.io/name: {{ include "argo-cd.name" . }}-{{ .Values.server.name }} +{{- if and (eq .Values.server.service.type "LoadBalancer") .Values.server.service.loadBalancerSourceRanges }} + loadBalancerSourceranges: +{{ toYaml .Values.server.service.loadBalancerSourceRanges | indent 4 }} +{{- end -}} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index aeaa1822..cbe7326f 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -404,6 +404,7 @@ server: type: ClusterIP servicePortHttp: 80 servicePortHttps: 443 + loadBalancerSourceRanges: [] ## Server metrics service configuration metrics: