Skip to content

Commit 2333253

Browse files
feat(helm): add subjects for cert-manager certificate (#346)
* ci(helm): fix helm e2e installer Signed-off-by: Oliver Bähler <[email protected]> * feat(chart): add cert subjects and bump app version 0.4.7 Signed-off-by: Oliver Bähler <[email protected]> --------- Signed-off-by: Oliver Bähler <[email protected]>
1 parent d188f12 commit 2333253

File tree

6 files changed

+48
-8
lines changed

6 files changed

+48
-8
lines changed

Makefile

+8-3
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,16 @@ helm-test: helm-controller-version kind ct ko-build-all
107107
@kind create cluster --wait=60s --name capsule-charts
108108
@kind load docker-image --name capsule-charts $(CAPSULE_PROXY_IMG):$(VERSION)
109109
@kubectl create ns capsule-system
110-
@kubectl create -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.crds.yaml
111-
@kubectl create -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.58.0/bundle.yaml
110+
@make helm-install
111+
112+
helm-install:
113+
@kubectl apply --server-side=true -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml
114+
@make install-capsule
115+
@kubectl apply --server-side=true -f https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.58.0/bundle.yaml
112116
@ct install --config $(SRC_ROOT)/.github/configs/ct.yaml --namespace=capsule-system --all --debug
113-
@kind delete cluster --name capsule-charts
114117

118+
helm-destroy:
119+
@kind delete cluster --name capsule-charts
115120

116121
####################
117122
# -- Testing

charts/capsule-proxy/Chart.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
appVersion: 0.4.6
2+
appVersion: 0.4.7
33
description: Helm Chart for Capsule Proxy, addon for Capsule, the multi-tenant Operator
44
name: capsule-proxy
55
type: application
@@ -21,7 +21,7 @@ maintainers:
2121
- name: capsule-maintainers
2222
2323
annotations:
24-
artifacthub.io/containsSecurityUpdates: "true"
24+
artifacthub.io/containsSecurityUpdates: "false"
2525
artifacthub.io/operator: "true"
2626
artifacthub.io/prerelease: "false"
2727
artifacthub.io/category: security
@@ -34,6 +34,4 @@ annotations:
3434
url: https://capsule.clastix.io/
3535
artifacthub.io/changes: |
3636
- kind: added
37-
description: artifacthub annotations
38-
- kind: changed
39-
description: maintainers contact
37+
description: add subjects for cert-manager certificate

charts/capsule-proxy/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ If you only need to make minor customizations, you can specify them on the comma
6161
| Key | Type | Default | Description |
6262
|-----|------|---------|-------------|
6363
| affinity | object | `{}` | Set affinity rules for the capsule-proxy pod. |
64+
| certManager.certificate.dnsNames | list | `[]` | Additional DNS Names to include in certificate |
65+
| certManager.certificate.ipAddresses | list | `[]` | Additional IP Addresses to include in certificate |
66+
| certManager.certificate.uris | list | `[]` | Additional URIs to include in certificate |
6467
| certManager.externalCA.enabled | bool | `false` | Set if want cert manager to sign certificates with an external CA |
6568
| certManager.externalCA.secretName | string | `""` | |
6669
| certManager.generateCertificates | bool | `false` | Set if the cert manager will generate SSL certificates (self-signed or CA-signed) |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
options:
2+
enableSSL: true
3+
generateCertificates: false
4+
certManager:
5+
generateCertificates: true
6+
certificate:
7+
dnsNames:
8+
- "localhost"
9+
ipAddresses:
10+
- "127.0.0.1"
11+
uris:
12+
- "spiffe://cluster.local/ns/sandbox/sa/example"

charts/capsule-proxy/templates/certmanager.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,23 @@ spec:
4545
- {{ $hosts.host }}
4646
{{- end }}
4747
{{- end }}
48+
{{- range $dns := .Values.certManager.certificate.dnsNames }}
49+
- {{ $dns }}
50+
{{- end }}
4851
- {{ include "capsule-proxy.fullname" . }}
4952
- {{ include "capsule-proxy.fullname" . }}.{{ .Release.Namespace }}.svc
53+
{{- with .Values.certManager.certificate.ipAddresses }}
54+
ipAddresses:
55+
{{- range $ip := . }}
56+
- {{ $ip }}
57+
{{- end }}
58+
{{- end }}
59+
{{- with .Values.certManager.certificate.uris }}
60+
uris:
61+
{{- range $uri := . }}
62+
- {{ $uri }}
63+
{{- end }}
64+
{{- end }}
5065
issuerRef:
5166
kind: {{ .Values.certManager.issuer.kind }}
5267
name: {{ include "capsule-proxy.certManager.issuerName" . }}

charts/capsule-proxy/values.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ certManager:
9999
kind: Issuer # Issuer or ClusterIssuer
100100
# -- Set the name of the ClusterIssuer if issuer kind is ClusterIssuer and if cert manager will generate CA signed SSL certificates
101101
name: "" # Name of the ClusterIssuer
102+
certificate:
103+
# -- Additional DNS Names to include in certificate
104+
dnsNames: []
105+
# -- Additional IP Addresses to include in certificate
106+
ipAddresses: []
107+
# -- Additional URIs to include in certificate
108+
uris: []
102109

103110

104111
# ServiceAccount

0 commit comments

Comments
 (0)