From fbeb5f84b1f210bd9f247769d6a9e2ea6550207c Mon Sep 17 00:00:00 2001 From: CharlieC3 Date: Thu, 14 Feb 2019 14:32:12 -0500 Subject: [PATCH] Vault: Adding ability to open cluster ip in k8s service (#8054) * Vault: Adding ability to open cluster ip in k8s service Signed-off-by: Charles Cantoni * Adding conditional block around exposing the cluster port Signed-off-by: ccantoni * Bumping chart version Signed-off-by: ccantoni --- incubator/vault/Chart.yaml | 2 +- incubator/vault/README.md | 4 ++++ incubator/vault/templates/deployment.yaml | 2 +- incubator/vault/templates/service.yaml | 6 ++++++ incubator/vault/values.yaml | 2 ++ 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/incubator/vault/Chart.yaml b/incubator/vault/Chart.yaml index 301b83b712..2d68710ef6 100644 --- a/incubator/vault/Chart.yaml +++ b/incubator/vault/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart for Vault, a tool for managing secrets name: vault -version: 0.14.8 +version: 0.14.9 appVersion: 1.0.1 home: https://www.vaultproject.io/ icon: https://www.vaultproject.io/assets/images/mega-nav/logo-vault-0f83e3d2.svg diff --git a/incubator/vault/README.md b/incubator/vault/README.md index 754e233027..bcdae1b6af 100644 --- a/incubator/vault/README.md +++ b/incubator/vault/README.md @@ -65,6 +65,10 @@ The following table lists the configurable parameters of the Vault chart and the | `service.loadBalancerIP` | Assign a static IP to the loadbalancer | `nil` | | `service.loadBalancerSourceRanges`| IP whitelist for service type loadbalancer | `[]` | | `service.annotations` | Annotations for service | `{}` | +| `service.externalPort` | External port for the service | `8200` | +| `service.port` | The API port Vault is using | `8200` | +| `service.clusterExternalPort` | External cluster port for the service | `nil` | +| `service.clusterPort` | The cluster port Vault is using | `8201` | | `annotations` | Annotations for deployment | `{}` | | `labels` | Extra labels for deployment | `{}` | | `ingress.labels` | Labels for ingress | `{}` | diff --git a/incubator/vault/templates/deployment.yaml b/incubator/vault/templates/deployment.yaml index f0d6b689e4..daac59165a 100644 --- a/incubator/vault/templates/deployment.yaml +++ b/incubator/vault/templates/deployment.yaml @@ -45,7 +45,7 @@ spec: ports: - containerPort: {{ .Values.service.port }} name: api - - containerPort: 8201 + - containerPort: {{ .Values.service.clusterPort }} name: cluster-address livenessProbe: # Alive if it is listening for clustering traffic diff --git a/incubator/vault/templates/service.yaml b/incubator/vault/templates/service.yaml index c271d1a18a..13efcd7a59 100644 --- a/incubator/vault/templates/service.yaml +++ b/incubator/vault/templates/service.yaml @@ -30,6 +30,12 @@ spec: protocol: TCP targetPort: {{ .Values.service.port }} name: api + {{- if .Values.service.clusterExternalPort }} + - port: {{ .Values.service.clusterExternalPort }} + protocol: TCP + targetPort: {{ .Values.service.clusterPort }} + name: cluster + {{- end }} selector: app: {{ template "vault.name" . }} release: {{ .Release.Name }} diff --git a/incubator/vault/values.yaml b/incubator/vault/values.yaml index 28940b8d73..63c01c5694 100644 --- a/incubator/vault/values.yaml +++ b/incubator/vault/values.yaml @@ -35,6 +35,8 @@ service: # - 130.211.204.2/32 externalPort: 8200 port: 8200 + # clusterExternalPort: 8201 + clusterPort: 8201 # clusterIP: None annotations: {} # cloud.google.com/load-balancer-type: "Internal"