Skip to content

Commit cc92aa0

Browse files
committed
feat: update helmchart using new extension discovery annotation and improved tls configuration
1 parent 00aefb5 commit cc92aa0

File tree

9 files changed

+88
-51
lines changed

9 files changed

+88
-51
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: extensionlib
33
repository: https://steadybit.github.io/helm-charts
4-
version: 1.2.0
5-
digest: sha256:8797b2f7c03291e3115e76a62b43d27827181c28606b49e2d3aeffda3f287bb0
6-
generated: "2023-04-26T14:12:11.782862+02:00"
4+
version: 1.4.0
5+
digest: sha256:c3931aae14c06eac0b12f52e593eb270c729c263cdea9264d3f9b099c2be72ab
6+
generated: "2023-07-28T17:40:01.986481+02:00"

charts/steadybit-extension-prometheus/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: steadybit-extension-prometheus
33
description: Steadybit Prometheus extension Helm chart for Kubernetes.
4-
version: 1.4.7
4+
version: 1.4.8
55
appVersion: latest
66
home: https://www.steadybit.com/
77
icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png
@@ -21,5 +21,5 @@ annotations:
2121
url: https://hub.steadybit.com
2222
dependencies:
2323
- name: extensionlib
24-
version: 1.2.0
24+
version: ^1.4.0
2525
repository: https://steadybit.github.io/helm-charts
Binary file not shown.
Binary file not shown.

charts/steadybit-extension-prometheus/tests/__snapshot__/deployment_test.yaml.snap

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ manifest should match snapshot with extra env vars:
122122
runAsUser: 10000
123123
volumeMounts: null
124124
volumes: null
125-
manifest should match snapshot with mutual TLS:
125+
manifest should match snapshot with mutual TLS using containerPaths:
126126
1: |
127127
apiVersion: apps/v1
128128
kind: Deployment
@@ -147,11 +147,11 @@ manifest should match snapshot with mutual TLS:
147147
- name: STEADYBIT_LOG_FORMAT
148148
value: text
149149
- name: STEADYBIT_EXTENSION_TLS_SERVER_CERT
150-
value: /etc/extension/certificates/server-cert/tls.crt
150+
value: /etc/tls/server.crt
151151
- name: STEADYBIT_EXTENSION_TLS_SERVER_KEY
152-
value: /etc/extension/certificates/server-cert/tls.key
152+
value: /etc/tls/server.key
153153
- name: STEADYBIT_EXTENSION_TLS_CLIENT_CAS
154-
value: /etc/extension/certificates/client-cert-a/tls.crt,/etc/extension/certificates/client-cert-a/tls.crt
154+
value: /etc/tls/ca.crt,/etc/tls/ca2.crt
155155
- name: STEADYBIT_EXTENSION_PROMETHEUS_INSTANCE_0_NAME
156156
value: null
157157
- name: STEADYBIT_EXTENSION_PROMETHEUS_INSTANCE_0_ORIGIN
@@ -179,22 +179,8 @@ manifest should match snapshot with mutual TLS:
179179
runAsGroup: 10000
180180
runAsNonRoot: true
181181
runAsUser: 10000
182-
volumeMounts:
183-
- mountPath: /etc/extension/certificates/client-cert-a
184-
name: certificate-client-cert-a
185-
readOnly: true
186-
- mountPath: /etc/extension/certificates/server-cert
187-
name: certificate-server-cert
188-
readOnly: true
189-
volumes:
190-
- name: certificate-client-cert-a
191-
secret:
192-
optional: false
193-
secretName: client-cert-a
194-
- name: certificate-server-cert
195-
secret:
196-
optional: false
197-
secretName: server-cert
182+
volumeMounts: null
183+
volumes: null
198184
manifest should match snapshot without TLS:
199185
1: |
200186
apiVersion: apps/v1

charts/steadybit-extension-prometheus/tests/__snapshot__/service_test.yaml.snap

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ manifest should match snapshot with TLS:
44
kind: Service
55
metadata:
66
annotations:
7-
steadybit.com/extension-auto-discovery: "{\n \"extensions\": [\n {\n \"port\": 8087,\n \"types\": [\"ACTION\",\"DISCOVERY\"],\n \"tls\": {\n \"server\": {\n \"extraCertsFile\": \"server-cert/tls.crt\"\n }\n \n }\n }\n ]\n}\n"
7+
steadybit.com/extension-auto-discovery: |
8+
{"extensions":[{"port":8087,"protocol":"https","types":["ACTION","DISCOVERY"]}]}
89
labels: null
910
name: RELEASE-NAME-steadybit-extension-prometheus
1011
namespace: NAMESPACE
@@ -22,23 +23,25 @@ manifest should match snapshot with mutual TLS:
2223
metadata:
2324
annotations:
2425
steadybit.com/extension-auto-discovery: |
25-
{
26-
"extensions": [
27-
{
28-
"port": 8087,
29-
"types": ["ACTION","DISCOVERY"],
30-
"tls": {
31-
"server": {
32-
"extraCertsFile": "server-cert/tls.crt"
33-
},
34-
"client": {
35-
"certChainFile": "client-cert-a/tls.crt",
36-
"certKeyFile": "client-cert-a/tls.key"
37-
}
38-
}
39-
}
40-
]
41-
}
26+
{"extensions":[{"port":8087,"protocol":"https","types":["ACTION","DISCOVERY"]}]}
27+
labels: null
28+
name: RELEASE-NAME-steadybit-extension-prometheus
29+
namespace: NAMESPACE
30+
spec:
31+
ports:
32+
- port: 8087
33+
protocol: TCP
34+
targetPort: 8087
35+
selector:
36+
app.kubernetes.io/name: steadybit-extension-prometheus
37+
manifest should match snapshot with mutual TLS using containerPaths:
38+
1: |
39+
apiVersion: v1
40+
kind: Service
41+
metadata:
42+
annotations:
43+
steadybit.com/extension-auto-discovery: |
44+
{"extensions":[{"port":8087,"protocol":"https","types":["ACTION","DISCOVERY"]}]}
4245
labels: null
4346
name: RELEASE-NAME-steadybit-extension-prometheus
4447
namespace: NAMESPACE
@@ -55,7 +58,8 @@ manifest should match snapshot without TLS:
5558
kind: Service
5659
metadata:
5760
annotations:
58-
steadybit.com/extension-auto-discovery: "{\n \"extensions\": [\n {\n \"port\": 8087,\n \"types\": [\"ACTION\",\"DISCOVERY\"],\n \"tls\": {\n \n }\n }\n ]\n}\n"
61+
steadybit.com/extension-auto-discovery: |
62+
{"extensions":[{"port":8087,"protocol":"http","types":["ACTION","DISCOVERY"]}]}
5963
labels: null
6064
name: RELEASE-NAME-steadybit-extension-prometheus
6165
namespace: NAMESPACE

charts/steadybit-extension-prometheus/tests/deployment_test.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ tests:
2323
fromSecrets:
2424
- client-cert-a
2525
- client-cert-a
26+
- it: manifest should match snapshot with mutual TLS using containerPaths
27+
set:
28+
tls:
29+
server:
30+
certificate:
31+
path: /etc/tls/server.crt
32+
key:
33+
path: /etc/tls/server.key
34+
client:
35+
certificates:
36+
paths:
37+
- /etc/tls/ca.crt
38+
- /etc/tls/ca2.crt
39+
asserts:
40+
- matchSnapshot: {}
41+
- it: manifest should match snapshot with extra env vars
42+
set:
43+
extraEnv:
44+
- name: FOO
45+
value: "bar"
46+
extraEnvFrom:
47+
- configMapRef:
48+
name: env-configmap
49+
- secretRef:
50+
name: env-secrets
2651
asserts:
2752
- matchSnapshot: {}
2853
- it: manifest should match snapshot with extra env vars

charts/steadybit-extension-prometheus/tests/service_test.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ templates:
33
tests:
44
- it: manifest should match snapshot without TLS
55
asserts:
6-
- matchSnapshot: { }
6+
- matchSnapshot: {}
77
- it: manifest should match snapshot with TLS
88
set:
99
tls:
1010
server:
1111
certificate:
1212
fromSecret: server-cert
1313
asserts:
14-
- matchSnapshot: { }
14+
- matchSnapshot: {}
1515
- it: manifest should match snapshot with mutual TLS
1616
set:
1717
tls:
@@ -25,3 +25,18 @@ tests:
2525
- client-cert-a
2626
asserts:
2727
- matchSnapshot: {}
28+
- it: manifest should match snapshot with mutual TLS using containerPaths
29+
set:
30+
tls:
31+
server:
32+
certificate:
33+
path: /etc/tls/server.crt
34+
key:
35+
path: /etc/tls/server.key
36+
client:
37+
certificates:
38+
paths:
39+
- /etc/tls/ca.crt
40+
- /etc/tls/ca2.crt
41+
asserts:
42+
- matchSnapshot: {}

charts/steadybit-extension-prometheus/values.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,22 @@ image:
2020
tls:
2121
server:
2222
certificate:
23-
# tls.server.certificate.fromSecret -- The name of the secret containing the TLS certificate for the extension. The extension will then create
24-
# an HTTPS server instead of an HTTP server.
23+
# tls.server.certificate.fromSecret -- The name of the secret containing the TLS certificate for the extension.
24+
# The extension will then create an HTTPS server instead of an HTTP server.
2525
fromSecret: null
26+
# tls.server.certificate.path --Path to the TLS certificate for the extension.
27+
path: null
28+
key:
29+
# tls.server.certificate.key-path --Path to the key for the TLS certificate for the extension.
30+
path: null
2631
client:
2732
certificates:
28-
# tls.client.certificates.fromSecrets -- List of secret names containing TLS certificates for the extension to trust. The extension will require
29-
# clients to authenticate using one of these certificates. In essence, this will enable mutual TLS.
33+
# tls.client.certificates.fromSecrets -- List of secret names containing TLS certificates for the extension to trust.
34+
# The extension will require clients to authenticate using one of these certificates. In essence, this will enable mutual TLS.
3035
fromSecrets: []
31-
36+
# tls.client.certificates.paths -- List paths containing TLS certificates for the extension to trust.
37+
# The extension will require clients to authenticate using one of these certificates. In essence, this will enable mutual TLS.
38+
paths: []
3239
logging:
3340
# logging.level -- The active log level. Valid values are: TRACE, DEBUG, INFO, WARN, ERROR
3441
level: INFO

0 commit comments

Comments
 (0)