diff --git a/charts/spire/charts/spiffe-oidc-discovery-provider/templates/deployment.yaml b/charts/spire/charts/spiffe-oidc-discovery-provider/templates/deployment.yaml index 69c7109..a16ea20 100644 --- a/charts/spire/charts/spiffe-oidc-discovery-provider/templates/deployment.yaml +++ b/charts/spire/charts/spiffe-oidc-discovery-provider/templates/deployment.yaml @@ -38,7 +38,7 @@ spec: - /run/spire/oidc/config/oidc-discovery-provider.conf ports: - containerPort: 8008 - name: health + name: healthz {{- if not .Values.insecureScheme.enabled }} - containerPort: 443 name: https @@ -57,13 +57,13 @@ spec: readinessProbe: httpGet: path: /ready - port: health + port: healthz initialDelaySeconds: 5 periodSeconds: 5 livenessProbe: httpGet: path: /live - port: health + port: healthz initialDelaySeconds: 5 periodSeconds: 5 resources: diff --git a/charts/spire/charts/spire-agent/README.md b/charts/spire/charts/spire-agent/README.md index eec7542..29f798d 100644 --- a/charts/spire/charts/spire-agent/README.md +++ b/charts/spire/charts/spire-agent/README.md @@ -13,6 +13,7 @@ A Helm chart to install the SPIRE agent. | bundleConfigMap | string | `"spire-bundle"` | | | clusterName | string | `"example-cluster"` | | | fullnameOverride | string | `""` | | +| healthChecks.port | int | `9980` | override the host port used for health checking | | image.pullPolicy | string | `"IfNotPresent"` | | | image.registry | string | `"ghcr.io"` | | | image.repository | string | `"spiffe/spire-agent"` | | diff --git a/charts/spire/charts/spire-agent/templates/configmap.yaml b/charts/spire/charts/spire-agent/templates/configmap.yaml index 921762f..50063d2 100644 --- a/charts/spire/charts/spire-agent/templates/configmap.yaml +++ b/charts/spire/charts/spire-agent/templates/configmap.yaml @@ -47,7 +47,7 @@ data: health_checks { listener_enabled = true bind_address = "0.0.0.0" - bind_port = "8080" + bind_port = {{ .Values.healthChecks.port | quote }} live_path = "/live" ready_path = "/ready" } diff --git a/charts/spire/charts/spire-agent/templates/daemonset.yaml b/charts/spire/charts/spire-agent/templates/daemonset.yaml index acee537..61b489b 100644 --- a/charts/spire/charts/spire-agent/templates/daemonset.yaml +++ b/charts/spire/charts/spire-agent/templates/daemonset.yaml @@ -43,6 +43,9 @@ spec: image: {{ template "spire-agent.image" (dict "appVersion" $.Chart.AppVersion "image" .Values.image) }} imagePullPolicy: {{ .Values.image.pullPolicy }} args: ["-config", "/run/spire/config/agent.conf"] + ports: + - containerPort: {{ .Values.healthChecks.port }} + name: healthz volumeMounts: - name: spire-config mountPath: /run/spire/config @@ -58,13 +61,13 @@ spec: livenessProbe: httpGet: path: /live - port: 8080 + port: healthz initialDelaySeconds: 15 periodSeconds: 60 readinessProbe: httpGet: path: /ready - port: 8080 + port: healthz initialDelaySeconds: 15 periodSeconds: 60 resources: diff --git a/charts/spire/charts/spire-agent/values.yaml b/charts/spire/charts/spire-agent/values.yaml index 400f2c3..fab377a 100644 --- a/charts/spire/charts/spire-agent/values.yaml +++ b/charts/spire/charts/spire-agent/values.yaml @@ -61,6 +61,10 @@ bundleConfigMap: spire-bundle server: port: 8081 +healthChecks: + # -- override the host port used for health checking + port: 9980 + waitForIt: image: registry: cgr.dev diff --git a/charts/spire/charts/spire-server/templates/statefulset.yaml b/charts/spire/charts/spire-server/templates/statefulset.yaml index 3d71059..983f3b8 100644 --- a/charts/spire/charts/spire-server/templates/statefulset.yaml +++ b/charts/spire/charts/spire-server/templates/statefulset.yaml @@ -43,10 +43,12 @@ spec: - name: grpc containerPort: 8081 protocol: TCP + - containerPort: 8080 + name: healthz livenessProbe: httpGet: path: /live - port: 8080 + port: healthz failureThreshold: 2 initialDelaySeconds: 15 periodSeconds: 60 @@ -54,7 +56,7 @@ spec: readinessProbe: httpGet: path: /ready - port: 8080 + port: healthz initialDelaySeconds: 5 periodSeconds: 5 resources: @@ -88,15 +90,17 @@ spec: - name: https containerPort: 9443 protocol: TCP + - containerPort: 8008 + name: healthz # TODO: implement probes # livenessProbe: # httpGet: # path: / - # port: https + # port: healthz # readinessProbe: # httpGet: # path: / - # port: https + # port: healthz resources: {{- toYaml .Values.controllerManager.resources | nindent 12 }} volumeMounts: