Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Commit a7f2745

Browse files
authored
Merge pull request #27 from nginxinc/helm-chart-1.2
Helm release - 1.2.0
2 parents 4f545ec + 0f4cee4 commit a7f2745

17 files changed

+149
-35
lines changed

helm-chart/Chart.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apiVersion: v2
22
name: nginx-service-mesh
33
description: NGINX Service Mesh
4-
version: 0.1.0
5-
appVersion: 1.1.0
6-
kubeVersion: ">= 1.16.0-0"
4+
version: 0.2.0
5+
appVersion: 1.2.0
6+
kubeVersion: "1.16-0 - 1.20-0"
7+
icon: https://raw.githubusercontent.com/nginxinc/nginx-service-mesh/master/helm-chart/chart-icon.png

helm-chart/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# NGINX Service Mesh
2+
3+
Before deploying NGINX Service Mesh, see the [Platform Guide](https://docs.nginx.com/nginx-service-mesh/get-started/kubernetes-platform/) to ensure your environment is properly configured. If [Persistent Storage](https://docs.nginx.com/nginx-service-mesh/get-started/kubernetes-platform/persistent-storage/) is not configured in your cluster, set the `mTLS.persistentStorage` field to `off`. Verify that no other service meshes exist in your Kubernetes cluster. It is advised to install NGINX Service Mesh in a dedicated namespace.
4+
5+
## Helm Installation and Configuration
6+
7+
For information on the configuration options and installation process when using Helm with NGINX Service Mesh, see the [Installation Guide](https://docs.nginx.com/nginx-service-mesh/get-started/install-with-helm/).
8+
9+
## Rancher users
10+
11+
When deploying NGINX Service Mesh via the Rancher Apps and Marketplace, the Helm value `rancher` is set to `true` by default. This value causes Pods in the `cattle-*`, `ingress-nginx`, and `cert-manager` namespaces to be ignored by the automatic sidecar injection webhook. If this behavior is not desired, the `rancher` value can be set to `false`, or the `injector.nsm.nginx.com/auto-inject` label can be manually removed from these namespaces.

helm-chart/chart-icon.png

11.8 KB
Loading

helm-chart/configs/grafana-top-dashboard.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
"alertThreshold": true
311311
},
312312
"percentage": false,
313-
"pluginVersion": "7.5.3",
313+
"pluginVersion": "8.1.3",
314314
"pointradius": 5,
315315
"points": false,
316316
"renderer": "flot",
@@ -405,7 +405,7 @@
405405
"alertThreshold": true
406406
},
407407
"percentage": false,
408-
"pluginVersion": "7.5.3",
408+
"pluginVersion": "8.1.3",
409409
"pointradius": 5,
410410
"points": false,
411411
"renderer": "flot",
@@ -502,7 +502,7 @@
502502
"alertThreshold": true
503503
},
504504
"percentage": false,
505-
"pluginVersion": "7.5.3",
505+
"pluginVersion": "8.1.3",
506506
"pointradius": 2,
507507
"points": false,
508508
"renderer": "flot",
@@ -596,7 +596,7 @@
596596
"alertThreshold": true
597597
},
598598
"percentage": false,
599-
"pluginVersion": "7.5.3",
599+
"pluginVersion": "8.1.3",
600600
"pointradius": 2,
601601
"points": false,
602602
"renderer": "flot",

helm-chart/configs/mesh-config.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"containerPort": 8443,
66
"port": 443
77
},
8-
"autoInjectorPort": 443,
8+
"autoInjectorPort": 9443,
99
"injection": {
1010
"disabledNamespaces": {{ .Values.autoInjection.disabledNamespaces }},
1111
"enabledNamespaces": {{ .Values.autoInjection.enabledNamespaces }},

helm-chart/configs/spire-server.conf

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ server {
44
ca_ttl = {{ quote .Values.mtls.caTTL }}
55
data_dir = "/run/spire/data"
66
log_level = "DEBUG"
7-
registration_uds_path = "/run/spire/sockets/spire-registration.sock"
7+
socket_path = "/run/spire/sockets/spire-registration.sock"
88
default_svid_ttl = {{ quote .Values.mtls.svidTTL }}
99
trust_domain = {{ quote .Values.mtls.trustDomain }}
1010
ca_subject = {
@@ -26,16 +26,12 @@ plugins {
2626
plugin_data {
2727
clusters = {
2828
"nginx-mesh" = {
29-
service_account_whitelist = [{{ printf "%s:spire-agent" .Release.Namespace | quote }}]
29+
service_account_allow_list = [{{ printf "%s:spire-agent" .Release.Namespace | quote }}]
3030
}
3131
}
3232
}
3333
}
3434

35-
NodeResolver "noop" {
36-
plugin_data {}
37-
}
38-
3935
Notifier "k8sbundle" {
4036
plugin_data {
4137
namespace = {{ quote .Release.Namespace }}

helm-chart/crds/circuitbreaker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ spec:
4848
name:
4949
description: Name of the destination.
5050
type: string
51+
minLength: 1
5152
namespace:
5253
description: Namespace of the destination.
5354
type: string

helm-chart/crds/ratelimit.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,73 @@ spec:
1717
singular: ratelimit
1818
versions:
1919
- name: v1alpha1
20+
served: true
21+
storage: false
22+
schema:
23+
openAPIV3Schema:
24+
type: object
25+
properties:
26+
spec:
27+
type: object
28+
required:
29+
- name
30+
- destination
31+
- rate
32+
properties:
33+
destination:
34+
description: The destination of this rate limit.
35+
type: object
36+
required:
37+
- name
38+
- kind
39+
properties:
40+
kind:
41+
description: Kind of the destination.
42+
type: string
43+
minLength: 1
44+
name:
45+
description: Name of the destination.
46+
type: string
47+
minLength: 1
48+
namespace:
49+
description: Namespace of the destination.
50+
type: string
51+
sources:
52+
description: Sources of this rate limit.
53+
type: array
54+
items:
55+
type: object
56+
required:
57+
- name
58+
- kind
59+
properties:
60+
kind:
61+
description: Kind of this source.
62+
type: string
63+
minLength: 1
64+
name:
65+
description: Name of this source.
66+
type: string
67+
minLength: 1
68+
namespace:
69+
description: Namespace of this source.
70+
type: string
71+
name:
72+
description: Name of this rate limit spec.
73+
type: string
74+
minLength: 1
75+
rate:
76+
description: The allowed rate of traffic.
77+
type: string
78+
pattern: "^[0-9]+r/[s,m]$"
79+
burst:
80+
description: The number of requests to allow beyond the given rate.
81+
type: integer
82+
minimum: 0
83+
delay:
84+
description: The number of requests after which to delay requests.
85+
x-kubernetes-int-or-string: true
86+
- name: v1alpha2
2087
served: true
2188
storage: true
2289
schema:
@@ -40,9 +107,11 @@ spec:
40107
kind:
41108
description: Kind of the destination.
42109
type: string
110+
minLength: 1
43111
name:
44112
description: Name of the destination.
45113
type: string
114+
minLength: 1
46115
namespace:
47116
description: Namespace of the destination.
48117
type: string
@@ -58,15 +127,18 @@ spec:
58127
kind:
59128
description: Kind of this source.
60129
type: string
130+
minLength: 1
61131
name:
62132
description: Name of this source.
63133
type: string
134+
minLength: 1
64135
namespace:
65136
description: Namespace of this source.
66137
type: string
67138
name:
68139
description: Name of this rate limit spec.
69140
type: string
141+
minLength: 1
70142
rate:
71143
description: The allowed rate of traffic.
72144
type: string
@@ -78,3 +150,26 @@ spec:
78150
delay:
79151
description: The number of requests after which to delay requests.
80152
x-kubernetes-int-or-string: true
153+
rules:
154+
description: Routing rules of this rate limit.
155+
type: array
156+
items:
157+
type: object
158+
required:
159+
- name
160+
- kind
161+
properties:
162+
kind:
163+
description: Kind of this routing rule.
164+
type: string
165+
enum:
166+
- HTTPRouteGroup
167+
name:
168+
description: Name of this routing rule.
169+
type: string
170+
minLength: 1
171+
matches:
172+
description: Match conditions of this routing rule.
173+
type: array
174+
items:
175+
type: string

helm-chart/templates/grafana.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ spec:
100100
serviceAccountName: grafana
101101
containers:
102102
- name: grafana
103-
image: {{ include "grafana.image-server" . }}/grafana:7.5.3
103+
image: {{ include "grafana.image-server" . }}/grafana:8.1.3
104104
imagePullPolicy: {{ .Values.registry.imagePullPolicy }}
105105
ports:
106106
- containerPort: 3000

helm-chart/templates/jaeger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spec:
4747
- name: {{ include "registry-key-name" . }}
4848
containers:
4949
- name: jaeger
50-
image: {{ include "jaeger.image-server" . }}/all-in-one:1.19.2
50+
image: {{ include "jaeger.image-server" . }}/all-in-one:1.26.0
5151
imagePullPolicy: {{ .Values.registry.imagePullPolicy }}
5252
ports:
5353
- containerPort: 16686

helm-chart/templates/nats.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ spec:
9696
- name: spire-agent-socket
9797
mountPath: "/run/spire/sockets"
9898
- name: nats-server
99-
image: {{ include "nats.image-server" . }}nats:2.1.8-alpine3.11
99+
image: {{ include "nats.image-server" . }}nats:2.4.0-alpine3.14
100100
imagePullPolicy: {{ .Values.registry.imagePullPolicy }}
101101
ports:
102102
- containerPort: 4222

helm-chart/templates/nginx-mesh-api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ spec:
158158
ports:
159159
- name: admission
160160
port: 443
161-
targetPort: 443
161+
targetPort: 9443
162162
protocol: TCP
163163
selector:
164164
app.kubernetes.io/name: nginx-mesh-api

helm-chart/templates/post-delete-hook.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,11 @@ spec:
134134
- |
135135
kubectl label namespace kube-system injector.nsm.nginx.com/auto-inject-
136136
kubectl label namespace {{ .Release.Namespace }} injector.nsm.nginx.com/auto-inject- app.kubernetes.io/part-of-
137+
{{- if .Values.rancher }}
138+
kubectl label namespace ingress-nginx cert-manager injector.nsm.nginx.com/auto-inject-
139+
for ns in $(kubectl get ns | awk '{print $1}' | tail -n +2); do
140+
case "$ns" in
141+
cattle-*) kubectl label namespace $ns injector.nsm.nginx.com/auto-inject- ;;
142+
esac
143+
done
144+
{{- end }}

helm-chart/templates/pre-install-hook.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ rules:
2929
- namespaces
3030
verbs:
3131
- get
32+
- list
3233
- patch
3334
---
3435
apiVersion: rbac.authorization.k8s.io/v1
@@ -93,3 +94,11 @@ spec:
9394
- |
9495
kubectl label namespace kube-system injector.nsm.nginx.com/auto-inject=false
9596
kubectl label namespace {{ .Release.Namespace }} injector.nsm.nginx.com/auto-inject=false app.kubernetes.io/part-of=nginx-service-mesh
97+
{{- if .Values.rancher }}
98+
kubectl label namespace ingress-nginx cert-manager injector.nsm.nginx.com/auto-inject=false
99+
for ns in $(kubectl get ns | awk '{print $1}' | tail -n +2); do
100+
case "$ns" in
101+
cattle-*) kubectl label namespace $ns injector.nsm.nginx.com/auto-inject=false ;;
102+
esac
103+
done
104+
{{- end }}

helm-chart/templates/spire-agent.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ spec:
7979
- spire-server:8081
8080
containers:
8181
- name: spire-agent
82-
image: {{ include "spire.image-server" . }}/spire-agent:0.12.3
82+
image: {{ include "spire.image-server" . }}/spire-agent:1.0.2
8383
imagePullPolicy: {{ .Values.registry.imagePullPolicy }}
8484
args:
8585
- "-config"

helm-chart/templates/spire-server.yaml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ data:
174174
{{- $caKey := genPrivateKey "ecdsa"}}
175175
{{- $caCrt := genCAWithKey "K8S WORKLOAD REGISTRAR CA" 9999 $caKey }}
176176
{{- $serverKey := genPrivateKey "ecdsa" }}
177-
{{- $serverCrt := genSignedCertWithKey "K8S WORKLOAD REGISTRAR SERVER" nil nil 9999 $caCrt $serverKey }}
177+
{{- $serverCrt := genSignedCertWithKey "K8S WORKLOAD REGISTRAR SERVER" nil (list (printf "k8s-workload-registrar.%s.svc" .Release.Namespace )) 9999 $caCrt $serverKey }}
178178
apiVersion: v1
179179
kind: Secret
180180
metadata:
@@ -220,7 +220,7 @@ spec:
220220
selector:
221221
app.kubernetes.io/name: spire-server
222222
---
223-
apiVersion: admissionregistration.k8s.io/v1
223+
apiVersion: admissionregistration.k8s.io/v1beta1
224224
kind: ValidatingWebhookConfiguration
225225
metadata:
226226
name: k8s-workload-registrar.security.builtin.nsm.nginx
@@ -234,11 +234,6 @@ webhooks:
234234
name: k8s-workload-registrar
235235
namespace: {{ .Release.Namespace }}
236236
path: "/validate-spiffeid-spiffe-io-v1beta1-spiffeid"
237-
sideEffects: None
238-
admissionReviewVersions:
239-
- v1
240-
- v1beta1
241-
failurePolicy: Ignore
242237
rules:
243238
- apiGroups:
244239
- spiffeid.spiffe.io
@@ -362,7 +357,7 @@ spec:
362357
shareProcessNamespace: true
363358
containers:
364359
- name: spire-server
365-
image: {{ include "spire.image-server" . }}/spire-server:0.12.3
360+
image: {{ include "spire.image-server" . }}/spire-server:1.0.2
366361
imagePullPolicy: {{ .Values.registry.imagePullPolicy }}
367362
args:
368363
- '-config'
@@ -418,7 +413,7 @@ spec:
418413
initialDelaySeconds: 5
419414
periodSeconds: 5
420415
- name: k8s-workload-registrar
421-
image: {{ include "spire.image-server" . }}/k8s-workload-registrar:0.12.3
416+
image: {{ include "spire.image-server" . }}/k8s-workload-registrar:1.0.2
422417
imagePullPolicy: {{ .Values.registry.imagePullPolicy }}
423418
args:
424419
- '-config'
@@ -450,9 +445,7 @@ spec:
450445
path: {{ include "ua-secret-name" . }}
451446
{{- end }}
452447
- name: spire-server-socket
453-
hostPath:
454-
path: /run/spire/sockets
455-
type: DirectoryOrCreate
448+
emptyDir: {}
456449
- name: k8s-workload-registrar-config
457450
configMap:
458451
name: k8s-workload-registrar

helm-chart/values.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# NGINX Service Mesh image registry settings.
22
registry:
33
# Hostname:port (if needed) for registry and path to images.
4-
# Affects: nginx-mesh-api, nginx-mesh-metrics, nginx-mesh-sidecar, nginx-mesh-init, nginx-mesh-cert-reloader
4+
# Affects: nginx-mesh-api, nginx-mesh-cert-reloader, nginx-mesh-init, nginx-mesh-metrics, nginx-mesh-sidecar
55
server: "docker-registry.nginx.com/nsm"
66

77
# Tag used for pulling images from registry
8-
# Affects: nginx-mesh-api, nginx-mesh-metrics, nginx-mesh-sidecar, nginx-mesh-init, nginx-mesh-cert-reloader
9-
imageTag: "1.1.0"
8+
# Affects: nginx-mesh-api, nginx-mesh-cert-reloader, nginx-mesh-init, nginx-mesh-metrics, nginx-mesh-sidecar
9+
imageTag: "1.2.0"
1010

1111
# Note: Currently only works with Google Cloud registry.
1212
# Contents of your Google Cloud JSON key file. Can be set via "--set-file registry.key=<your-key-file>.json"
@@ -96,7 +96,7 @@ mtls:
9696
# The TTL of certificates issued to workloads in hours(h) or minutes(m).
9797
svidTTL: "1h"
9898

99-
# The trust domain of the NGINX Service Mesh.
99+
# The trust domain of NGINX Service Mesh.
100100
trustDomain: "example.org"
101101

102102
# Use persistent storage; "on" assumes that a StorageClass exists.

0 commit comments

Comments
 (0)